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

Support for enabling optional MPAS features through CIME #351

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

kuanchihwang
Copy link
Collaborator

@kuanchihwang kuanchihwang commented Jan 17, 2025

Tag name (required for release branches):

None

Originator(s):

kuanchihwang

Descriptions (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

This PR refactors the build system of MPAS dycore. Build performance has been improved. PIO version selection is now more robust. The availability of optional MPAS features is now determined by querying relevant configuration options from CIME rather than being hard-coded.

MPAS dycore is in double precision mode by default. Users can choose to enable single precision mode by running:

./xmlchange --append CAM_CONFIG_OPTS="--dyn_kind REAL32"

Closes #347.

Describe any changes made to the build system:

See above.

Describe any changes made to the namelist:

None

List any changes to the defaults for the input datasets (e.g., boundary datasets):

None

List all files eliminated and why:

None

List all files added and what they do:

None

List all existing files that have been modified, and describe the changes:

  • M cime_config/buildlib
    • Support for enabling optional MPAS features through CIME
    • Remove trailing spaces
  • M src/dynamics/mpas/assets/Makefile.in.CESM
    • Avoid using recursively expanded variables
    • Make PIO version selection more robust
    • Support for enabling optional MPAS features through CIME

Regression tests:

No changes to any existing tests. All tests pass with respect to the last baseline, sima0_01_001.

Avoid using recursively expanded variables due to performance reasons.
Instead, use simply expanded variables where possible.
The `USE_PIO2` macro is an implementation detail of MPAS. We should not
let CIME to set it for us, and CIME really should not have included
that logic in the first place.

When CIME invokes its Makefile, `PIO_VERSION` is always supplied as a
command line argument. Therefore, we can reliably use it to determine
if the `USE_PIO2` macro should be set.
Query relevant configuration options from CIME, and determine if
certain optional MPAS features can be enabled.
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @kuanchihwang!

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