Set io_type in MPAS streams based on PIO_TYPENAME from the CIME settings#7502
Set io_type in MPAS streams based on PIO_TYPENAME from the CIME settings#7502
Conversation
Replace hard-coded pnetcdf or netcdf values in streams.ocean and streams.seaice with ocn_pio_typename or ice_pio_typename from the CIME settings.
|
@dqwu : Did you also verify that this change does not negatively impact MPAS standalone builds/runs? |
Add support for adios and adiosc mesh I/O types to ensure they are recognized correctly instead of defaulting to pnetcdf.
|
@jonbob We probably need something like the pseudocode below. |
|
I will define pio_netcdf_format in the build scripts, like: |
Set io_type to 'pnetcdf,cdf5' when PIO_TYPENAME is 'pnetcdf' and PIO_NETCDF_FORMAT is '64bit_data'. Otherwise, use the standard PIO_TYPENAME value.
|
@jonbob PIO_NETCDF_FORMAT is now taken into account to set io_type to either "pnetcdf,cdf5" or "pnetcdf" in MPAS streams. |
|
@dqwu -- I asked Matt and Mark to review this as well, since they work with the standalone models more and can test to make sure these changes don't impact their work |
|
I don't see anything here that will affect standalone MALI. Until recently we did not have a compass build environment for standalone MALI that supports ADIOS, but that was resolved with a new compass env a few days ago (MPAS-Dev/compass#908), so I can test out that new environment and this PR at the same time. |
|
Should we add lines like to the MALI streams as part of this PR? MALI streams currently do not have that included, and I think all the MALI streams are written with the MPAS default io_type. It's not urgent as MALI is not active in any current production simulation campaigns, but this might be the time to do it. Let me know if you would like me to add that. (Or @dqwu you are welcome to add it if you prefer) |
|
@jonbob, are you in a good position to run a test with the new high res (RRS) mesh to make sure no harm is done by removing all those: conditions? As @rljacob says, this should be the default now. But let's just make sure nothing got broken. |
xylar
left a comment
There was a problem hiding this comment.
The changes look reasonable to me. Thanks @dqwu for taking care of this.
I ran:
./create_test --wait --walltime=1:00:00 "e3sm_cryo_developer"
and all tests passed.
I also ran the Polaris pr test suite after building MPAS-Ocean with this branch.
All tests passed.
|
I'm running a HR test of this PR on chrysalis: where I specify The first run in that test is successful but the second one (restart) fails with: That stream does say it's using adios, but maybe the issue is with the append clobber mode? |
|
Its certainly the attempt to append that history file in the second run. You could get around by disabling that file or forcing it to close at the end of simulated day. You would need to do that for any other history that gets appended over the course of the ERS test. Or you could try the SCORPIO option that allows history to stay in pnetcdf format. |
mark-petersen
left a comment
There was a problem hiding this comment.
Tested stand-alone MPAS-O with gnu (debug and optimized) on perlmutter. Passes compass nightly test suite for all cases.
|
@jonbob |
|
Thanks, @dqwu. Can you tell me what should work for an HR test? Do I expect atm and lnd to be OK with adios? Or should I only be testing ocn and ice? |
|
Run the ERS you were trying but with that additional xmlchange. You should be able to apply it in the testcasedir and then just do "./case.submit". For that test, there is no land or atm history output but if there was, you would still need to add that xmlchange. ADIOS-format restarts work fine for all models. It also works for all output files provided they never need appending (but most of E3SM's output files need appending). |
|
ERS.ne120pg2_r025_RRSwISC6to18E3r5.WCYCL1850NS.chrysalis_intel passed with and changing the highFrequencyOutput clobber_mode to "truncate". |
jonbob
left a comment
There was a problem hiding this comment.
Approved based on testing and visual inspection
cool. Didn't know you could do that. PIO_TYPENAME sets the type for all output--restart and history. The "-DSPIO_OVERRIDE_ADIOS_WITH_PNETCDF_FNAME_REGEX" option will override PIO_TYPENAME and force it to PNetCDF for whatever matches the regex. We plan to also add a PIO_TYPENAME_RESTART so you can specify history and restart types directly as you did above which would be more robust then a regex. |
|
@dqwu , should we make corresponding changes for the MALI streams? Other than that question, I don't have any concerns about this PR from the MALI side. |
|
I'd say "yes" for MALI just to get this issue fixed across MPAS. |
|
@matthewhoffman and @dqwu -- who should take that on? It doesn't look too difficult if it makes sense for me to do it |
|
Please do, @jonbob |
|
@jonbob , that would be great if you're happy to do it! |
|
Note: this will be ready to merge next week when Jon is back. |
Set io_type in MPAS streams based on PIO_TYPENAME from the CIME settings Update the build scripts for streams.ocean, streams.seaice and streams.landice to set the io_type using ocn_pio_typename, ice_pio_typename, or glc_pio_typename, respectively. This resolves an issue where MPAS output files did not always follow the PIO_TYPENAME specified in the CIME settings. Also handle ADIOS mesh I/O types in MPAS framework. Fixes #7494 [BFB]
|
Passes:
Also passes the last test with PIO_TYPENAME set to "adios" for cpl, ocn, glc and ice (and changing the ocn highFrequencyOutput clobber_mode to "truncate") Merged to next |
|
merged to master |
Update the build scripts for streams.ocean and streams.seaice to set
the io_type using ocn_pio_typename or ice_pio_typename, respectively.
This resolves an issue where MPAS output files did not always
follow the PIO_TYPENAME specified in the CIME settings.
Also handle ADIOS mesh I/O types in MPAS framework.
Fixes #7494
[BFB]