PIO sync for potentially better robustness for gnu/cray-mpich and a few cleanups #453
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We found that cesm-coupling.n02_v2.1.2 produces the history output problem for the gnu (12.2.0) / mpich (8.1.27) compiled executable. pio_sync was added after writing the history file and this reduces the occurrence of this error (but not completely eliminating this problem). Note: Jim mentioned when netcdf is closed, pio_sync happens so no explict call for pio_sync is needed.
Note: This problem does occur only for the executable compiled with gnu/mpich. gnu/openmpi (5.0.0) and intel/mpich work fine.
Further debugging for gnu/mpich is needed, but at this point, unclear about root cause of the problem. This might be related to #359
Switching netcdf type from
pnetcdf
tonetcdf
clear this problem (for gnu (12.2.0) / mpich (8.1.27)). Therefore, expose thepio_netcdf_type
to user control file. so user can specify netcdf type without re-compiling the code (pio_netcdf_type
was hard-coded aspnetcdf
.)Fixed library (PIO) Makefile bug that cause the compiling error when you use only netCDF and gcc.
Other changes include removing unused variables or routines