Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CESM exact restart test fails with gnu #199

Closed
alperaltuntas opened this issue Oct 12, 2021 · 0 comments · Fixed by #234
Closed

CESM exact restart test fails with gnu #199

alperaltuntas opened this issue Oct 12, 2021 · 0 comments · Fixed by #234
Assignees

Comments

@alperaltuntas
Copy link
Member

The exact restart test (ERS) fails when MOM6 gets compiled with gnu in CESM. This issue occurs with gnu but not with intel because of a difference in the implementation of inquire intrinsic. Take the following program:

program foo
  logical :: fexists
  inquire(file='./', exist=fexists)
  print *, fexists
end program

When compiled with gnu, the program prints out T, whereas when compiled with intel, the program prints out F. Simply, gnu (correctly) says that ./ exists, whereas intel says that ./ doesn't exist. This behavioral difference manifests itself in MOM_restart::open_restart_units subroutine. If the restart directory is "./" and filename begins with a whitespace, gnu incorrectly concludes that the filepath for the first* restart file is filepath="./", whereas intel is eventually able to get the correct filepath, since it (incorrectly) knows that ./ doesn't exist. I will implement a correction in the logic of the subroutine and submit a PR once all tests pass.

*there may be multiple restart files in the single character string passed to open_restart_units , and the subroutine gets each restart filename in a do while loop by checking if it encounters a whitespace in between filenames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant