Skip to content

Commit 94e557c

Browse files
authored
Merge pull request #720 from GEOS-ESM/feature/sdrabenh/dev_into_v12_20250424
Sync develop into v12 branches
2 parents 21d48a0 + e8e4a66 commit 94e557c

File tree

8 files changed

+246
-37
lines changed

8 files changed

+246
-37
lines changed

.github/workflows/spack-ci.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Spack CI GCC Build
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
# Do not run if the only files changed cannot affect the build
7+
paths-ignore:
8+
- "**.md"
9+
- "**.pro"
10+
- "**.sh"
11+
- "**.perl"
12+
- ".github/CODEOWNERS"
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
19+
jobs:
20+
build_gcm:
21+
name: Spack CI GCC Build
22+
runs-on: ubuntu-24.04
23+
steps:
24+
25+
- name: Checkout GCM
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 1
29+
filter: blob:none
30+
repository: GEOS-ESM/GEOSgcm
31+
32+
- name: Set all directories as git safe
33+
run: |
34+
git config --global --add safe.directory '*'
35+
36+
- name: Setup Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.13'
40+
41+
- name: Pip install mepo
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install mepo
45+
mepo --version
46+
47+
- name: Mepo clone external repos
48+
run: |
49+
ls
50+
mepo clone --partial blobless
51+
mepo status
52+
53+
- name: Mepo develop usual suspects
54+
run: |
55+
ls
56+
mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util
57+
mepo status
58+
59+
- name: Debug PR branch
60+
run: echo "PR is coming from ${{ github.event.pull_request.head.ref }}"
61+
62+
- name: Update other branches
63+
if: ${{ github.event.pull_request.head.ref != 'main' && github.event.pull_request.head.ref != 'develop' }}
64+
run: |
65+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
66+
mepo status
67+
68+
- name: Set up Spack
69+
uses: spack/setup-spack@v2
70+
with:
71+
ref: develop # Spack version (examples: develop, releases/v0.21)
72+
color: true # Force color output (SPACK_COLOR=always)
73+
path: spack # Where to clone Spack
74+
buildcache: false # Do not use the spack buildcache
75+
76+
- name: Find compilers
77+
shell: spack-bash {0}
78+
run: |
79+
spack compiler find
80+
81+
- name: Set default compiler and target
82+
shell: spack-bash {0}
83+
run: |
84+
spack config add 'packages:all:compiler:[gcc@14.2.0]'
85+
spack config add 'packages:all:require:target=x86_64_v3'
86+
87+
- name: Create Spack environment
88+
shell: spack-bash {0}
89+
run: |
90+
spack env create spack-env
91+
spack env activate spack-env
92+
93+
- name: Login
94+
shell: spack-bash {0}
95+
run: |
96+
spack -e spack-env mirror add geos-buildcache oci://ghcr.io/GEOS-ESM/geos-buildcache
97+
spack -e spack-env mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.BUILDCACHE_TOKEN }}" geos-buildcache
98+
spack -e spack-env mirror list
99+
spack -e spack-env buildcache update-index geos-buildcache
100+
spack -e spack-env buildcache list --allarch
101+
102+
- name: Concretize
103+
shell: spack-bash {0}
104+
run: |
105+
spack -e spack-env concretize
106+
107+
- name: Install
108+
shell: spack-bash {0}
109+
run: |
110+
spack -e spack-env install --add --no-check-signature --use-buildcache only \
111+
esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas
112+
113+
- name: Build with Cmake
114+
shell: spack-bash {0}
115+
run: |
116+
spack env activate spack-env
117+
spack load \
118+
esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas
119+
spack find --loaded
120+
FC=gfortran-14 CC=gcc-14 CXX=g++-14
121+
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}
122+
cmake --build build -j 4
123+
cmake --install build
124+

.github/workflows/workflow.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build Tests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
# Do not run if the only files changed cannot affect the build
7+
paths-ignore:
8+
- "**.md"
9+
- "**.pro"
10+
- "**.sh"
11+
- "**.perl"
12+
- ".github/CODEOWNERS"
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
17+
18+
jobs:
19+
build_gcm:
20+
name: Build GEOSgcm
21+
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
22+
runs-on: ubuntu-24.04
23+
container:
24+
image: gmao/ubuntu24-geos-env:v7.32.0-intelmpi_2021.13-ifort_2021.13
25+
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
26+
# It seems like we might not need secrets on GitHub Actions which is good for forked
27+
# pull requests
28+
#credentials:
29+
#username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
#password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
env:
33+
OMPI_ALLOW_RUN_AS_ROOT: 1
34+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
35+
OMPI_MCA_btl_vader_single_copy_mechanism: none
36+
37+
steps:
38+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
39+
- name: Delete huge unnecessary tools folder
40+
run: rm -rf /opt/hostedtoolcache
41+
42+
- name: Checkout GCM
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 1
46+
filter: blob:none
47+
repository: GEOS-ESM/GEOSgcm
48+
49+
- name: Set all directories as git safe
50+
run: |
51+
git config --global --add safe.directory '*'
52+
53+
- name: Versions etc.
54+
run: |
55+
ifort --version
56+
mpirun --version
57+
echo $BASEDIR
58+
59+
- name: Mepo clone external repos
60+
run: |
61+
mepo clone --partial blobless
62+
mepo status
63+
64+
- name: Mepo develop usual suspects
65+
run: |
66+
mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util
67+
mepo status
68+
69+
- name: Debug PR branch
70+
run: echo "PR is coming from ${{ github.event.pull_request.head.ref }}"
71+
72+
- name: Update other branches
73+
if: ${{ github.event.pull_request.head.ref != 'main' && github.event.pull_request.head.ref != 'develop' }}
74+
run: |
75+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
76+
mepo status
77+
78+
- name: CMake
79+
run: |
80+
cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
81+
82+
- name: Build
83+
run: |
84+
cmake --build build -j 4
85+
cmake --install build

