Skip to content

Commit

Permalink
Update ./reg_tests/cpld_gridgen/rt.sh to run regression
Browse files Browse the repository at this point in the history
tests on wcoss2.

Fixes ufs-community#559.
  • Loading branch information
GeorgeGayno-NOAA committed Jun 7, 2022
1 parent 8fe9166 commit 34f578c
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions reg_tests/cpld_gridgen/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,30 @@ while read -r line || [ "$line" ]; do
cd $RUNDIR

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

# rm -f $RUNDIR/bad.${TEST_NAME}

TEST=$(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)

# qsub -o $PATHRT/run_${TEST_NAME}.log -e $PATHRT/run_${TEST_NAME}.log -q $QUEUE -A $ACCOUNT \
# -Wblock=true -l walltime=00:01:00 -N chgres_summary -l select=1:ncpus=1:mem=100MB -W depend=afternotok:$TEST << EOF
#!/bin/bash
# touch $RUNDIR/bad.${TEST_NAME}
#EOF
# if [[ -f $RUNDIR/bad.${TEST_NAME} ]]; then
# error "Batch job for test $TEST_NAME did not finish successfully. Refer to run_${TEST_NAME}.log"
# fi

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"
if [[ d -ne 0 ]]; then
error "Batch job for test $TEST_NAME did not finish successfully. Refer to run_${TEST_NAME}.log"
fi

fi

check_results
Expand Down

0 comments on commit 34f578c

Please sign in to comment.