Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add developmental test cases: idealized baroclinic wave and 2020 July CAPE cases + https://github.com/ufs-community/ufs-weather-model/pull/2459 #2461

Merged
merged 132 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
9c60f80
make ufs model compile on CSPs with Rocky 8
weihuang-jedi Aug 30, 2024
30893c0
Merge branch 'develop' of github.com:NOAA-EPIC/ufs-weather-model into…
weihuang-jedi Sep 10, 2024
48d4d91
update test yaml
jkbk2004 Sep 18, 2024
79b5b4b
Merge branch 'ufs-community:develop' into feature/jedi-build
jkbk2004 Sep 18, 2024
d299ba5
update utils scirpt: jedi build
jkbk2004 Sep 18, 2024
ab33fd7
Create compile_slurm_jedi.IN_hera
jkbk2004 Sep 18, 2024
5c6d960
Create ufs_bundle.yaml
jkbk2004 Sep 18, 2024
f4a8754
Create jedi_slurm.IN_hera
jkbk2004 Sep 18, 2024
636d8ba
Bring in updated test_cases directory structure from old branch. Port…
ulmononian Sep 18, 2024
bdc2a0b
Add logic to copy test_case configurations to symlinked tests/fv3_con…
ulmononian Sep 18, 2024
17b6530
Remove control_run.IN from test_cases/fv3_conf.
ulmononian Sep 18, 2024
2841c7b
Merge branch 'ufs-community:develop' into feature/jedi-build
jkbk2004 Sep 22, 2024
d8c1d0c
update test yaml
jkbk2004 Sep 22, 2024
d180247
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Sep 23, 2024
ca31cd1
Add BCW192 fv3_conf and nml; update BCW192 test file.
ulmononian Sep 23, 2024
33d4746
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Sep 25, 2024
e74709a
Change fv3_conf dir name and bcw IN file title.
ulmononian Sep 25, 2024
f4db42b
Rename 2020_CAPE.IN.
ulmononian Sep 25, 2024
843fe6b
Fix CICE hash.
ulmononian Sep 25, 2024
52a37c1
Update ufs_test.sh to use exp_conf.
ulmononian Sep 25, 2024
f590477
Update baroclinic wave tests file.
ulmononian Sep 25, 2024
914f177
Update bcw nml and test file.
ulmononian Sep 30, 2024
6b1a424
Updates.
ulmononian Sep 30, 2024
fdabfd8
Merge branch 'ufs-community:develop' into feature/jedi-build
jkbk2004 Oct 1, 2024
c419652
Update machine_orion.config
jkbk2004 Oct 1, 2024
2b66c95
remove unneeded path
weihuang-jedi Oct 1, 2024
95fb82b
remove unneeded path
weihuang-jedi Oct 1, 2024
3304451
Update machine_orion.config
jkbk2004 Oct 1, 2024
b599e33
update log py: pass check
jkbk2004 Oct 1, 2024
a9bde34
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Oct 1, 2024
e69a80d
update fixes for -n and -b
jkbk2004 Oct 2, 2024
9a1a1b3
compile under Rocky8 on AWS passed
weihuang-jedi Oct 2, 2024
9b1d66c
Merge https://github.com/jkbk2004/ufs-weather-model/tree/feature/tuni…
ulmononian Oct 2, 2024
948ea17
Updates to bcw and cape conf files.
ulmononian Oct 2, 2024
e468f54
Update ufs_test_utils.py
jkbk2004 Oct 2, 2024
55ceceb
Compile ufs-weather-model successfully on GCP with Rocky 8
weihuang-jedi Oct 3, 2024
7e644a8
Merge branch 'csps-rocky8' of github.com:NOAA-EPIC/ufs-weather-model …
weihuang-jedi Oct 3, 2024
a040e40
Update bcw IN file for orion; change yaml function in ufs test utils …
ulmononian Oct 3, 2024
19dde9a
Add orion logic to 2020_CAPE.IN.
ulmononian Oct 3, 2024
cdab4ca
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Oct 7, 2024
2d234d0
Update case test files.
ulmononian Oct 7, 2024
d432b5c
Merge branch 'feature/enable_test_cases' of https://github.com/ulmono…
ulmononian Oct 7, 2024
58eebbf
Merge branch 'ufs-community:develop' into csps-rocky8
weihuang-jedi Oct 8, 2024
0cc340c
Merge branch 'ufs-community:develop' into feature/tuning
jkbk2004 Oct 8, 2024
27b0ffb
Fix typo in 2020_CAPE test.
ulmononian Oct 10, 2024
56fdbd6
Add Hera log for idealized cases (used Rocoto).
ulmononian Oct 11, 2024
5f4ec8e
Merge branch 'ufs-community:develop' into feature/tuning
jkbk2004 Oct 11, 2024
ebfa8c2
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Oct 14, 2024
8f8ccb2
Update idealize test case files to new staged data paths (orion/hercu…
Oct 14, 2024
455a440
Add full Hera RT suite results (run with ufs_test.sh & ufs_test.yaml …
Oct 14, 2024
3918aac
Fix Python path export in xml py script for jet clause.
Oct 15, 2024
b47f2f4
Add beta 2020_CAPE_C768 test files; update bcw and 2020 CAPE IN files…
ulmononian Oct 17, 2024
152934f
Update 2020_CAPE_C768 test file.
ulmononian Oct 17, 2024
55ccb39
Update 2020_CAPE.IN with c768 fix files on hera.
ulmononian Oct 17, 2024
283e9fb
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Oct 21, 2024
91b422a
Merge branch 'ufs-community:develop' into csps-rocky8
zach1221 Oct 21, 2024
6812601
add noaacloud modulefile
zach1221 Oct 22, 2024
5b495d9
add noaacloud fv3_slurm changes
zach1221 Oct 22, 2024
04f5fd3
add noaacloud RT logs: passed
zach1221 Oct 22, 2024
acba3eb
remove extra set -x
zach1221 Oct 22, 2024
d3b897b
update rocoto version noaacloud
zach1221 Oct 22, 2024
326cff4
Add missing dash in ufs_test.yaml to fix rocoto bug; update 2020_CAPE…
ulmononian Oct 23, 2024
29f16c8
update machine_noaacloud.config for the test cases
Oct 24, 2024
a094204
Update noaacloud machine config.
ulmononian Oct 24, 2024
76b36f2
Turn on noaacloud for idealized cases; update STMP for noaacloud base…
Oct 24, 2024
d85f796
noaacloud updates.
Oct 24, 2024
a07a2c9
Update test_cases and ufs_test YAMLS to enable tests on noaacloud.
Oct 24, 2024
10f36b3
Merge branch 'ufs-community:develop' into feature/tuning
jkbk2004 Oct 29, 2024
5d69998
HSD testing for noaacloud
Oct 30, 2024
32336fb
Merge branch 'feature/enable_test_cases' of github.com:natalie-perlin…
Oct 30, 2024
ceadc2a
update create_log.py
Oct 30, 2024
0780855
HSD test cases: HSD_INPUT_DATA variable added
Oct 30, 2024
4d0e25a
HSD test_case_gnu added to ./tests-dev/ufs_test.yaml
Oct 30, 2024
5889335
Merge pull request #17 from natalie-perlin/feature/enable_test_cases
ulmononian Oct 30, 2024
2013289
updates for baroclinic_wave HSD case; MODEL_INITIALIZATION is set to …
Oct 31, 2024
a7936c7
correction for ./tests-dev/baseline_setup.yaml
Oct 31, 2024
a2ec19e
HSD testing update for Hercules
Nov 4, 2024
e36f418
Merge with ufs-wm develop 547be6d.
ulmononian Nov 4, 2024
1447a09
Merge branch 'feature/enable_test_cases' of github.com:natalie-perlin…
Nov 4, 2024
f31236a
updates for derecho
Nov 4, 2024
ceaa411
Lmod init update for derecho
Nov 4, 2024
d4ffef9
reverted changes to MODEL_INITIALIZATION variable in tests/fv3_conf/l…
Nov 4, 2024
2465432
Merge branch 'ufs-community:develop' into csps-rocky8
weihuang-jedi Nov 4, 2024
a06a10d
Fix rocoto_create_entried since HSD arg was removed in last commit.
ulmononian Nov 4, 2024
89688ed
Revert 2020_CAPE.IN.
ulmononian Nov 4, 2024
1064ca8
Merge branch 'ufs-community:develop' into feature/tuning
jkbk2004 Nov 5, 2024
5b7b93e
Reverting change of MODEL_INITIALIZATION variable back to a string va…
Nov 5, 2024
23df70f
Revert variables MODEL_INITIALIZATION, HSD_CASE to simple true or fal…
Nov 5, 2024
2995d64
Merge pull request #18 from natalie-perlin/feature/enable_test_cases
ulmononian Nov 5, 2024
f9bf2bc
Updated FV3_slurm job configurations for Jet
Nov 6, 2024
79d85ec
adapt HSD baroclinic_wave test for Jet
Nov 6, 2024
febdc20
Merge ufs-wm dev f9c91d3.
Nov 6, 2024
0e2d767
update for HSD baroclinic_wave test on Jet, new file fv3_slurm.IN_jet
Nov 6, 2024
88caa18
Merge pull request #19 from natalie-perlin/feature/enable_test_cases
ulmononian Nov 6, 2024
7b4419d
Merge branch 'ufs-community:develop' into feature/tuning
jkbk2004 Nov 7, 2024
908c5de
Update srun args for jet fv3_slurm.
Nov 7, 2024
5a2db10
update create_log.py
jkbk2004 Nov 7, 2024
c92b526
Merge branch 'ufs-community:develop' into csps-rocky8
weihuang-jedi Nov 7, 2024
7fe3ebe
update ufs_test.yaml
jkbk2004 Nov 7, 2024
55621d9
Merge in jk feature/tuning at 7fe3ebe.
ulmononian Nov 7, 2024
fb027b2
Revert jet compile card.
ulmononian Nov 8, 2024
cc0d23a
Merge branch 'csps-rocky8' of https://github.com/NOAA-EPIC/ufs-weathe…
ulmononian Nov 8, 2024
ee33a92
Comment out 2020_CAPE_C768 for now.
ulmononian Nov 8, 2024
bd9dba5
Update 2020_CAPE_C768 test file.
ulmononian Nov 8, 2024
d708a09
Turn post on for 2020_CAPE.
ulmononian Nov 8, 2024
ff4c91b
Remove test_case.yaml.
ulmononian Nov 8, 2024
704a251
Remove 2020_CAPE_C768, update ufs_test.yaml.
ulmononian Nov 8, 2024
b292cb9
Revert create_xml for now.
ulmononian Nov 8, 2024
d3a3ca8
Update HSD input data paths in fv3_run files and baseline_setup.yaml;…
ulmononian Nov 8, 2024
07ba905
Fix big in bcw IN.
ulmononian Nov 8, 2024
31ac2a9
Merge branch 'ufs-community:develop' into feature/enable_test_cases
ulmononian Nov 8, 2024
3f091b3
point to fv3 feature branch to combine in PR-2489
jkbk2004 Nov 8, 2024
304d878
Update ufs_test.yaml
ulmononian Nov 8, 2024
ada6d96
Update baroclinic_wave
ulmononian Nov 8, 2024
e366ec5
undo combining upp inline post update PR-2489
jkbk2004 Nov 9, 2024
059aa74
update create_log and reduce FHMAX baroclinic_wave
jkbk2004 Nov 11, 2024
922330f
add tests-dev RT log hercules: passed
jkbk2004 Nov 11, 2024
c91c6c4
add noaacloud RT logs: passed
zach1221 Nov 11, 2024
2bacc1d
Update fv3_slurm.IN_jet
jkbk2004 Nov 11, 2024
ee291dd
Update baroclinic_wave
jkbk2004 Nov 11, 2024
f2d689e
update create_xml.py for INPUTDATA_LM4
jkbk2004 Nov 11, 2024
6957dd9
Update fv3_slurm.IN_jet
ulmononian Nov 11, 2024
4554965
Update fv3_slurm.IN_jet
ulmononian Nov 11, 2024
20a921d
add tests-dev orion RT log: passed
jkbk2004 Nov 12, 2024
ec937be
add tests-dev hera RT log: passed
jkbk2004 Nov 12, 2024
812251d
add tests-dev RT log: passed
jkbk2004 Nov 12, 2024
e61876f
fv3_slurm.IN_jet update.
Nov 12, 2024
69cd30c
More jet change.s
Nov 12, 2024
36a1377
Remove custom fv3_slurm.IN_jet file and revert Jet python path exports.
Nov 12, 2024
841ab6f
Update test_changes.list
jkbk2004 Nov 12, 2024
6a39e65
Update create_log.py
ulmononian Nov 12, 2024
292d4c7
Update 2020_CAPE.IN
ulmononian Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions modulefiles/ufs_noaacloud.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ loads UFS Model prerequisites for NOAA Parallelworks/Intel

prepend_path("MODULEPATH", "/contrib/spack-stack-rocky8/spack-stack-1.6.0/envs/fms-2024.01/install/modulefiles/Core")
prepend_path("MODULEPATH", "/apps/modules/modulefiles")
prepend_path("PATH", "/contrib/EPIC/bin")
load("gnu")
load("stack-intel")
load("stack-intel-oneapi-mpi")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.10.0"
gnu_ver=os.getenv("gnu_ver") or ""
load(pathJoin("gnu", gnu_ver))

stack_intel_ver=os.getenv("stack_intel_ver") or ""
load(pathJoin("stack-intel", stack_intel_ver))

stack_impi_ver=os.getenv("stack_impi_ver") or "2021.10.0"
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
unload("gnu")
stack_intel_oneapi_mpi_ver=os.getenv("stack_intel_oneapi_mpi_ver") or ""
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))

gnu_ver=os.getenv("gnu_ver") or ""
unload(pathJoin("gnu", gnu_ver))

cmake_ver=os.getenv("cmake_ver") or "3.23.1"
load(pathJoin("cmake", cmake_ver))

load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
Expand Down
18 changes: 9 additions & 9 deletions tests-dev/baseline_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ jet:
QUEUE: batch
COMPILE_QUEUE: batch
PARTITION: xjet
dprefix: /mnt/lfs4/HFIP/hfv3gfs/${USER}
DISKNM: /mnt/lfs4/HFIP/hfv3gfs/role.epic/RT
STMP: /mnt/lfs4/HFIP/hfv3gfs/${USER}/RT_BASELINE
PTMP: /mnt/lfs4/HFIP/hfv3gfs/${USER}/RT_RUNDIRS
dprefix: /lfs5/HFIP/hfv3gfs/${USER}
DISKNM: /lfs5/HFIP/hfv3gfs/role.epic/RT
STMP: /lfs5/HFIP/hfv3gfs/${USER}/RT_BASELINE
PTMP: /lfs5/HFIP/hfv3gfs/${USER}/RT_RUNDIRS
RUNDIR_ROOT:
SCHEDULER: slurm
INPUTDATA_ROOT: /mnt/lfs4/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /mnt/lfs4/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /mnt/lfs4/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/BM_IC-20220207
INPUTDATA_ROOT: /lfs5/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/input-data-20240501
INPUTDATA_ROOT_WW3: /lfs5/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/input-data-20240501/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC: /lfs5/HFIP/hfv3gfs/role.epic/RT/NEMSfv3gfs/BM_IC-20220207
derecho:
QUEUE: main
COMPILE_QUEUE: main
Expand All @@ -82,8 +82,8 @@ noaacloud:
PARTITION:
dprefix: /lustre
DISKNM: /contrib/ufs-weather-model/RT
STMP: /lustre/stmp4
PTMP: /lustre/stmp2
STMP: /lustre/stmp
PTMP: /lustre/stmp
RUNDIR_ROOT:
SCHEDULER: slurm
INPUTDATA_ROOT: /contrib/ufs-weather-model/RT/NEMSfv3gfs/input-data-20240501
Expand Down
153 changes: 89 additions & 64 deletions tests-dev/create_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,27 @@
import subprocess
import yaml
from datetime import datetime
#import datetime
from ufs_test_utils import get_testcase, write_logfile, delete_files, machine_check_off

