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

Move file parser inquire calls to root PE #419

Merged

Commits on Aug 5, 2023

  1. Move file parser inquire calls to root PE

    MOM_file_parser's open_param_file() contains explicit inquire() calls
    when assessing the correctness of opening such a file.  As written,
    these could be called by any rank, and are not thread safe.  In rare
    cases (usually related to testing), this would cause a race condition
    and raise an error.
    
    Even ignoring the errors, it is probably better if only one rank makes
    these calls, rather than all of them.
    
    The following patch modifies the function so that only root PE invokes
    inquire().
    
    There is not much to celebrate about this patch; it does not try to
    clean up the intrinsic weirdness of the IO handling.  But it does appear
    to fix some of the most apparent problems.
    marshallward authored and Hallberg-NOAA committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    45bf529 View commit details
    Browse the repository at this point in the history