Skip to content

Commit

Permalink
Merge pull request #2277 from GEOS-ESM/hotfix/tclune/#2274-setattribu…
Browse files Browse the repository at this point in the history
…te-workaround

Fixes #2274
  • Loading branch information
mathomp4 committed Aug 1, 2023
2 parents 25ab1d3 + 085647e commit 3a9510a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Workaround for NAG which prevents reading values from ESMF Config files that have been set using `SetAttribute()`. The immediate issue appears to be due to a wrong CPP conditional on `ESMF_HAS_ACHAR_BUG', but it is not immediately clear if this is due to recent changes in ESMF or some change in NAG. Probably ESMF though. Once the ESMF core team analyzes we will potentially update this fix.

### Removed

### Deprecated
Expand Down
10 changes: 5 additions & 5 deletions base/MAPL_Config.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function MAPL_ConfigCreate(unusable, rc) result(config)
integer, optional, intent(out) :: rc

character, parameter :: EOB = achar(00) !! end of buffer mark (null)
#ifdef ESMF_HAS_ACHAR_BUG
#if defined(ESMF_HAS_ACHAR_BUG) | defined(__NAG_COMPILER_BUILD)
character, parameter :: EOL = achar(12) !! end of line mark (cr)
#else
character, parameter :: EOL = achar(10) !! end of line mark (newline)
Expand Down Expand Up @@ -95,7 +95,7 @@ subroutine MAPL_ConfigSetAttribute_real64( config, value, label, rc )

character, parameter :: BLK = achar(32) ! blank (space)
character, parameter :: TAB = achar(09) ! TAB
#ifdef ESMF_HAS_ACHAR_BUG
#if defined(ESMF_HAS_ACHAR_BUG) | defined(__NAG_COMPILER_BUILD)
character, parameter :: EOL = achar(12) ! end of line mark (cr)
#else
character, parameter :: EOL = achar(10) ! end of line mark (newline)
Expand Down Expand Up @@ -264,7 +264,7 @@ subroutine MAPL_ConfigSetAttribute_real32( config, value, label, rc )

character, parameter :: BLK = achar(32) ! blank (space)
character, parameter :: TAB = achar(09) ! TAB
#ifdef ESMF_HAS_ACHAR_BUG
#if defined(ESMF_HAS_ACHAR_BUG) | defined(__NAG_COMPILER_BUILD)
character, parameter :: EOL = achar(12) ! end of line mark (cr)
#else
character, parameter :: EOL = achar(10) ! end of line mark (newline)
Expand Down Expand Up @@ -433,7 +433,7 @@ subroutine MAPL_ConfigSetAttribute_int32( config, value, label, rc )

character, parameter :: BLK = achar(32) ! blank (space)
character, parameter :: TAB = achar(09) ! TAB
#ifdef ESMF_HAS_ACHAR_BUG
#if defined(ESMF_HAS_ACHAR_BUG) | defined(__NAG_COMPILER_BUILD)
character, parameter :: EOL = achar(12) ! end of line mark (cr)
#else
character, parameter :: EOL = achar(10) ! end of line mark (newline)
Expand Down Expand Up @@ -678,7 +678,7 @@ subroutine MAPL_ConfigSetAttribute_string(config, value, label, rc)

character, parameter :: BLK = achar(32) ! blank (space)
character, parameter :: TAB = achar(09) ! TAB
#ifdef ESMF_HAS_ACHAR_BUG
#if defined(ESMF_HAS_ACHAR_BUG) | defined(__NAG_COMPILER_BUILD)
character, parameter :: EOL = achar(12) ! end of line mark (cr)
#else
character, parameter :: EOL = achar(10) ! end of line mark (newline)
Expand Down

0 comments on commit 3a9510a

Please sign in to comment.