Skip to content

Don't process trigraphs with the XL compilers#199

Merged
mgduda merged 1 commit intoMPAS-Dev:developfrom
mgduda:framework/xl_no_trigraphs
Apr 9, 2019
Merged

Don't process trigraphs with the XL compilers#199
mgduda merged 1 commit intoMPAS-Dev:developfrom
mgduda:framework/xl_no_trigraphs

Conversation

@mgduda
Copy link
Copy Markdown
Contributor

@mgduda mgduda commented Apr 4, 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.

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.
@mgduda
Copy link
Copy Markdown
Contributor Author

mgduda commented Apr 4, 2019

@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.

Copy link
Copy Markdown
Contributor

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual check, passes ocean nightly regression suite.

@mgduda mgduda merged commit e13f285 into MPAS-Dev:develop Apr 9, 2019
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
@mgduda mgduda deleted the framework/xl_no_trigraphs branch April 9, 2019 19:57
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
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.

3 participants