Skip to content

Work around nvfortran issue with continuation lines in PACKAGE_LOGIC_PRINT macro#1495

Open
mgduda wants to merge 1 commit into
MPAS-Dev:hotfix-v8.4.2from
mgduda:framework/workaround_nhvpc_macro_issue
Open

Work around nvfortran issue with continuation lines in PACKAGE_LOGIC_PRINT macro#1495
mgduda wants to merge 1 commit into
MPAS-Dev:hotfix-v8.4.2from
mgduda:framework/workaround_nhvpc_macro_issue

Conversation

@mgduda

@mgduda mgduda commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

This PR modifies the Registry code generation to work around an issue with continuation lines in instances of the PACKAGE_LOGIC_PRINT macro when building with the nvfortran compiler.

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 PR avoids continuation lines with the PACKAGE_LOGIC_PRINT macro only when building with the nvfortran or pgf90 compilers (or, more generally, when the CPRPGI macro is defined). 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.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant