Rename internal ESMF time-manager library to libesmf_time in CMake builds - #1506
Merged
Merged
Conversation
jim-p-w
reviewed
Aug 28, 2026
jim-p-w
reviewed
Aug 28, 2026
jim-p-w
approved these changes
Aug 28, 2026
jim-p-w
left a comment
Contributor
There was a problem hiding this comment.
Looks good. Thanks for finding this bug!
Author
|
Anything blocking this merge? |
Contributor
|
@eap I think we can target the |
The library built from src/external/esmf_time_f90 contains MPAS's bundled
ESMF time-manager stubs, not the full ESMF. Naming the output file libesmf
lets the dynamic loader substitute a real ESMF library found via
LD_LIBRARY_PATH, which breaks every MPAS executable.
Set the target's OUTPUT_NAME to esmf_time so the library is built and
installed as libesmf_time.{so,a}, resolving the name conflict. The CMake
target and alias names are unchanged.
eap
force-pushed
the
bugfix/external-esmf-fix
branch
from
September 2, 2026 21:27
2309e70 to
4927a8b
Compare
Author
|
@mgduda - I updated the base branch and re-targeted the PR; this pull request is now targeting the |
Contributor
mgduda
added a commit
that referenced
this pull request
Sep 4, 2026
This merge addresses several issues in the MPAS-Atmosphere model and in the MPAS infrastructure. Specific changes include: * Fix an issue with the naming of MPAS's internal ESMF time-keeping library in CMake builds of MPAS. (PR #1506) * Fix an issue with restart runs in MPAS-Atmosphere on GPUs. (PR #1503) * Address a lack of TKE in MPAS-Atmosphere with the 1.5-order prognostic TKE option when there is no TKE in the initial conditions (for example, in real-data cases). (PR #1499) * Correct the ordering of the 'lbc_ni' and 'lbc_nr' scalars in the atmosphere core's Registry.xml file. Note that unless LBCs are provided for 'ni' and 'nr', the previously incorrect order of 'lbc_ni' and 'lbc_nr' would not affect results, as both fields would be filled with zero values. (PR #1498) * Change the default value of the config_number_of_sub_steps namelist option from 2 to 4 in the atmosphere core's Registry.xml file to address an issue in convection-permitting simulations where noise can sometimes appear in the jet streams using the previous default value of 2. The noise, when present, also produces unphysical features in horizontal kinetic energy spectra at high wavenumbers. (PR #1496) Note: Increasing the number of sub-steps from 2 to 4 can be expected to increase the computational cost of the dynamics by ~10% and the computational cost of a full-physics simulation by ~5%. * Work around an issue with continuation lines in instances of the PACKAGE_LOGIC_PRINT macro that prevented successful compilation of MPAS-Atmosphere with the 'nvfortran' compiler. (PR #1495) * hotfix-v8.4.2: Rename bundled ESMF time-manager library output to esmf_time Fix for GPU-enabled restart runs Correct order of lbc_ni and lbc_nr in the atmosphere core's Registry.xml file add minimum value for Kh and Kv to allow for zero initial tke Change default value of atmosphere core config_number_of_sub_steps from 2 to 4 Work around nvfortran issue with continuation lines in PACKAGE_LOGIC_PRINT macro Update version number to 8.4.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
MPAS ships its own small ESMF time manager under src/external/esmf_time_f90. It isn't ESMF, it's a handful of stub routines that provide the clock and calendar interface MPAS needs. Until now it was built into a file called libesmf.so (or libesmf.a), which is exactly the name the real Earth System Modeling Framework uses.
This isn't a problem unless MPAS-model is built in an environment with the full ESMF library and other components dependent on it. When that happens there are two different files named libesmf.so causing conflicts either in MPAS or elsewhere. Usuaally get a bunch of lines like this
This PR gives the MPAS-model library a unique name;
esmf_timeto prevent the conflict.MPAS::external::esmf.Once this is accepted into develop I'll make a cherry pick for the 8.4.2 hotfix branch so it can get added to the 8.4.2 release.
Fixes: https://github.com/JCSDA-internal/mpas-jedi/issues/919