AGCM.rc.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ LSM_CHOICE: @LSM_CHOICE
574574
# 0 : no (default)
575575
# 1 : yes
576576
# ------------------------------------------------------------
577-
#LDAS_INCR: 0
577+
#LDAS_INCR: @LDAS_INCR
578578

579579
# Name of file containing Surface GridComp resource parameters
580580
# ------------------------------------------------------------

HISTORY.DATAATM.rc.tmpl

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COLLECTIONS: 'geosgcm_surf'
1010
# 'geosgcm_ocn2d'
1111
'geosgcm_ocn2dT'
1212
'geosgcm_seaice'
13-
>>>HIST_CICE4<<< 'geosgcm_icethm'
13+
@HIST_CICE4 'geosgcm_icethm'
1414
# 'geosgcm_aoflux'
1515
# 'geosgcm_icecat'
1616
# 'geosgcm_icesig'
@@ -76,41 +76,41 @@ PC@HIST_IMx@HIST_JM-DC.LM: @AGCM_LM
7676
# geosgcm_seaice.frequency: 240000,
7777
geosgcm_seaice.fields: 'UI' , 'SEAICE',
7878
'VI' , 'SEAICE',
79-
>>>HIST_CICE4<<< 'VEL' , 'SEAICE',
80-
>>>HIST_CICE4<<< 'STRENGTH' , 'SEAICE',
81-
>>>HIST_CICE4<<< 'SHEAR' , 'SEAICE',
82-
>>>HIST_CICE4<<< 'DIVU' , 'SEAICE',
79+
@HIST_CICE4 'VEL' , 'SEAICE',
80+
@HIST_CICE4 'STRENGTH' , 'SEAICE',
81+
@HIST_CICE4 'SHEAR' , 'SEAICE',
82+
@HIST_CICE4 'DIVU' , 'SEAICE',
8383
'HICE' , 'SEAICE',
84-
>>>HIST_CICE4<<< 'HICE0' , 'SEAICE',
84+
@HIST_CICE4 'HICE0' , 'SEAICE',
8585
'HSNO' , 'SEAICE',
86-
>>>HIST_CICE4<<< 'HSNO0' , 'SEAICE',
87-
>>>HIST_CICE4<<< 'DRAFT' , 'SEAICE',
88-
>>>HIST_CICE4<<< 'DRAFT0' , 'SEAICE',
86+
@HIST_CICE4 'HSNO0' , 'SEAICE',
87+
@HIST_CICE4 'DRAFT' , 'SEAICE',
88+
@HIST_CICE4 'DRAFT0' , 'SEAICE',
8989
'AICE' , 'SEAICE',
90-
>>>HIST_CICE4<<< 'DVIDTD' , 'SEAICE',
91-
>>>HIST_CICE4<<< 'DAIDTD' , 'SEAICE',
92-
>>>HIST_CICE4<<< 'DVIRDGDT' , 'SEAICE',
93-
>>>HIST_CICE4<<< 'STRCORX' , 'SEAICE',
94-
>>>HIST_CICE4<<< 'STRCORY' , 'SEAICE',
95-
>>>HIST_CICE4<<< 'STRTLTX' , 'SEAICE',
96-
>>>HIST_CICE4<<< 'STRTLTY' , 'SEAICE',
97-
>>>HIST_CICE4<<< 'STRINTX' , 'SEAICE',
98-
>>>HIST_CICE4<<< 'STRINTY' , 'SEAICE',
99-
>>>HIST_CICE4<<< 'TAUXOCNB' , 'SEAICE',
100-
>>>HIST_CICE4<<< 'TAUYOCNB' , 'SEAICE',
101-
>>>HIST_CICE4<<< 'TAUXI' , 'SEAICE',
102-
>>>HIST_CICE4<<< 'TAUYI' , 'SEAICE',
103-
>>>HIST_CICE4<<< 'TAUXIB' , 'SEAICE',
104-
>>>HIST_CICE4<<< 'TAUYIB' , 'SEAICE',
90+
@HIST_CICE4 'DVIDTD' , 'SEAICE',
91+
@HIST_CICE4 'DAIDTD' , 'SEAICE',
92+
@HIST_CICE4 'DVIRDGDT' , 'SEAICE',
93+
@HIST_CICE4 'STRCORX' , 'SEAICE',
94+
@HIST_CICE4 'STRCORY' , 'SEAICE',
95+
@HIST_CICE4 'STRTLTX' , 'SEAICE',
96+
@HIST_CICE4 'STRTLTY' , 'SEAICE',
97+
@HIST_CICE4 'STRINTX' , 'SEAICE',
98+
@HIST_CICE4 'STRINTY' , 'SEAICE',
99+
@HIST_CICE4 'TAUXOCNB' , 'SEAICE',
100+
@HIST_CICE4 'TAUYOCNB' , 'SEAICE',
101+
@HIST_CICE4 'TAUXI' , 'SEAICE',
102+
@HIST_CICE4 'TAUYI' , 'SEAICE',
103+
@HIST_CICE4 'TAUXIB' , 'SEAICE',
104+
@HIST_CICE4 'TAUYIB' , 'SEAICE',
105105
'TAUXBOT' , 'SEAICE',
106106
'TAUYBOT' , 'SEAICE',
107-
>>>HIST_CICE4<<< 'UOCN' , 'SEAICE',
108-
>>>HIST_CICE4<<< 'VOCN' , 'SEAICE',
109-
>>>HIST_CICE4<<< 'SSH' , 'SEAICE',
110-
>>>HIST_CICE4<<< 'SLV' , 'SEAICE',
111-
>>>HIST_CICE4<<< 'AREA' , 'SEAICE',
112-
>>>HIST_CICE4<<< 'FROCEAN' , 'SEAICE',
113-
>>>HIST_CICE4<<< 'TMASK' , 'SEAICE',
107+
@HIST_CICE4 'UOCN' , 'SEAICE',
108+
@HIST_CICE4 'VOCN' , 'SEAICE',
109+
@HIST_CICE4 'SSH' , 'SEAICE',
110+
@HIST_CICE4 'SLV' , 'SEAICE',
111+
@HIST_CICE4 'AREA' , 'SEAICE',
112+
@HIST_CICE4 'FROCEAN' , 'SEAICE',
113+
@HIST_CICE4 'TMASK' , 'SEAICE',
114114
::
115115