def get_timestamps(path):
"""Obtain experiment starting and ending time marks through file timestamps

Args:
path (str): experiment log directory
Returns:
str: experiment starting and ending time strings
"""
dir_list = os.listdir(path)
dt = []
for f in dir_list:
m_time = os.path.getmtime(path+f)
dt.append(datetime.fromtimestamp(m_time))
dtsort=sorted(dt)
return str(dtsort[0]),str(dtsort[-1])

def finish_log():
"""Collects regression test results and generates log file.
"""Collect regression test results and generate log file.
"""
UFS_TEST_YAML = str(os.getenv('UFS_TEST_YAML'))
PATHRT = os.getenv('PATHRT')
Expand Down Expand Up @@ -40,40 +57,46 @@ def finish_log():
COMPILE_ID = apps
COMPILE_LOG = 'compile_'+COMPILE_ID+'.log'
COMPILE_LOG_TIME ='compile_'+COMPILE_ID+'_timestamp.txt'
with open('./logs/log_'+MACHINE_ID+'/'+COMPILE_LOG) as f:
if "[100%] Linking Fortran executable" in f.read():
COMPILE_PASS += 1
f.seek(0)
for line in f:
if 'export RUNDIR_ROOT=' in line:
RUNDIR_ROOT=line.split("=")[1]
break
compile_err = RUNDIR_ROOT.strip('\n')+'/compile_'+COMPILE_ID+'/err'
with open(compile_err) as ferr:
contents = ferr.read()
count_warning = contents.count(": warning #")
count_remarks = contents.count(": remark #")
ferr.close()
warning_log = ""
if count_warning > 0:
warning_log = "("+str(count_warning)+" warnings"
if count_remarks > 0:
warning_log+= ","+str(count_remarks)+" remarks)"
flog = open('./logs/log_'+MACHINE_ID+'/'+COMPILE_LOG_TIME)
timing_data = flog.read()
first_line = timing_data.split('\n', 1)[0]
etime = int(first_line.split(",")[4].strip()) - int(first_line.split(",")[1].strip())
btime = int(first_line.split(",")[3].strip()) - int(first_line.split(",")[2].strip())
etime_min, etime_sec = divmod(int(etime), 60)
etime_min = f"{etime_min:02}"; etime_sec = f"{etime_sec:02}"
btime_min, btime_sec = divmod(int(btime), 60)
btime_min = f"{btime_min:02}"; btime_sec = f"{btime_sec:02}"
time_log = " ["+etime_min+':'+etime_sec+', '+btime_min+':'+btime_sec+"]"
flog.close()
compile_log = "PASS -- COMPILE "+COMPILE_ID+time_log+warning_log+"\n"
else:
compile_log = "FAIL -- COMPILE "+COMPILE_ID+"\n"
f.close()
COMPILE_CHECK1 ='Compile '+COMPILE_ID+' Completed'
COMPILE_CHECK2 ='[100%] Linking Fortran executable'
try:
with open('./logs/log_'+MACHINE_ID+'/'+COMPILE_LOG) as f:
if COMPILE_CHECK1 in f.read() or COMPILE_CHECK2 in f.read():
COMPILE_PASS += 1
f.seek(0)
for line in f:
if 'export RUNDIR_ROOT=' in line:
RUNDIR_ROOT=line.split("=")[1]
break
compile_err = RUNDIR_ROOT.strip('\n')+'/compile_'+COMPILE_ID+'/err'
with open(compile_err) as ferr:
contents = ferr.read()
count_warning = contents.count(": warning #")
count_remarks = contents.count(": remark #")
ferr.close()
warning_log = ""
if count_warning > 0:
warning_log = "("+str(count_warning)+" warnings"
if count_remarks > 0:
warning_log+= ","+str(count_remarks)+" remarks)"
flog = open('./logs/log_'+MACHINE_ID+'/'+COMPILE_LOG_TIME)
timing_data = flog.read()
first_line = timing_data.split('\n', 1)[0]
etime = int(first_line.split(",")[4].strip()) - int(first_line.split(",")[1].strip())
btime = int(first_line.split(",")[3].strip()) - int(first_line.split(",")[2].strip())
etime_min, etime_sec = divmod(int(etime), 60)
etime_min = f"{etime_min:02}"; etime_sec = f"{etime_sec:02}"
btime_min, btime_sec = divmod(int(btime), 60)
btime_min = f"{btime_min:02}"; btime_sec = f"{btime_sec:02}"
time_log = " ["+etime_min+':'+etime_sec+', '+btime_min+':'+btime_sec+"]"
flog.close()
compile_log = "PASS -- COMPILE "+COMPILE_ID+time_log+warning_log+"\n"
else:
compile_log = "FAIL -- COMPILE "+COMPILE_ID+"\n"
f.close()
except FileNotFoundError:
compile_log = "FAIL -- COMPILE "+COMPILE_ID+"\n"
print('./logs/log_'+MACHINE_ID+'/'+COMPILE_LOG+': does not exist')
run_logs += compile_log
else:
PASS_TESTS = True
Expand All @@ -94,47 +117,49 @@ def finish_log():
PASS_CHECK = 'Test '+TEST_ID+' PASS'
MAXS_CHECK = 'The maximum resident set size (KB)'
pass_flag = False
create_dep_flag = False
if (CREATE_BASELINE == 'true' and not DEP_RUN == ""):
create_dep_flag = True
if not create_dep_flag:
try:
with open('./logs/log_'+MACHINE_ID+'/'+TEST_LOG) as f:
if PASS_CHECK in f.read():
pass_flag = True
f.close()
if pass_flag:
f = open('./logs/log_'+MACHINE_ID+'/'+TEST_LOG_TIME)
timing_data = f.read()
first_line = timing_data.split('\n', 1)[0]
etime = str(int(first_line.split(",")[4].strip()) - int(first_line.split(",")[1].strip()))
rtime = str(int(first_line.split(",")[3].strip()) - int(first_line.split(",")[2].strip()))
etime_min, etime_sec = divmod(int(etime), 60)
etime_min = f"{etime_min:02}"; etime_sec = f"{etime_sec:02}"
rtime_min, rtime_sec = divmod(int(rtime), 60)
rtime_min = f"{rtime_min:02}"; rtime_sec = f"{rtime_sec:02}"
time_log = " ["+etime_min+':'+etime_sec+', '+rtime_min+':'+rtime_sec+"]"
f.close()
with open('./logs/log_'+MACHINE_ID+'/'+TEST_LOG) as f:
if pass_flag :
f.close()
except FileNotFoundError:
print('./logs/log_'+MACHINE_ID+'/'+TEST_LOG+': does not exist')
if pass_flag:
f = open('./logs/log_'+MACHINE_ID+'/'+TEST_LOG_TIME)
timing_data = f.read()
first_line = timing_data.split('\n', 1)[0]
etime = str(int(first_line.split(",")[4].strip()) - int(first_line.split(",")[1].strip()))
rtime = str(int(first_line.split(",")[3].strip()) - int(first_line.split(",")[2].strip()))
etime_min, etime_sec = divmod(int(etime), 60)
etime_min = f"{etime_min:02}"; etime_sec = f"{etime_sec:02}"
rtime_min, rtime_sec = divmod(int(rtime), 60)
rtime_min = f"{rtime_min:02}"; rtime_sec = f"{rtime_sec:02}"
time_log = " ["+etime_min+':'+etime_sec+', '+rtime_min+':'+rtime_sec+"]"
f.close()
if pass_flag :
with open('./logs/log_'+MACHINE_ID+'/'+TEST_LOG) as f:
rtlog_file = f.readlines()
for line in rtlog_file:
if MAXS_CHECK in line:
memsize= line.split('=')[1].strip()
test_log = 'PASS -- TEST '+TEST_ID+time_log+' ('+memsize+' MB)\n'
PASS_NR += 1
else:
test_log = 'FAIL -- TEST '+TEST_ID+'\n'
failed_list.append(TEST_NAME+' '+RT_COMPILER)
FAIL_NR += 1
run_logs += test_log
f.close()
f.close()
else:
test_log = 'FAIL -- TEST '+TEST_ID+'\n'
failed_list.append(TEST_NAME+' '+RT_COMPILER)
FAIL_NR += 1
run_logs += test_log
run_logs += '\n'
write_logfile(filename, "a", output=run_logs)

TEST_START_TIME = os.getenv('TEST_START_TIME')
TEST_END_TIME = os.getenv('TEST_END_TIME')
start_time = datetime.strptime(TEST_START_TIME, "%Y%m%d %H:%M:%S")
end_time = datetime.strptime(TEST_END_TIME, "%Y%m%d %H:%M:%S")
TEST_START_TIME, TEST_END_TIME = get_timestamps('./logs/log_'+MACHINE_ID+'/')

clean_START_TIME= TEST_START_TIME.split('.')[0]
start_time = datetime.strptime(clean_START_TIME, "%Y-%m-%d %H:%M:%S")
clean_END_TIME= TEST_END_TIME.split('.')[0]
end_time = datetime.strptime(clean_END_TIME, "%Y-%m-%d %H:%M:%S")

hours, remainder= divmod((end_time - start_time).total_seconds(), 3600)
minutes, seconds= divmod(remainder, 60)
hours = int(hours); minutes=int(minutes); seconds =int(seconds)
Expand Down
6 changes: 4 additions & 2 deletions tests-dev/create_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def rocoto_create_entries(RTPWD,MACHINE_ID,INPUTDATA_ROOT,INPUTDATA_ROOT_WW3,INP
<!ENTITY INPUTDATA_ROOT "{INPUTDATA_ROOT}">
<!ENTITY INPUTDATA_ROOT_WW3 "{INPUTDATA_ROOT_WW3}">
<!ENTITY INPUTDATA_ROOT_BMIC "{INPUTDATA_ROOT_BMIC}">
<!ENTITY INPUTDATA_LM4 "{INPUTDATA_ROOT}/LM4_input_data">
<!ENTITY RUNDIR_ROOT "{RUNDIR_ROOT}">
<!ENTITY NEW_BASELINE "{NEW_BASELINE}">
]>
Expand Down Expand Up @@ -195,6 +196,7 @@ def write_runtest_env():
export INPUTDATA_ROOT={INPUTDATA_ROOT}
export INPUTDATA_ROOT_WW3={INPUTDATA_ROOT_WW3}
export INPUTDATA_ROOT_BMIC={INPUTDATA_ROOT_BMIC}
export INPUTDATA_LM4={INPUTDATA_ROOT}/LM4_input_data
export PATHRT={PATHRT}
export PATHTR={PATHTR}
export NEW_BASELINE={NEW_BASELINE}
Expand All @@ -216,8 +218,8 @@ def write_runtest_env():
export RTVERBOSE=false
"""
if ( MACHINE_ID == 'jet' ):
runtest_envs+="export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH"
runtest_envs+="export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages"
runtest_envs += f"export PATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/bin:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/bin:$PATH\n"
runtest_envs += f"export PYTHONPATH=/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/envs/ufs-weather-model/lib/python3.8/site-packages:/lfs4/HFIP/hfv3gfs/software/miniconda3/4.8.3/lib/python3.8/site-packages\n"

with open(filename,"w+") as f:
f.writelines(runtest_envs)
Expand Down
Loading