Skip to content
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

Introduce init_pio_mod with the initialization pieces from shr_pio_mod #16

Merged
merged 2 commits into from
Jul 8, 2022

Conversation

billsacks
Copy link
Member

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

This allows shr_pio_mod to be shared between drivers.

Needs to be coordinated with a CESM_share branch
Copy link
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if driver_pio would be better than init_pio? So
driver_pio_init1, driver_pio_init2, driver_pio_finalize instead of the awkward
init_pio_init1 and init_pio_finalize?

@billsacks
Copy link
Member Author

I wonder if driver_pio would be better than init_pio?

Sounds good. I'll make this change in the relevant places.

I see that SRT is failing. I think it's because it's grabbing the latest master branch from dependent repos rather than grabbing the interdependent branches. Do you have suggestions for how to handle this? (Or do we just let SRT fail here?)

@jedwards4b
Copy link
Contributor

I would say just run srt locally and make sure it passes.

billsacks added a commit to billsacks/CMEPS that referenced this pull request Jul 5, 2022
As per Jim Edwards
suggestion (ESCOMP#16 (review))
billsacks added a commit to billsacks/ctsm that referenced this pull request Jul 5, 2022
@billsacks
Copy link
Member Author

I would say just run srt locally and make sure it passes.

I'm trying to figure out how to do this. Is the procedure documented somewhere? I think I can see how to do this from a cime-centric standpoint: get the latest cime, run checkout_externals to get the various externals set up, then change the versions of externals, then run 'pytest -vvv' from the top-level cime directory. Is that how you would do this, or is there a better method for running srt locally on these various repositories?

@billsacks
Copy link
Member Author

Actually, I'm having trouble getting pytest -vvv off the ground on cheyenne. I think I need some step-by-step instructions for dummies, including how to get the environment (python version, etc.) set up appropriately for this now.

@billsacks
Copy link
Member Author

I have run CESM prealpha testing on these changes. All tests pass other than those that failed in the baseline as well. @jedwards4b let me know if you'd like me to do any other testing – and if you'd like me to do the srt testing by hand, please help me with exactly how to do that.

@billsacks billsacks merged commit ce5b9d9 into ESCOMP:main Jul 8, 2022
@billsacks billsacks deleted the fix_lilac_pio2 branch July 8, 2022 17:50
billsacks added a commit to ESCOMP/CTSM that referenced this pull request Jul 11, 2022
Fix LILAC interface to PIO

Fixes the LILAC interface to PIO.

This involved 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
#1759 (comment) for
more context.

Much of the work here was in externals:
ESCOMP/CESM_share#34,
ESCOMP/CMEPS#306 and
ESCOMP/CESM_CPL7andDataComps#16. So this PR
updates those externals to versions with those changes. In addition,
changes were needed within LILAC - to implement the LILAC version of
piece (1) described above.

Resolves #1759 (LILAC test failing in ctsm5.1.dev095 with
cime/share/pio update)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants