New diagnostics module does not perform file safety check

Issue #73 resolved
Stephen Biggs-Fox created an issue

The input parameter file_safety_check allows the user to ask GS2 to check that restart files can be written before starting a run. Doing this with the old diagnostics module when the restart directory is missing causes the run to crash with the error message " Error: Cannot write to test file, maybe restart_dir doesn't exist --> Aborting.". This is the expected behaviour.

However, with the new diagnostics module, the run carries on and simply doesn't create the restart files, i.e. it does not obey the file_safety_check flag. The code exists within the new diagnostics module to do the check and print the error message above; it's just not being run for some reason. All that happens is the following error message gets written once to <run_name>.error and nproc times to stdout:

nf90_create error: No such file or directory

This is bad because the point of the file_safety_check is to say I really need those restart files so please check they can be created before wasting my compute budget on runs that I can't restart. So not obeying the flag may lead to wasted computation.

This happens in the current version of next (dd8367b1) and a version of next from a couple of months ago (334a8fb4). I will investigate further to see when this bug was introduced and try to work out why it happens / how to fix it.

Comments (2)

  1. Log in to comment