Skip to content

Commit df844d2

Browse files
CI updates (#404)
* updated scripts for using amazon cluster * cleaning up parallel works scripts
1 parent 73e2869 commit df844d2

3 files changed

Lines changed: 31 additions & 16 deletions

File tree

.github/.parallelworks/checkout.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh -xe
1+
#!/bin/sh -e
22

33
##############################################################################
44
## User set up variables
@@ -55,5 +55,6 @@ mkdir -p ${logDir}
5555
## clone code
5656
cd ${testDir}
5757
git clone --recursive https://github.com/NOAA-GFDL/SHiELD_build.git && cd SHiELD_build && ./CHECKOUT_code |& tee ${logDir}/checkout.log
58+
5859
## Check out the PR
5960
cd ${testDir}/SHiELD_SRC/GFDL_atmos_cubed_sphere && git fetch origin ${branch}:toMerge && git merge toMerge

.github/.parallelworks/compile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh -xe
1+
#!/bin/sh -e
22

33
##############################################################################
44
## User set up variables

.github/.parallelworks/run_test.sh

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -xe
1+
#!/bin/bash -e
22
ulimit -s unlimited
33
##############################################################################
44
## User set up variables
@@ -9,7 +9,7 @@ intelVersion=2023.2.0
99
##############################################################################
1010
## HPC-ME container
1111
container=/contrib/containers/noaa-intel-prototype_2023.09.25.sif
12-
container_env_script=/contrib/containers/load_spack_noaa-intel-mlong.sh
12+
container_env_script=/contrib/containers/load_spack_noaa-intel.sh
1313

1414
#Parse Arguments
1515
branch=main
@@ -50,10 +50,16 @@ echo "test is $testname"
5050

5151
## Set up the directories
5252
MODULESHOME=/usr/share/lmod/lmod
53+
source $MODULESHOME/init/sh
54+
#export MODULEPATH=/mnt/shared/manual_modules:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core:/apps/modules/modulefiles:/apps/modules/modulefamilies/intel
55+
#module load intel/2022.1.2
56+
#module load impi/2022.1.2
57+
module use -a /usr/share/Modules/modulefiles /opt/intel/impi/2019.5.281/intel64/modulefiles /apps/modules/modulefiles
58+
module load intelmpi
59+
module load nccmp
5360
testDir=${dirRoot}/${intelVersion}/GFDL_atmos_cubed_sphere/${branch}/${commit}
5461
logDir=${testDir}/log
5562
baselineDir=${dirRoot}/baselines/intel/${intelVersion}
56-
5763
## Run the CI Test
5864
# Define the builddir testscriptdir and rundir BUILDDIR is used by test scripts
5965
# Set the BUILDDIR for the test script to use
@@ -65,15 +71,23 @@ runDir=${BUILDDIR}/CI/BATCH-CI
6571
cd ${testscriptDir}
6672
set -o pipefail
6773
# Execute the test piping output to log file
68-
./${testname} " --partition=compute --mpi=pmi2 --job-name=${commit}_${testname} singularity exec -B /contrib -B /apps ${container} ${container_env_script}" |& tee ${logDir}/run_${testname}.log
69-
74+
./${testname} " --partition=compute --mpi=pmi2 --job-name=${commit}_${testname} singularity exec -B /contrib -B /usr/lib64/libpmi2.so ${container} ${container_env_script}" |& tee ${logDir}/run_${testname}.log
7075
## Compare Restarts to Baseline
71-
source $MODULESHOME/init/sh
72-
export MODULEPATH=/mnt/shared/manual_modules:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core:/apps/modules/modulefiles:/apps/modules/modulefamilies/intel
73-
module load intel/2022.1.2
74-
module load netcdf
75-
module load nccmp
76-
for resFile in `ls ${baselineDir}/${testname}`
77-
do
78-
nccmp -d ${baselineDir}/${testname}/${resFile} ${runDir}/${testname}/RESTART/${resFile}
79-
done
76+
#The following tests are not expectred to have run-to-run reproducibility:
77+
#d96_2k.solo.bubble
78+
#d96_2k.solo.bubble.n0
79+
#d96_2k.solo.bubble.nhK
80+
if [[ ${testname} == "d96_2k.solo.bubble" || ${testname} == "d96_2k.solo.bubble.n0" || ${testname} == "d96_2k.solo.bubble.nhK" ]]
81+
then
82+
echo "${testname} is not expected to reproduce so answers were not compared"
83+
else
84+
#source $MODULESHOME/init/sh
85+
#export MODULEPATH=/mnt/shared/manual_modules:/usr/share/modulefiles/Linux:/usr/share/modulefiles/Core:/usr/share/lmod/lmod/modulefiles/Core:/apps/modules/modulefiles:/apps/modules/modulefamilies/intel
86+
#module load intel/2022.1.2
87+
#module load netcdf
88+
for resFile in `ls ${baselineDir}/${testname}`
89+
do
90+
echo "comparing ${runDir}/${testname}/RESTART/${resFile}"
91+
nccmp -d ${baselineDir}/${testname}/${resFile} ${runDir}/${testname}/RESTART/${resFile}
92+
done
93+
fi

0 commit comments

Comments
 (0)