Don't process trigraphs with the XL compilers#199
Merged
mgduda merged 1 commit intoMPAS-Dev:developfrom Apr 9, 2019
Merged
Conversation
The XL Fortran compiler invokes the XL C preprocessor, which by default processes trigraphs (https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C). This can cause problems in MPAS code, e.g., if a string '??' appears in a non-comment context in the source, where the ??' characters are turned into a ^ character, leading to an un-terminated character string. To avoid processing of trigraphs, the -qnotrigraph option is passed to the C preprocessor via -WF in the FFLAGS for the XL compiler only. There is apparently no need to add -qnotrigraph to the CPPFLAGS, since the 'cpp' that is invoked when explicitly preprocessing files with GEN_F90=true is the system's C preprocessor, which doesn't process trigraphs.
Contributor
Author
|
@mark-petersen and @matthewhoffman Sorry in advance for the testing load; but, I think it should be reasonable to test PRs #196 #197 #198 and #199 together. |
matthewhoffman
approved these changes
Apr 5, 2019
mark-petersen
approved these changes
Apr 7, 2019
Contributor
mark-petersen
left a comment
There was a problem hiding this comment.
Visual check, passes ocean nightly regression suite.
mgduda
added a commit
that referenced
this pull request
Apr 9, 2019
This merge disables processing of trigraphs with the XL compilers. The XL Fortran compiler invokes the XL C preprocessor, which by default processes trigraphs (https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C). This can cause problems in MPAS code, e.g., if a string '??' appears in a non-comment context in the source, where the ??' characters are turned into a ^ character, leading to an un-terminated character string. To avoid processing of trigraphs, the -qnotrigraph option is passed to the C preprocessor via -WF in the FFLAGS for the XL compiler only. There is apparently no need to add -qnotrigraph to the CPPFLAGS, since the 'cpp' that is invoked when explicitly preprocessing files with GEN_F90=true is the system's C preprocessor, which doesn't process trigraphs. * framework/xl_no_trigraphs: Don't process trigraphs with the XL compilers
mark-petersen
added a commit
that referenced
this pull request
Apr 10, 2019
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: #195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): #191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: #200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: #185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: #196, #197, #198, #199
mark-petersen
added a commit
that referenced
this pull request
Apr 10, 2019
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: #195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): #191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: #200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: #185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: #196, #197, #198, #199
ashwathsv
pushed a commit
to ashwathsv/MPAS-Model
that referenced
this pull request
Jul 21, 2020
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: MPAS-Dev#195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): MPAS-Dev#191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: MPAS-Dev#200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: MPAS-Dev#185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: MPAS-Dev#196, MPAS-Dev#197, MPAS-Dev#198, MPAS-Dev#199
mark-petersen
added a commit
to mark-petersen/MPAS-Model
that referenced
this pull request
Jan 11, 2021
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: MPAS-Dev#195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): MPAS-Dev#191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: MPAS-Dev#200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: MPAS-Dev#185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: MPAS-Dev#196, MPAS-Dev#197, MPAS-Dev#198, MPAS-Dev#199
caozd999
pushed a commit
to caozd999/MPAS-Model
that referenced
this pull request
Jan 14, 2021
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: MPAS-Dev#195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): MPAS-Dev#191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: MPAS-Dev#200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: MPAS-Dev#185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: MPAS-Dev#196, MPAS-Dev#197, MPAS-Dev#198, MPAS-Dev#199
mark-petersen
added a commit
to mark-petersen/MPAS-Model
that referenced
this pull request
Jan 16, 2021
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: MPAS-Dev#195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): MPAS-Dev#191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: MPAS-Dev#200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: MPAS-Dev#185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: MPAS-Dev#196, MPAS-Dev#197, MPAS-Dev#198, MPAS-Dev#199
mark-petersen
added a commit
to mark-petersen/MPAS-Model
that referenced
this pull request
Jan 19, 2021
Updating MPAS framework. This includes: - Rename Makefile.in.ACME to Makefile.in.E3SM: MPAS-Dev#195 - Change Makefile.in.E3SM to standard CESM formatting (TRUE in caps): MPAS-Dev#191 - Add -Uvector to Makefile.in.E3SM to ignore the word 'vector' in comments when using GEN_F90=TRUE: MPAS-Dev#200, fixes #2725 - Fix memory leak due to double allocate, only used by RK4 time stepping, does not change E3SM runs: MPAS-Dev#185 - Changes to atmosphere directories are not used by E3SM. - COMPASS testing updates, not used by E3SM, including python 3 updates. - Fix typos that cause warnings on some compilers: MPAS-Dev#196, MPAS-Dev#197, MPAS-Dev#198, MPAS-Dev#199
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 merge disables processing of trigraphs with the XL compilers.
The XL Fortran compiler invokes the XL C preprocessor, which by default processes
trigraphs (https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C). This can
cause problems in MPAS code, e.g., if a string '??' appears in a non-comment
context in the source, where the ??' characters are turned into a ^ character,
leading to an un-terminated character string.
To avoid processing of trigraphs, the
-qnotrigraphoption is passed to the Cpreprocessor via
-WFin the FFLAGS for the XL compiler only. There is apparentlyno need to add
-qnotrigraphto the CPPFLAGS, since the 'cpp' that is invokedwhen explicitly preprocessing files with
GEN_F90=trueis the system'sC preprocessor, which doesn't process trigraphs.