COSIMA / libaccessom2

ACCESS-OM2 library
3 stars 7 forks source link

accessom2_restart.nml not being written to restart dir #48

Closed aekiss closed 4 years ago

aekiss commented 4 years ago

The latest libaccessom2 (d7c3c2835017) writes accessom2_restart.nml to outputnnn but not to restartnnn, causing an abort with Error in accessom2_deinit: atm and ice models are out of sync. at the end of the subsequent run. (Also, accessom2_restart.nml is written to outputnnn as a regular file, rather than a symlink to restartnnn-1/accessom2_restart.nml).

4198e150 worked fine, so the problem was introduced somewhere in these changes : https://github.com/COSIMA/libaccessom2/compare/4198e150...d7c3c2835017

I suspect this change is the culprit: https://github.com/COSIMA/libaccessom2/blob/d7c3c2835017ad64cd07b5126b129b23f028478a/libcouple/src/accessom2.F90#L837 which had been https://github.com/COSIMA/libaccessom2/blob/4198e1507a39eb4b051b3751a7e13634c7804516/libcouple/src/accessom2.F90#L837

I'll revert this line and see if it fixes this problem

aekiss commented 4 years ago

@aidanheerdegen was there a reason for this change?

aidanheerdegen commented 4 years ago

I changed it because

inquire(directory=

is not standard fortran, so would not compile correctly with gfortran in the CI. I thought I had checked the functionality was the same, but clearly not. Thanks for finding it. I'll take another look and see if there is a compatible code change.

aekiss commented 4 years ago

I've confirmed that reverting this line fixes the problem, so I'll merge the PR for https://github.com/COSIMA/libaccessom2/commit/d99f9c05144d06a7ca7d2d66d49cb4ebe1b62ebe

aidanheerdegen commented 4 years ago

Reverting the change breaks the gfortran CI tests. I'll work up a solution and make another PR

https://travis-ci.org/github/COSIMA/libaccessom2/jobs/696282759#L4114