Work around nvfortran issue with continuation lines in PACKAGE_LOGIC_PRINT macro#1495
Open
mgduda wants to merge 1 commit into
Open
Work around nvfortran issue with continuation lines in PACKAGE_LOGIC_PRINT macro#1495mgduda wants to merge 1 commit into
mgduda wants to merge 1 commit into
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.
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.