Skip to content

Commit

Permalink
Update cpld_gridgen regression test for wcoss2.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jun 3, 2022
1 parent 8b948ba commit e441ea0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
9 changes: 9 additions & 0 deletions modulefiles/build.wcoss2.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ load(pathJoin("g2", g2_ver))
cray_pals_ver=os.getenv("cray_pals_ver") or "1.0.12"
load(pathJoin("cray-pals", cray_pals_ver))

udunits_ver=os.getenv("udunits_ver") or "2.2.28"
load(pathJoin("udunits", udunits_ver))

gsl_ver=os.getenv("gsl_ver") or "2.7"
load(pathJoin("gsl", gsl_ver))

nco_ver=os.getenv("nco_ver") or "4.9.7"
load(pathJoin("nco", nco_ver))

setenv("HPC_OPT","/apps/ops/para/libs")
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304")
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.7")
Expand Down
29 changes: 24 additions & 5 deletions reg_tests/cpld_gridgen/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ check_results() {
echo "....MISSING file" | tee -a $PATHRT/$REGRESSIONTEST_LOG
test_status=FAIL
else
nccmp -dmfqS $(basename ${file}) $file >>${PATHRT}/nccmp_${TEST_NAME}.log 2>&1 && d=$? || d=$?
$NCCMP -dmfqS $(basename ${file}) $file >>${PATHRT}/nccmp_${TEST_NAME}.log 2>&1 && d=$? || d=$?
if [[ $d -ne 0 ]]; then
echo "....NOT OK" | tee -a $PATHRT/$REGRESSIONTEST_LOG
test_status=FAIL
Expand Down Expand Up @@ -115,12 +115,22 @@ COMPILE_LOG=compile.log
REGRESSIONTEST_LOG=RegressionTests_$target.$compiler.log
rm -f fail_test* $COMPILE_LOG run_*.log nccmp_*.log summary.log

if [[ $target = hera ]]; then
if [[ $target = wcoss2 ]]; then
STMP=${STMP:-/lfs/h2/emc/stmp/$USER}
export MOM6_FIXDIR=/lfs/h2/emc/global/noscrub/George.Gayno/ufs_utils.git/reg_tests/cpld_gridgen/fix_mom6
BASELINE_ROOT=/lfs/h2/emc/global/noscrub/George.Gayno/ufs_utils.git/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-GFS-DEV}
export APRUN="mpiexec -n 1 -ppn 1 --cpu-bind core"
QUEUE=${QUEUE:-dev}
SBATCH_COMMAND="./cpld_gridgen.sh"
NCCMP=/lfs/h2/emc/global/noscrub/George.Gayno/util/nccmp/nccmp-1.8.5.0/src/nccmp
elif [[ $target = hera ]]; then
STMP=${STMP:-/scratch1/NCEPDEV/stmp4/$USER}
export MOM6_FIXDIR=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/fix_mom6
BASELINE_ROOT=/scratch1/NCEPDEV/nems/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-nems}
QUEUE=${QUEUE:-batch}
NCCMP=nccmp
PARTITION=hera
SBATCH_COMMAND="./cpld_gridgen.sh"
elif [[ $target = orion ]]; then
Expand All @@ -129,6 +139,7 @@ elif [[ $target = orion ]]; then
BASELINE_ROOT=/work/noaa/nems/role-nems/ufs_utils/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-nems}
QUEUE=${QUEUE:-batch}
NCCMP=nccmp
PARTITION=orion
ulimit -s unlimited
SBATCH_COMMAND="./cpld_gridgen.sh"
Expand All @@ -138,6 +149,7 @@ elif [[ $target = jet ]]; then
BASELINE_ROOT=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/cpld_gridgen/baseline_data
ACCOUNT=${ACCOUNT:-h-nems}
QUEUE=${QUEUE:-batch}
NCCMP=nccmp
PARTITION=xjet
ulimit -s unlimited
SBATCH_COMMAND="./cpld_gridgen.sh"
Expand Down Expand Up @@ -232,9 +244,16 @@ while read -r line || [ "$line" ]; do
cp $PATHRT/parm/grid.nml.IN $RUNDIR
cd $RUNDIR

sbatch --wait --ntasks-per-node=1 --nodes=1 --mem=4G -t 0:05:00 -A $ACCOUNT -q $QUEUE -J $TEST_NAME \
--partition=$PARTITION -o $PATHRT/run_${TEST_NAME}.log -e $PATHRT/run_${TEST_NAME}.log \
--wrap "$SBATCH_COMMAND $TEST_NAME" && d=$? || d=$?
if [[ $target = wcoss2 ]]; then
qsub -V -o $PATHRT/run_${TEST_NAME}.log -e $PATHRT/run_${TEST_NAME}.log -q $QUEUE -A $ACCOUNT \
-Wblock=true -l walltime=00:05:00 -N $TEST_NAME -l select=1:ncpus=1:mem=8GB -v RESNAME=$TEST_NAME $SBATCH_COMMAND
d=0

else
sbatch --wait --ntasks-per-node=1 --nodes=1 --mem=4G -t 0:05:00 -A $ACCOUNT -q $QUEUE -J $TEST_NAME \
--partition=$PARTITION -o $PATHRT/run_${TEST_NAME}.log -e $PATHRT/run_${TEST_NAME}.log \
--wrap "$SBATCH_COMMAND $TEST_NAME" && d=$? || d=$?
fi

if [[ d -ne 0 ]]; then
error "Batch job for test $TEST_NAME did not finish successfully. Refer to run_${TEST_NAME}.log"
Expand Down
4 changes: 3 additions & 1 deletion ush/cpld_gridgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function edit_namelist {
-e "s/DO_POSTWGTS/$DO_POSTWGTS/g"
}

export RESNAME=$1
export RESNAME=${RESNAME:-$1}
export DEBUG=.false.
export MASKEDIT=.false.
export DO_POSTWGTS=.false.
Expand Down Expand Up @@ -95,6 +95,8 @@ if [ ! -d ${OUTDIR_PATH} ]; then
mkdir -p ${OUTDIR_PATH}
fi

cd ${OUTDIR_PATH}

edit_namelist < grid.nml.IN > grid.nml
$APRUN ./cpld_gridgen

Expand Down

0 comments on commit e441ea0

Please sign in to comment.