-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Parallelworks CI runscripts to .github/.parallelworks Updating…
… workflows to us a new version of the Parallelworks CI runscripts Updating the cleanup workflow to cleanup the weekly chron job CI in addition to the PR CI rundirs (#359)
- Loading branch information
1 parent
44e20a7
commit 970884a
Showing
6 changed files
with
282 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# .parallelworks Directory | ||
|
||
The .parallelworks directory stores the CI scripts that reside on Parallelworks | ||
These scripts are executed via the GitHub Actions Workflows in .github/workflows | ||
|
||
On Parallelworks these scripts are installed at: /contrib/fv3/GFDL_atmos_cubed_sphere_CI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/sh -xe | ||
|
||
############################################################################## | ||
## User set up variables | ||
## Root directory for CI | ||
dirRoot=/contrib/fv3 | ||
## Intel version to be used | ||
intelVersion=2023.2.0 | ||
############################################################################## | ||
## HPC-ME container | ||
container=/contrib/containers/noaa-intel-prototype_2023.09.25.sif | ||
container_env_script=/contrib/containers/load_spack_noaa-intel.sh | ||
############################################################################## | ||
|
||
#Parse Arguments | ||
branch=main | ||
commit=none | ||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-b|--branch) | ||
branch="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-h|--hash) | ||
commit="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
*) | ||
echo "unknown argument" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
echo "branch is $branch" | ||
echo "commit is $commit" | ||
|
||
## Set up the directories | ||
testDir=${dirRoot}/${intelVersion}/GFDL_atmos_cubed_sphere/${branch}/${commit} | ||
logDir=${testDir}/log | ||
export MODULESHOME=/usr/share/lmod/lmod | ||
## create directories | ||
rm -rf ${testDir} | ||
mkdir -p ${logDir} | ||
# salloc commands to start up | ||
#2 tests layout 8,8 (16 nodes) | ||
#2 tests layout 4,8 (8 nodes) | ||
#9 tests layout 4,4 (18 nodes) | ||
#5 tests layout 4,1 (5 nodes) | ||
#17 tests layout 2,2 (17 nodes) | ||
#salloc --partition=p2 -N 64 -J ${branch} sleep 20m & | ||
|
||
## clone code | ||
cd ${testDir} | ||
git clone --recursive https://github.com/NOAA-GFDL/SHiELD_build.git && cd SHiELD_build && ./CHECKOUT_code |& tee ${logDir}/checkout.log | ||
## Check out the PR | ||
cd ${testDir}/SHiELD_SRC/GFDL_atmos_cubed_sphere && git fetch origin ${branch}:toMerge && git merge toMerge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/bin/sh -xe | ||
|
||
############################################################################## | ||
## User set up variables | ||
## Root directory for CI | ||
dirRoot=/contrib/fv3 | ||
## Intel version to be used | ||
intelVersion=2023.2.0 | ||
############################################################################## | ||
## HPC-ME container | ||
container=/contrib/containers/noaa-intel-prototype_2023.09.25.sif | ||
container_env_script=/contrib/containers/load_spack_noaa-intel.sh | ||
############################################################################## | ||
|
||
#Parse Arguments | ||
branch=main | ||
commit=none | ||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-b|--branch) | ||
branch="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-h|--hash) | ||
commit="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-c|--config) | ||
config="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
--hydro) | ||
hydro="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
--bit) | ||
bit="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-m|--mode) | ||
mode="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
*) | ||
echo "unknown argument" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ -z $mode ] || [ -z $bit ] || [ -z $hydro ] || [ -z $config ] | ||
then | ||
echo "must specify config, hydro, bit, and mode options for compile" | ||
exit 1 | ||
fi | ||
|
||
echo "branch is $branch" | ||
echo "commit is $commit" | ||
echo "mode is $mode" | ||
echo "bit is $bit" | ||
echo "hydro is $hydro" | ||
echo "config is $config" | ||
|
||
if [ $hydro = "sw" ] && [ $config = "shield" ] | ||
then | ||
echo "this combination should not be tested" | ||
else | ||
## Set up the directories | ||
testDir=${dirRoot}/${intelVersion}/GFDL_atmos_cubed_sphere/${branch}/${commit} | ||
logDir=${testDir}/log | ||
# Set up build | ||
cd ${testDir}/SHiELD_build/Build | ||
#Define External Libs path | ||
export EXTERNAL_LIBS=${dirRoot}/externallibs | ||
# Build SHiELD | ||
set -o pipefail | ||
singularity exec -B /contrib ${container} ${container_env_script} "./COMPILE ${config} ${hydro} ${bit} ${mode} intel clean" |& tee ${logDir}/compile_${config}_${hydro}_${bit}_${mode}_intel.out | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/bin/bash -xe | ||
ulimit -s unlimited | ||
############################################################################## | ||
## User set up variables | ||
## Root directory for CI | ||
dirRoot=/contrib/fv3 | ||
## Intel version to be used | ||
intelVersion=2023.2.0 | ||
############################################################################## | ||
## HPC-ME container | ||
container=/contrib/containers/noaa-intel-prototype_2023.09.25.sif | ||
container_env_script=/contrib/containers/load_spack_noaa-intel-mlong.sh | ||
|
||
#Parse Arguments | ||
branch=main | ||
commit=none | ||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-b|--branch) | ||
branch="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-h|--hash) | ||
commit="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-t|--test) | ||
testname="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
*) | ||
echo "unknown argument" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ -z $testname ] | ||
then | ||
echo "must specify a test name with -t" | ||
exit 1 | ||
fi | ||
|
||
echo "branch is $branch" | ||
echo "commit is $commit" | ||
echo "test is $testname" | ||
|
||
## Set up the directories | ||
MODULESHOME=/usr/share/lmod/lmod | ||
testDir=${dirRoot}/${intelVersion}/GFDL_atmos_cubed_sphere/${branch}/${commit} | ||
logDir=${testDir}/log | ||
baselineDir=${dirRoot}/baselines/intel/${intelVersion} | ||
|
||
## Run the CI Test | ||
# Define the builddir testscriptdir and rundir BUILDDIR is used by test scripts | ||
# Set the BUILDDIR for the test script to use | ||
export BUILDDIR="${testDir}/SHiELD_build" | ||
testscriptDir=${BUILDDIR}/RTS/CI | ||
runDir=${BUILDDIR}/CI/BATCH-CI | ||
|
||
# Run CI test scripts | ||
cd ${testscriptDir} | ||
set -o pipefail | ||
# Execute the test piping output to log file | ||
./${testname} " --partition=compute --mpi=pmi2 --job-name=${commit}_${testname} singularity exec -B /contrib -B /apps ${container} ${container_env_script}" |& tee ${logDir}/run_${testname}.log | ||
|
||
## Compare Restarts to Baseline | ||
source $MODULESHOME/init/sh | ||
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 | ||
module load intel/2022.1.2 | ||
module load netcdf | ||
module load nccmp | ||
for resFile in `ls ${baselineDir}/${testname}` | ||
do | ||
nccmp -d ${baselineDir}/${testname}/${resFile} ${runDir}/${testname}/RESTART/${resFile} | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters