Skip to content

Fix NAG build on macOS (surface components and utilities) - #1564

Open
weiyuan-jiang wants to merge 4 commits into
developfrom
feature/wjiang/macos_nag
Open

weiyuan-jiang wants to merge 4 commits into
developfrom
feature/wjiang/macos_nag

Conversation

@weiyuan-jiang

@weiyuan-jiang weiyuan-jiang commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
  • Replace nonstandard procedures: iargc/getarg -> command_argument_count/ get_command_argument, call exit(0) -> stop, call exit(N) -> error stop N, isnan -> ieee_is_nan, int8 -> int(...,int64), dfloat -> dble
  • Replace hardcoded kinds: kind=4 -> REAL32, _8 literals -> _REAL64, f_p=8 -> REAL64, integer(kind=4) -> integer (kind 4 is 64-bit in NAG)
  • clm_varcon: use real literals instead of integer literals with _r8 kind
  • Declare dummy array bounds before use (GEOS_IgniGridComp, LUDCMP)
  • CatchmentCNRst: explicit int() for real array subscript
  • nanMod: NAG-only NaN/Inf via equivalence (NAG rejects NaN parameters)
  • mk_restarts: NAG-only RecordEndPos() replacement for ftell()
  • LandIce: guard ICESMB_IN update with HAVE_ISSM
  • CMake: NAG-only -wmismatch for NetCDF F77 calls in makebcs/mk_restarts

Testing:

  • successfully 0-diff tested for GEOSldas (except IFX) by @gmao-rreichle after 1e77684 (2 Dec 2026) [ignored *GLOBALCS/model tests, which are currently broken]
  • successfully 0-diff tested for GEOSldas with IFX by @gmao-rreichle after 1e77684 (3 Dec 2026)

- Replace nonstandard procedures: iargc/getarg -> command_argument_count/
  get_command_argument, call exit(0) -> stop, call exit(N) -> error stop N,
  isnan -> ieee_is_nan, int8 -> int(...,int64), dfloat -> dble
- Replace hardcoded kinds: kind=4 -> REAL32, _8 literals -> _REAL64,
  f_p=8 -> REAL64, integer(kind=4) -> integer (kind 4 is 64-bit in NAG)
- clm_varcon: use real literals instead of integer literals with _r8 kind
- Declare dummy array bounds before use (GEOS_IgniGridComp, LUDCMP)
- CatchmentCNRst: explicit int() for real array subscript
- nanMod: NAG-only NaN/Inf via equivalence (NAG rejects NaN parameters)
- mk_restarts: NAG-only RecordEndPos() replacement for ftell()
- LandIce: guard ICESMB_IN update with HAVE_ISSM
- CMake: NAG-only -wmismatch for NetCDF F77 calls in makebcs/mk_restarts
@weiyuan-jiang weiyuan-jiang added the 0 diff The changes in this pull request have verified to be zero-diff with the target branch. label Nov 6, 2026
@weiyuan-jiang
weiyuan-jiang marked this pull request as ready for review December 2, 2026 14:25
@weiyuan-jiang
weiyuan-jiang requested review from a team as code owners December 2, 2026 14:25
@mathomp4

mathomp4 commented Dec 2, 2026

Copy link
Copy Markdown
Member

I think we need to update the feature/wjiang/macos_nag branch that @weiyuan-jiang has on GEOSldas to point to GMAO_Shared v3.0.6. I can then retrigger those CI to make sure they pass

@mathomp4

mathomp4 commented Dec 3, 2026

Copy link
Copy Markdown
Member

@gmao-rreichle I super-approved. if @sdrabenh is happy, we can merge whenever!

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants