Skip to content

Commit 6fd3fc1

Browse files
committed
Merge tag 'ctsm5.3.055' into update_defaults_iss3137
Remove broken FTorch submodule
2 parents 5bce0ed + 53057f0 commit 6fd3fc1

File tree

22 files changed

+436
-101
lines changed

22 files changed

+436
-101
lines changed

.github/workflows/docs-omnibus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
# TODO: Split testing.sh tests into their own steps in this job
5252
- name: Text Sphinx builds with omnibus script
5353
run: |
54-
cd doc && conda run -n ctsm_pylib ./testing.sh
54+
cd doc && ./testing.sh

.github/workflows/fleximod_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323
- id: run-fleximod
2424
run: |
25-
$GITHUB_WORKSPACE/bin/git-fleximod update
25+
$GITHUB_WORKSPACE/bin/git-fleximod update -o
2626
echo
2727
echo "Update complete, checking status"
2828
echo
@@ -32,4 +32,4 @@ jobs:
3232
echo
3333
echo "Checking if git fleximod matches expected externals"
3434
echo
35-
git diff --exit-code
35+
git add . && git diff --exit-code && git diff --cached --exit-code

.github/workflows/validate_xml.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
"""
2+
Check that all XML files in our repo (except for those in submodules) are well-formed. Error if not.
3+
"""
4+
import sys
5+
import glob
6+
import os
7+
import subprocess
8+
import xml.etree.ElementTree as ET
9+
10+
11+
def get_submodule_paths():
12+
"""
13+
Get list of submodules
14+
"""
15+
cmd = "git config --file .gitmodules --get-regexp path | awk '{ print $2 }'"
16+
result = subprocess.run(cmd, capture_output=True, text=True, shell=True, check=True)
17+
result_list = result.stdout.split("\n")[:-1]
18+
result_list = [x for x in result_list if x]
19+
return result_list
20+
21+
22+
def is_in_submodule(file_path, submodule):
23+
"""
24+
Return True if file is in given submodule, False otherwise
25+
"""
26+
return os.path.commonpath([file_path, submodule]) == os.path.commonpath([submodule])
27+
28+
29+
def is_in_any_submodule(file_path, submodule_paths):
30+
"""
31+
Return True if file is in any submodule, False otherwise
32+
"""
33+
file_path = os.path.abspath(file_path)
34+
submodule_paths = map(os.path.abspath, submodule_paths)
35+
return any(is_in_submodule(file_path, submodule) for submodule in submodule_paths)
36+
37+
38+
def validate_xml(file_path):
39+
"""
40+
Return True if XML file is well-formed, False otherwise
41+
"""
42+
try:
43+
ET.parse(file_path)
44+
except ET.ParseError:
45+
print(f"❌ {file_path} is NOT well-formed")
46+
return False
47+
print(f"✅ {file_path} is well-formed")
48+
return True
49+
50+
51+
def main():
52+
# pylint: disable=missing-function-docstring
53+
submodule_paths = get_submodule_paths()
54+
all_valid = True
55+
for xml_file in glob.glob("**/*.xml", recursive=True):
56+
if is_in_any_submodule(xml_file, submodule_paths):
57+
continue
58+
if not validate_xml(xml_file):
59+
all_valid = False
60+
61+
if not all_valid:
62+
print("\nUse xmllint to show problems in malformed files")
63+
64+
return all_valid
65+
66+
67+
sys.exit(0 if main() else 1)

.github/workflows/xml-check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check that XML files are well-formed
2+
# Only check files in our repo that AREN'T in submodules
3+
# Use a Python command to check each file because xmllint isn't available on GH runners
4+
5+
on: [push, pull_request] # Trigger on push or pull request
6+
7+
jobs:
8+
check-xml:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Check XML files
20+
run: python .github/workflows/validate_xml.py

.gitmodules

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
9292
[submodule "cdeps"]
9393
path = components/cdeps
9494
url = https://github.com/ESCOMP/CDEPS.git
95-
fxtag = cdeps1.0.73
95+
fxtag = cdeps1.0.75
9696
fxrequired = ToplevelRequired
9797
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
9898
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
@@ -128,13 +128,3 @@ fxtag = v2.2.6
128128
fxrequired = ToplevelOptional
129129
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
130130
fxDONOTUSEurl = https://github.com/ESMCI/doc-builder
131-
132-
# FTorch is an optional library useful for AI and Machine Learning
133-
# In order to use it -- it must be checked out with git-fleximod
134-
[submodule "FTorch"]
135-
path = libraries/FTorch
136-
url = https://github.com/ESCOMP/FTorch_interface
137-
fxtag = v0.0.5
138-
fxrequired = ToplevelOptional
139-
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
140-
fxDONOTUSEurl = https://github.com/ESCOMP/FTorch_interface

cime_config/testdefs/ExpectedTestFails.xml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,6 @@
3636
</phase>
3737
</test>
3838

39-
<test name="SMS_Ld5.f09_t232.ISSP245Clm60BgcCropCrujra.derecho_intel.clm-ciso_dec2050Start">
40-
<phase name="SETUP">
41-
<status>FAIL</status>
42-
<issue>#2686</issue>
43-
</phase>
44-
</test>
45-
46-
<test name="SMS_Ld5.f09_t232.ISSP370Clm60BgcCropCrujra.derecho_intel.clm-ciso_dec2050Start">
47-
<phase name="SETUP">
48-
<status>FAIL</status>
49-
<issue>#2686</issue>
50-
</phase>
51-
</test>
52-
53-
<test name="SMS_Ld5.f09_t232.ISSP585Clm60BgcCropCrujra.derecho_intel.clm-ciso_dec2050Start">
54-
<phase name="SETUP">
55-
<status>FAIL</status>
56-
<issue>#2686</issue>
57-
</phase>
58-
</test>
59-
6039
<test name="SMS_Ld5.f09_g17.IHistClm50Sp.derecho_intel.clm-nofire">
6140
<phase name="SHAREDLIB_BUILD">
6241
<status>FAIL</status>
@@ -159,11 +138,15 @@
159138
</phase>
160139
</test>
161140

162-
<test name="FUNITCTSM_P1x1.f10_f10_mg37.I2000Clm50Sp.izumi_intel"
141+
<test name="FUNITCTSM_P1x1.f10_f10_mg37.I2000Clm50Sp.izumi_intel">
163142
<phase name="MODEL_BUILD">
164143
<status>FAIL</status>
165144
<issue>#3182</issue>
166145
</phase>
146+
<phase name="RUN">
147+
<status>FAIL</status>
148+
<issue>#3182</issue>
149+
</phase>
167150
</test>
168151

169152
<test name="SMS_Ld10_D_Mmpi-serial.CLM_USRDAT.I1PtClm60Bgc.izumi_nag.clm-default--clm-NEON-HARV--clm-matrixcnOn">

cime_config/testdefs/testlist_clm.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3073,6 +3073,65 @@
30733073
<option name="comment">Transient production test with clm6, t232, and Crujra while the defaults have not changed</option>
30743074
</options>
30753075
</test>
3076+
<test name="SMS_D_Ld5" grid="f09_g17" compset="ISSP126Clm50BgcCrop" testmods="clm/default">
3077+
<machines>
3078+
<machine name="derecho" compiler="intel" category="aux_clm"/>
3079+
<machine name="derecho" compiler="intel" category="ssp"/>
3080+
</machines>
3081+
<options>
3082+
<option name="wallclock">00:20:00</option>
3083+
<option name="comment">Transient production with anomaly forcing future scenario SSP1-2.6 case</option>
3084+
</options>
3085+
</test>
3086+
<test name="SMS_D_Ld5" grid="f10_f10_mg37" compset="ISSP245Clm50BgcCrop" testmods="clm/default">
3087+
<machines>
3088+
<machine name="derecho" compiler="intel" category="aux_clm"/>
3089+
<machine name="derecho" compiler="intel" category="ssp"/>
3090+
</machines>
3091+
<options>
3092+
<option name="wallclock">00:20:00</option>
3093+
<option name="comment" >Transient production with anomaly forcing future scenario SSP2-4.5 case</option>
3094+
</options>
3095+
</test>
3096+
<test name="SMS_D_Ld5" grid="f10_f10_mg37" compset="ISSP245Clm50BgcCrop" testmods="clm/default--clm/noAnomalyForcing">
3097+
<machines>
3098+
<machine name="derecho" compiler="intel" category="ssp"/>
3099+
</machines>
3100+
<options>
3101+
<option name="wallclock">00:20:00</option>
3102+
<option name="comment" >Transient production with future scenario SSP2-4.5 but NO anomaly forcing</option>
3103+
</options>
3104+
</test>
3105+
<test name="SMS_D_Ld5" grid="f10_f10_mg37" compset="ISSP245Clm50BgcCrop" testmods="clm/datm_rcp45_anom_forc">
3106+
<machines>
3107+
<machine name="derecho" compiler="intel" category="aux_clm"/>
3108+
<machine name="derecho" compiler="intel" category="ssp"/>
3109+
</machines>
3110+
<options>
3111+
<option name="wallclock">00:20:00</option>
3112+
<option name="comment" >Transient production with anomaly forcing future scenario RCP4.5 (CMIP5) case</option>
3113+
</options>
3114+
</test>
3115+
<test name="SMS_D_Ld5" grid="f09_g17" compset="ISSP370Clm50BgcCrop" testmods="clm/default">
3116+
<machines>
3117+
<machine name="derecho" compiler="intel" category="ssp"/>
3118+
</machines>
3119+
<options>
3120+
<option name="wallclock">00:20:00</option>
3121+
<option name="comment" >Transient production with anomaly forcing future scenario SSP3-7.0 case</option>
3122+
</options>
3123+
</test>
3124+
<test name="SMS_D_Ld5" grid="f09_g17" compset="ISSP585Clm50BgcCrop" testmods="clm/default">
3125+
<machines>
3126+
<machine name="derecho" compiler="intel" category="ssp"/>
3127+
</machines>
3128+
<options>
3129+
<option name="wallclock">00:20:00</option>
3130+
<option name="comment" >Transient production with anomaly forcing future scenario SSP5-8.5 case</option>
3131+
</options>
3132+
</test>
3133+
3134+
30763135
<test name="ERP_D_Ld5" grid="f10_f10_mg37" compset="I1850Clm50Bgc" testmods="clm/nlevgrnd_small">
30773136
<machines>
30783137
<machine name="derecho" compiler="intel" category="aux_clm">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
anomaly_forcing = 'Anomaly.Forcing.cmip5.rcp45'

cime_config/testdefs/testmods_dirs/clm/datm_ssp126_anom_forc/user_nl_datm

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)