Work around nvfortran issue with continuation lines in PACKAGE_LOGIC_PRINT macro - #1495
Merged
mgduda merged 1 commit intoJul 28, 2026
Conversation
…PRINT macro Registry-generated code in setup_packages.inc (generated by the gen_pkg_debug_info registry function in gen_inc.c) may contain continuation lines in the invocation of the PACKAGE_LOGIC_PRINT macro, and this can lead to compilation failures with the nvfortran compiler. To work around this issue, this commit avoids continuation lines with the PACKAGE_LOGIC_PRINT macro only when compiling with the nvfortran or pgf90 compilers. This may result in source lines longer than 132 columns, but in practice, recent releases of the nvfortran compiler appear to have no problems with any of the source lines generated in the current version of MPAS.
abishekg7
approved these changes
Jul 28, 2026
abishekg7
left a comment
Collaborator
There was a problem hiding this comment.
Looks good!
Successfully builds with nvhpc/26.1 and nvhpc/24.11. Builds with GEN_F90=true work fine after rebasing.
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.
This PR modifies the Registry code generation to work around an issue with continuation lines in instances of the
PACKAGE_LOGIC_PRINTmacro when building with thenvfortrancompiler.Registry-generated code in
setup_packages.inc(generated by thegen_pkg_debug_inforegistry function ingen_inc.c) may contain continuation lines in the invocation of thePACKAGE_LOGIC_PRINTmacro, and this can lead to compilation failures with thenvfortrancompiler. To work around this issue, this PR avoids continuation lines with thePACKAGE_LOGIC_PRINTmacro only when building with thenvfortranorpgf90compilers (or, more generally, when theCPRPGImacro is defined). This may result in source lines longer than 132 columns, but in practice, recent releases of thenvfortrancompiler appear to have no problems with any of the source lines generated in the current version of MPAS.