Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information