Skip to content

Commit 3928132

Browse files
authored
Merge branch 'develop' into feature/rtodling/these_read_cubed_output
2 parents 85bc34c + fcf3c49 commit 3928132

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+13788
-14920
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ workflows:
4545
- docker-hub-creds
4646
matrix:
4747
parameters:
48-
compiler: [gfortran, ifort]
48+
compiler: [ifort]
4949
requires:
5050
- build-GEOSgcm-on-<< matrix.compiler >>
5151
repo: GEOSgcm

.github/workflows/spack-ci.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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: Update other branches
60+
if:
61+
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
62+
run: |
63+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
64+
mepo status
65+
66+
- name: Set up Spack
67+
uses: spack/setup-spack@v2
68+
with:
69+
ref: develop # Spack version (examples: develop, releases/v0.21)
70+
color: true # Force color output (SPACK_COLOR=always)
71+
path: spack # Where to clone Spack
72+
buildcache: false # Do not use the spack buildcache
73+
74+
- name: Find compilers
75+
shell: spack-bash {0}
76+
run: |
77+
spack compiler find
78+
79+
- name: Set default compiler and target
80+
shell: spack-bash {0}
81+
run: |
82+
spack config add 'packages:all:compiler:[[email protected]]'
83+
spack config add 'packages:all:require:target=x86_64_v3'
84+
85+
- name: Create Spack environment
86+
shell: spack-bash {0}
87+
run: |
88+
spack env create spack-env
89+
spack env activate spack-env
90+
91+
- name: Login
92+
shell: spack-bash {0}
93+
run: |
94+
spack -e spack-env mirror add geos-buildcache oci://ghcr.io/GEOS-ESM/geos-buildcache
95+
spack -e spack-env mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.BUILDCACHE_TOKEN }}" geos-buildcache
96+
spack -e spack-env mirror list
97+
spack -e spack-env buildcache update-index geos-buildcache
98+
spack -e spack-env buildcache list --allarch
99+
100+
- name: Concretize
101+
shell: spack-bash {0}
102+
run: |
103+
spack -e spack-env concretize
104+
105+
- name: Install
106+
shell: spack-bash {0}
107+
run: |
108+
spack -e spack-env install --add --no-check-signature --use-buildcache only \
109+
esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas
110+
111+
- name: Build with Cmake
112+
shell: spack-bash {0}
113+
run: |
114+
spack env activate spack-env
115+
spack load \
116+
esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas
117+
spack find --loaded
118+
FC=gfortran-14 CC=gcc-14 CXX=g++-14
119+
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}
120+
cmake --build build -j 4
121+
cmake --install build
122+

.github/workflows/workflow.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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: Update other branches
70+
if:
71+
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
72+
run: |
73+
mepo checkout-if-exists ${GITHUB_HEAD_REF}
74+
mepo status
75+
76+
- name: CMake
77+
run: |
78+
cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
79+
80+
- name: Build
81+
run: |
82+
cmake --build build -j 4
83+
cmake --install build

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ subroutine SetServices ( GC, RC )
120120
character(len=ESMF_MAXSTR) :: SURFRC
121121
type(ESMF_Config) :: SCF
122122

123+
! <<>> MSL DEV
124+
character(len=ESMF_MAXSTR) :: co2provider
125+
real :: co2_
126+
123127
!=============================================================================
124128

125129
! Begin...
@@ -1114,6 +1118,27 @@ subroutine SetServices ( GC, RC )
11141118
'CFC11 ','CFC12 ','HCFC22' /), &
11151119
DST_ID=RAD, SRC_ID=CHEM, RC=STATUS )
11161120
VERIFY_(STATUS)
1121+
1122+
! <<>> MSL DEV
1123+
! CO2 is not listed as a RAT, so add it here outside of the RATs code logic
1124+
! It also doesn't appear in PCHEM, so we can't make it part of the RATs list
1125+
! -- get info from AGCM.rc
1126+
call ESMF_ConfigGetAttribute(CF, co2provider, Default='None', &
1127+
Label="CO2_PROVIDER:", __RC__ )
1128+
call ESMF_ConfigGetAttribute(CF, co2_, Default=-1.0, &
1129+
Label="CO2:", __RC__ )
1130+
if (trim(co2provider) .eq. 'GOCART' .and. CO2_ .eq. -2.0) then
1131+
CALL MAPL_AddConnectivity( GC, &
1132+
SHORT_NAME = (/'CO2'/), &
1133+
DST_ID=RAD, SRC_ID=CHEM, RC=STATUS )
1134+
VERIFY_(STATUS)
1135+
endif
1136+
if (trim(co2provider) .eq. 'RRG' .and. CO2_ .eq. -2.0) then
1137+
CALL MAPL_AddConnectivity( GC, &
1138+
SHORT_NAME = (/'CO2'/), &
1139+
DST_ID=RAD, SRC_ID=CHEM, RC=STATUS )
1140+
VERIFY_(STATUS)
1141+
endif
11171142
! -----------------------------------------------------------------
11181143

11191144
call MAPL_AddConnectivity ( GC, &

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSgwd_GridComp/CMakeLists.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,23 @@ set (srcs
1919
)
2020

2121
set (resource_files
22-
GWD_GridComp.rc
23-
)
24-
25-
22+
GWD_GridComp.rc
23+
)
2624

2725
install( FILES ${resource_files}
28-
DESTINATION etc
29-
)
26+
DESTINATION etc
27+
)
3028

31-
esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GEOS_Shared MAPL ESMF::ESMF NetCDF::NetCDF_Fortran)
29+
esma_add_library (
30+
${this}
31+
SRCS ${srcs}
32+
DEPENDENCIES GEOS_Shared MAPL ESMF::ESMF NetCDF::NetCDF_Fortran TYPE SHARED
33+
)
34+
35+
mapl_acg (
36+
${this} GWD_StateSpecs.rc
37+
IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS GET_POINTERS DECLARE_POINTERS
38+
)
3239

3340
# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
3441
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")

0 commit comments

Comments
 (0)