Skip to content

Remove __GFORTRAN__ workarounds, enforce min version#5259

Open
mathomp4 wants to merge 8 commits into
developfrom
feature/#5258-remove-gfortran-ifdef
Open

Remove __GFORTRAN__ workarounds, enforce min version#5259
mathomp4 wants to merge 8 commits into
developfrom
feature/#5258-remove-gfortran-ifdef

Conversation

@mathomp4

@mathomp4 mathomp4 commented Jul 15, 2026

Copy link
Copy Markdown
Member

Types of change(s)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)
  • Refactor (no functional changes, no api changes)

Checklist

  • Tested this change with a run of GEOSgcm
  • Ran the Unit Tests (make tests or ctest)

Description

Enforces minimum supported gfortran versions (14.4, 15.2, 16.1) in CMakeLists.txt via a CMAKE_Fortran_COMPILER_VERSION check, since testing showed gfortran 14.2 still exhibits a compiler bug that prevents direct assignment to derived-type actual results. With this floor in place, removes the __GFORTRAN__-guarded workaround subroutines (nicknamed ridiculous) in GenericGridComp.F90, StateRegistry_Extensions_smod.F90, and GenericCoupler.F90 in favor of plain assignment.

Also removes the dead BUILD_SHARED_MAPL option and MAPL_LIBRARY_TYPE logic in CMakeLists.txt, leftover from MAPL v2 and no longer used.

Related Issue

Fixes #5258

Enforce minimum gfortran versions (14.4, 15.2, 16.1) in CMakeLists.txt
via a compiler version check, since these were the versions where a
gfortran bug preventing direct assignment to derived-type actual
results was fixed. With this floor in place, remove the __GFORTRAN__
workaround subroutines in GenericGridComp.F90,
StateRegistry_Extensions_smod.F90, and GenericCoupler.F90 in favor of
plain assignment.

Also remove the dead BUILD_SHARED_MAPL option and MAPL_LIBRARY_TYPE
logic, left over from MAPL v2 and no longer used.

Fixes #5258
@mathomp4
mathomp4 requested a review from a team as a code owner July 15, 2026 19:24
@mathomp4 mathomp4 added 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 📈 MAPL3 MAPL 3 Related labels Jul 15, 2026
@mathomp4
mathomp4 marked this pull request as draft July 15, 2026 19:25
tclune
tclune previously approved these changes Jul 15, 2026

@tclune tclune left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Waiting on GCHP acceptance of the change to supported compilers.

@mathomp4

mathomp4 commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

Waiting on GCHP acceptance of the change to supported compilers.

And, well, I need to update my spack buildcache for gcc 15 it looks like!

ETA: And my gfortran-14 image! On the list for tomorrow...

@mathomp4 mathomp4 added the 🚫 Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs label Jul 16, 2026
@mathomp4
mathomp4 marked this pull request as ready for review July 16, 2026 13:48
@mathomp4

Copy link
Copy Markdown
Member Author

I undrafted because I need to test the CI. So I added a blocking label. I'll re-undraft once I see CI happy

@mathomp4

Copy link
Copy Markdown
Member Author

CI looks good. I'll draft again until we have consensus

@mathomp4
mathomp4 marked this pull request as draft July 17, 2026 17:01
@mathomp4 mathomp4 removed the 🚫 Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs label Jul 17, 2026
@mathomp4
mathomp4 marked this pull request as ready for review July 24, 2026 13:20
@mathomp4
mathomp4 requested a review from tclune July 24, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 📈 MAPL3 MAPL 3 Related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants