fix scalar write issue, fix serial build issue #1974
Merged
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.
Scalars were being lost when the model memory usage was close to the limit for the system. So, for example, CESM test SMS_Ln3.ne30pg3_ne30pg3_mg17.FMTHIST_v0d.derecho_intel
with NTASKS=128 and REST_N=3, REST_OPTION=nsteps
writes 0 in scalar fields.
RMS P0 1.0000E+05 NORMALIZED 0.0000E+00
RMS pbuf_time_idx 1.0000E+00 NORMALIZED 0
RMS nextsw_cday 1.0000E+00 NORMALIZED 0.0000E+00
This fixes that by using the same mechanism for scalars as for non-parallel non-scalars.