116116
geosgcm_icethm.template: '%y4%m2%d2_%h2%n2z.nc4',

gcm_setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ else if ( $SITE == 'NAS' ) then
415415
echo " ${C2}bro (Broadwell)${CN}"
416416
echo " ${C2}sky (Skylake)${CN}"
417417
echo " ${C2}cas (Cascade Lake)${CN}"
418-
echo " ${C2}rom (AMD Rome)${CN} (Default)"
418+
echo " ${C2}rom (AMD Rome) (default)${CN}"
419419
echo " ${C2}mil (AMD Milan)${CN}"
420420
echo " "
421421
echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge"

geoschemchem_setup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ else if ( $SITE == 'NAS' ) then
415415
echo " ${C2}bro (Broadwell)${CN}"
416416
echo " ${C2}sky (Skylake)${CN}"
417417
echo " ${C2}cas (Cascade Lake)${CN}"
418-
echo " ${C2}rom (AMD Rome)${CN} (Default)"
418+
echo " ${C2}rom (AMD Rome) (default)${CN}"
419419
echo " ${C2}mil (AMD Milan)${CN}"
420420
echo " "
421421
echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge"
@@ -3029,7 +3029,7 @@ echo " CARMAchem_GridComp_ExtData.rc"
30293029
echo " CFC_GridComp_ExtData.rc"
30303030
echo " CH4_GridComp_ExtData.rc"
30313031
echo " DNA_ExtData.rc"
3032-
echo " GEOSachem_ExtData.rc"
3032+
echo " ACHEM_ExtData.rc"
30333033
echo " MAM7_ExtData.rc"
30343034
echo " O3_GridComp_ExtData.rc"
30353035
echo " Rn_GridComp_ExtData.rc"

gmichem_setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ else if ( $SITE == 'NAS' ) then
415415
echo " ${C2}bro (Broadwell)${CN}"
416416
echo " ${C2}sky (Skylake)${CN}"
417417
echo " ${C2}cas (Cascade Lake)${CN}"
418-
echo " ${C2}rom (AMD Rome)${CN} (Default)"
418+
echo " ${C2}rom (AMD Rome) (default)${CN}"
419419
echo " ${C2}mil (AMD Milan)${CN}"
420420
echo " "
421421
echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge"

stratchem_setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ else if ( $SITE == 'NAS' ) then
415415
echo " ${C2}bro (Broadwell)${CN}"
416416
echo " ${C2}sky (Skylake)${CN}"
417417
echo " ${C2}cas (Cascade Lake)${CN}"
418-
echo " ${C2}rom (AMD Rome)${CN} (Default)"
418+
echo " ${C2}rom (AMD Rome) (default)${CN}"
419419
echo " ${C2}mil (AMD Milan)${CN}"
420420
echo " "
421421
echo " NOTE Due to how FV3 is compiled by default, Sandy Bridge"

0 commit comments

Comments
 (0)