-
Notifications
You must be signed in to change notification settings - Fork 317
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
LILAC test failing in ctsm5.1.dev095 with cime/share/pio update #1759
Comments
Applying similar changes that went into CMEPS I was able to get it to build at this point, but it doesn't run yet. |
@ekluzek In cmeps we moved the pio input parameters from namelists to nuopc.runconfig |
Thanks a lot for your reply to this @jedwards4b . We don't use NUOPC in LILAC (we use non-NUOPC-based ESMF) so the implementation will need to differ... hopefully it will still be doable.... |
You use ESMF but not NUOPC? strange. Another approach might be to change the FilePath to use the older version of shr_pio_mod from the share directory. |
ESCOMP/CESM_share#33 |
Turns out this also requires a modification to nuopc_shr_methods.F90 removing shr_pio_log_comp_settings But I have more extensive changes to the pio interface in cmeps branch (in my fork) jedwards/asyncio |
I put this back as next so we can figure out when it may be fixed? |
@wwieder I had talked with @billsacks about it before he left on vacation. We thought it would be best to wait until he got back and have him work on it. If needed @negin513 or I could work on it, but @billsacks will likely be able to fix it quicker. |
I have discussed this further with @jedwards4b (via discussion in ESCOMP/CESM_share#33) and @mvertens. Motivating points are:
Given these points, it feels like we'll need to maintain our own version of
@ekluzek @jedwards4b @mvertens let me know if you have any thoughts on this plan. If people approve, then I will move forward with it next week. |
I think I understand and I think it makes sense. Let me repeat to make sure I've got it. They'll be three versions fo ctsm_shr_pio_mod.F90 1.) NUOPC version that's a wrapper to the shr_pio_mod.F90 version in CMEPS. It's a bit of a pain to have our own copy, but I don't see a way around it either. Maintaining the wrapper for NUOPC won't be a big deal though. |
Yes, that's right; thanks for the summary @ekluzek. In general, I imagine that the file for (3) will only need to change if we want to support new PIO features in LILAC operations; I'm not sure how often that will be the case. I'll give others (@jedwards4b @mvertens ) a little more time to chime in if they have any thoughts objections; if I haven't heard any, I'll move forward with this plan. |
We need different versions of the PIO interface module depending on which driver we're using (NUOPC, MCT, or LILAC). For NUOPC and MCT, we simply need to wrap the shr_pio_mod that comes from an external. (This comes from the share library for MCT and from CMEPS for NUOPC.) For LILAC, we cannot use the NUOPC-dependent version of shr_pio_mod. We are currently using the same version of shr_pio_mod as is used for an MCT-based build. However, since that version will likely be removed soon (once the MCT-based build is no longer supported), we are maintaining our own copy of this file. This file is currently effectively identical to share/src/shr_pio_mod.F90, except (1) the module name has been changed to ctsm_shr_pio_mod (rather than shr_pio_mod), and (2) a descriptive comment was added at the top. See ESCOMP#1759 (comment) for additional details. Resolves ESCOMP#1759
More changes needed for ESCOMP#1759 Some of these are necessary fixes that should have been included in the previous commit. In addition, Erik Kluzek suggested renaming the shr_pio routines to ctsm_shr_pio for consistency with the module names.
Well, shoot, I don't think my plan in #1759 (comment) is going to work: the LILAC test fails at runtime in some code that is invoking CDEPS. In retrospect that makes sense: CDEPS also uses shr_pio_mod, and with my plan, the variables in the actual shr_pio_mod never get initialized with LILAC (only those in the new ctsm_shr_pio_mod get initialized). So I think we'll need to go with @jedwards4b 's initial proposal (ESCOMP/CESM_share#33 (comment)) after all. |
Will that work? Lilac uses cdeps and cdeps uses nuopc and the nuopc version of shr_pio_mod. I'm not sure you can use both at once? |
Will CDEPS only work with the nuopc version of shr_pio_mod? Based on the use statements in CDEPS (shr_pio_getiosys, shr_pio_getiotype, shr_pio_getioformat), it looks like it just needs to access some settings that – at a glance – are equivalent between the nuopc and non-nuopc versions of shr_pio_mod. But are there some subtle or implicit dependencies of CDEPS on the nuopc version of this module? More broadly, it looks like there are two aspects to shr_pio_mod: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information It looks like (1) is only used by the driver and now – given the changes from a few months ago – is driver-specific. Piece (2) is the piece that actually needs to be shared between different components and – from a quick look – seems to be effectively identical between the NUOPC and non-NUOPC versions. This leads me to another idea for how we could handle this LILAC issue: We could separate these two pieces into two different files. Piece (2) would live in the share code and would be used regardless of the driver. Piece (1) would be driver-specific, so for now we would have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from I feel like this design would make it less likely that we would run into future problems with LILAC in this respect – by clearly separating the shared pieces of this module from the driver-specific pieces. I'm on the fence, though, about whether it's worth the extra day or so of time that I think it would take to put this in place and do the necessary testing. @mvertens @ekluzek @jedwards4b let me know if you have feelings on this. Of course, neither of these solutions will work if CDEPS truly depends on the NUOPC version of shr_pio_mod, so @jedwards4b I would like to hear if there are issues you're aware of that I may not be seeing. |
I spent a couple of hours doing the separation/consolidation I proposed in my last comment. I haven't tested yet, so I shouldn't say anything, but with that (major) caveat, I'll cautiously say that I think I have managed to do this to first order. I need to wrap up for the night, but I can show it to people tomorrow and you can let me know if you think this is a good path forward. |
tl;dr of this comment: I discussed an alternative approach with @mvertens and @jedwards4b that would allow us to use the existing I talked about this yesterday with @mvertens and @jedwards4b . A third possible implementation emerged from this discussion: It seems possible to use the recent NUOPC-based (a) Set the required PIO settings as attributes on various ESMF components. For a PIO setting (b) Rework the A benefit of doing this is that, as new PIO features are introduced in NUOPC's (1) I believe there will be a greater long-term maintenance cost of trying to reuse (2) The NUOPC (3) This approach uses what I believe is an undocumented translation between (4) This approach relies on LILAC being the one to initialize PIO. If the host model uses PIO, I can envision a situation where the host model would want to use its own logic for initializing the PIO subsystem for the land. I think this would be hard to make work if we are trying to reuse NUOPC's What this really boils down to is a question of whether we want to keep LILAC's PIO initialization closely tied to that of CESM or allow it to diverge. There are costs and benefits of both, but I believe that we'll be better off long-term allowing it to diverge. Stepping back from LILAC and considering the bigger picture of the architecture, I can also see the potential for my previous proposal – i.e., splitting |
Extract non-initialization parts of shr_pio_mod to a module in share ### Description of changes Extract the non-initialization parts of shr_pio_mod to a module in the share repository, just keeping the initialization parts here. This is part of a set of changes where I am splitting shr_pio_mod into two pieces: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information Piece (2) lives in the share code and is used regardless of the driver. Piece (1) is driver-specific, so for now we have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from `cmeps/cesm/nuopc_cap_share/shr_pio_mod.F90`), one in the cpl7 repo (created by extracting the initialization pieces from `share/src/shr_pio_mod.F90`), and one in CTSM's LILAC directory (which is essentially identical to the one in the cpl7 repo). Piece (2) – the actual share code piece – is used by components (their use statements stay exactly as they are now) as well as by piece (1) (which is responsible for setting the module-level variables in piece (2)). See ESCOMP/CTSM#1759 (comment) for more context. Needs to be coordinated with ESCOMP/CESM_share#34 ### Specific notes Contributors other than yourself, if any: Discussions with @jedwards4b @mvertens CMEPS Issues Fixed (include github issue #): none Are changes expected to change answers? no Any User Interface Changes (namelist or namelist defaults changes)? no ### Testing performed **Only limited testing performed so far; I plan to run CESM prealpha testing. Please let me know if you'd like more than that (I'm uncertain about whether scripts_regression_tests and testlist_drv give additional value if I'm already running prealpha testing).** Testing performed if application target is CESM: - [ ] (recommended) CIME_DRIVER=nuopc scripts_regression_tests.py - machines: - details (e.g. failed tests): - [ ] (recommended) CESM testlist_drv.xml - machines and compilers: - details (e.g. failed tests): - [x] (optional) CESM prealpha test - machines and compilers: cheyenne intel & gnu - details (e.g. failed tests): tests pass and are bit-for-bit - [x] (other) please described in detail: the following tests pass ``` ERP_D_Ld10_P36x2_Vmct.f10_f10_mg37.IHistClm51BgcCrop.cheyenne_intel.clm-ciso_decStart ERP_D_P36x2_Ld3.f10_f10_mg37.I1850Clm50BgcCrop.cheyenne_intel.clm-default LILACSMOKE_D_Ld2.f10_f10_mg37.I2000Ctsm50NwpSpAsRs.cheyenne_intel.clm-lilac ``` Testing performed if application target is UFS-coupled: - [ ] (recommended) UFS-coupled testing - description: - details (e.g. failed tests): Testing performed if application target is UFS-HAFS: - [ ] (recommended) UFS-HAFS testing - description: - details (e.g. failed tests): ### Hashes used for testing: - [x] CESM prealpha tests: - repository to check out: https://github.com/ESCOMP/CESM.git - branch/hash: cesm2_3_alpha09c, but with: cmeps at 1f8ce13, cpl7 at 15c5d5ce45a9db320b1448e5c29d9892fc57e046 and share at d7c43983b8d84abfc357fa112870bc50b3b60d60 (all from billsacks forks) - [x] For the other tests described above: - repository to check out: https://github.com/billsacks/CTSM.git - branch/hash: branch fix_lilac_pio2, hash 2ead6826d - [ ] UFS-coupled, then umbrella repostiory to check out and associated hash: - repository to check out: - branch/hash: - [ ] UFS-HAFS, then umbrella repostiory to check out and associated hash: - repository to check out: - branch/hash:
Introduce init_pio_mod with the initialization pieces from shr_pio_mod This PR introduces an init_pio_mod that contains just the initialization pieces from shr_pio_mod (from the share repository). This is part of a set of changes where I am splitting shr_pio_mod into two pieces: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information Piece (2) lives in the share code and is used regardless of the driver. Piece (1) is driver-specific, so for now we have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from `cmeps/cesm/nuopc_cap_share/shr_pio_mod.F90`), one in the cpl7 repo (created by extracting the initialization pieces from `share/src/shr_pio_mod.F90`), and one in CTSM's LILAC directory (which is essentially identical to the one in the cpl7 repo). Piece (2) – the actual share code piece – is used by components (their use statements stay exactly as they are now) as well as by piece (1) (which is responsible for setting the module-level variables in piece (2)). See ESCOMP/CTSM#1759 (comment) for more context. Needs to be coordinated with ESCOMP/CESM_share#34 . See also the related PR for CMEPS: ESCOMP/CMEPS#306
Remove pio initialization routines from shr_pio_mod This is part of a set of changes where I am splitting shr_pio_mod into two pieces: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information Piece (2) lives in the share code and is used regardless of the driver. Piece (1) is driver-specific, so for now we have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from `cmeps/cesm/nuopc_cap_share/shr_pio_mod.F90`), one in the cpl7 repo (created by extracting the initialization pieces from `share/src/shr_pio_mod.F90`), and one in CTSM's LILAC directory (which is essentially identical to the one in the cpl7 repo). Piece (2) – the actual share code piece – is used by components (their use statements stay exactly as they are now) as well as by piece (1) (which is responsible for setting the module-level variables in piece (2)). See ESCOMP/CTSM#1759 (comment) for more context. Needs to be coordinated with cmeps and cpl7 branches where I am introducing new init_pio_mod modules.
Remove pio initialization routines from shr_pio_mod This is part of a set of changes where I am splitting shr_pio_mod into two pieces: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information Piece (2) lives in the share code and is used regardless of the driver. Piece (1) is driver-specific, so for now we have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from `cmeps/cesm/nuopc_cap_share/shr_pio_mod.F90`), one in the cpl7 repo (created by extracting the initialization pieces from `share/src/shr_pio_mod.F90`), and one in CTSM's LILAC directory (which is essentially identical to the one in the cpl7 repo). Piece (2) – the actual share code piece – is used by components (their use statements stay exactly as they are now) as well as by piece (1) (which is responsible for setting the module-level variables in piece (2)). See ESCOMP/CTSM#1759 (comment) for more context. Needs to be coordinated with cmeps and cpl7 branches where I am introducing new init_pio_mod modules.
Extract non-initialization parts of shr_pio_mod to a module in share ### Description of changes Extract the non-initialization parts of shr_pio_mod to a module in the share repository, just keeping the initialization parts here. This is part of a set of changes where I am splitting shr_pio_mod into two pieces: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information Piece (2) lives in the share code and is used regardless of the driver. Piece (1) is driver-specific, so for now we have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from `cmeps/src/shr_pio_mod.F90`), one in the cpl7 repo (created by extracting the initialization pieces from `share/src/shr_pio_mod.F90`), and one in CTSM's LILAC directory (which is essentially identical to the one in the cpl7 repo). Piece (2) – the actual share code piece – is used by components (their use statements stay exactly as they are now) as well as by piece (1) (which is responsible for setting the module-level variables in piece (2)). See ESCOMP/CTSM#1759 (comment) for more context. Needs to be coordinated with ESCOMP#34 ### Specific notes Contributors other than yourself, if any: Discussions with @jedwards4b @mvertens CMEPS Issues Fixed (include github issue #): none Are changes expected to change answers? no Any User Interface Changes (namelist or namelist defaults changes)? no ### Testing performed **Only limited testing performed so far; I plan to run CESM prealpha testing. Please let me know if you'd like more than that (I'm uncertain about whether scripts_regression_tests and testlist_drv give additional value if I'm already running prealpha testing).** Testing performed if application target is CESM: - [ ] (recommended) CIME_DRIVER=nuopc scripts_regression_tests.py - machines: - details (e.g. failed tests): - [ ] (recommended) CESM testlist_drv.xml - machines and compilers: - details (e.g. failed tests): - [x] (optional) CESM prealpha test - machines and compilers: cheyenne intel & gnu - details (e.g. failed tests): tests pass and are bit-for-bit - [x] (other) please described in detail: the following tests pass ``` ERP_D_Ld10_P36x2_Vmct.f10_f10_mg37.IHistClm51BgcCrop.cheyenne_intel.clm-ciso_decStart ERP_D_P36x2_Ld3.f10_f10_mg37.I1850Clm50BgcCrop.cheyenne_intel.clm-default LILACSMOKE_D_Ld2.f10_f10_mg37.I2000Ctsm50NwpSpAsRs.cheyenne_intel.clm-lilac ``` Testing performed if application target is UFS-coupled: - [ ] (recommended) UFS-coupled testing - description: - details (e.g. failed tests): Testing performed if application target is UFS-HAFS: - [ ] (recommended) UFS-HAFS testing - description: - details (e.g. failed tests): ### Hashes used for testing: - [x] CESM prealpha tests: - repository to check out: https://github.com/ESCOMP/CESM.git - branch/hash: cesm2_3_alpha09c, but with: cmeps at 1f8ce1304a7c0939cbc4584e1b5afa5165821fb6, cpl7 at 15c5d5ce45a9db320b1448e5c29d9892fc57e046 and share at d7c4398 (all from billsacks forks) - [x] For the other tests described above: - repository to check out: https://github.com/billsacks/CTSM.git - branch/hash: branch fix_lilac_pio2, hash 2ead6826d - [ ] UFS-coupled, then umbrella repostiory to check out and associated hash: - repository to check out: - branch/hash: - [ ] UFS-HAFS, then umbrella repostiory to check out and associated hash: - repository to check out: - branch/hash:
Extract non-initialization parts of shr_pio_mod to a module in share ### Description of changes Extract the non-initialization parts of shr_pio_mod to a module in the share repository, just keeping the initialization parts here. This is part of a set of changes where I am splitting shr_pio_mod into two pieces: (1) Reading configuration files and initializing PIO appropriately (2) Storing information about PIO (io system descriptors, io types, io formats) and providing an interface to query this information Piece (2) lives in the share code and is used regardless of the driver. Piece (1) is driver-specific, so for now we have three versions of that piece: one in CMEPS (created by extracting the initialization pieces from `cmeps/share/shr_pio_mod.F90`), one in the cpl7 repo (created by extracting the initialization pieces from `share/share/shr_pio_mod.F90`), and one in CTSM's LILAC directory (which is essentially identical to the one in the cpl7 repo). Piece (2) – the actual share code piece – is used by components (their use statements stay exactly as they are now) as well as by piece (1) (which is responsible for setting the module-level variables in piece (2)). See ESCOMP/CTSM#1759 (comment) for more context. Needs to be coordinated with ESCOMP/CESM_share#34 ### Specific notes Contributors other than yourself, if any: Discussions with @jedwards4b @mvertens CMEPS Issues Fixed (include github issue #): none Are changes expected to change answers? no Any User Interface Changes (namelist or namelist defaults changes)? no ### Testing performed **Only limited testing performed so far; I plan to run CESM prealpha testing. Please let me know if you'd like more than that (I'm uncertain about whether scripts_regression_tests and testlist_drv give additional value if I'm already running prealpha testing).** Testing performed if application target is CESM: - [ ] (recommended) CIME_DRIVER=nuopc scripts_regression_tests.py - machines: - details (e.g. failed tests): - [ ] (recommended) CESM testlist_drv.xml - machines and compilers: - details (e.g. failed tests): - [x] (optional) CESM prealpha test - machines and compilers: cheyenne intel & gnu - details (e.g. failed tests): tests pass and are bit-for-bit - [x] (other) please described in detail: the following tests pass ``` ERP_D_Ld10_P36x2_Vmct.f10_f10_mg37.IHistClm51BgcCrop.cheyenne_intel.clm-ciso_decStart ERP_D_P36x2_Ld3.f10_f10_mg37.I1850Clm50BgcCrop.cheyenne_intel.clm-default LILACSMOKE_D_Ld2.f10_f10_mg37.I2000Ctsm50NwpSpAsRs.cheyenne_intel.clm-lilac ``` Testing performed if application target is UFS-coupled: - [ ] (recommended) UFS-coupled testing - description: - details (e.g. failed tests): Testing performed if application target is UFS-HAFS: - [ ] (recommended) UFS-HAFS testing - description: - details (e.g. failed tests): ### Hashes used for testing: - [x] CESM prealpha tests: - repository to check out: https://github.com/ESCOMP/CESM.git - branch/hash: cesm2_3_alpha09c, but with: cmeps at 1f8ce13, cpl7 at 15c5d5ce45a9db320b1448e5c29d9892fc57e046 and share at d7c43983b8d84abfc357fa112870bc50b3b60d60 (all from billsacks forks) - [x] For the other tests described above: - repository to check out: https://github.com/billsacks/CTSM.git - branch/hash: branch fix_lilac_pio2, hash 2ead6826d - [ ] UFS-coupled, then umbrella repostiory to check out and associated hash: - repository to check out: - branch/hash: - [ ] UFS-HAFS, then umbrella repostiory to check out and associated hash: - repository to check out: - branch/hash:
Brief summary of bug
LILACSMOKE test fails
General bug information
CTSM version you are using: ctsm5.1.dev096
Does this bug cause significantly incorrect results in the model's science? No
Configurations affected: o
LILACSMOKE_D_Ld2.f10_f10_mg37.I2000Ctsm50NwpSpAsRs.cheyenne_intel.clm-lilac Fails
Details of bug
Build fails. It looks like it's due to the shr_pio_init1 and shr_pio_init2 interfaces.
I don't get why this happens with the latest cime update and doesn't show up in the ctsm5.1.dev095 tag.
The text was updated successfully, but these errors were encountered: