Skip to content

Commit

Permalink
Update the wcoss2 script to run the grid tests in parallel.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Sep 23, 2022
1 parent 5bffe1d commit 8c4d532
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions reg_tests/grid_gen/driver.wcoss2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
# Set WORK_DIR to your working directory. Set the PROJECT_CODE and QUEUE
# as appropriate.
#
# Invoke the script with no arguments. A series of daily-
# chained jobs will be submitted. To check the queue, type:
# "qstat -u USERNAME".
# Invoke the script with no arguments. Several tests will be started
# in parallel. To check the queue, type: "qstat -u USERNAME".
#
# Log output from the suite will be in LOG_FILE. Once the suite
# has completed, a summary is placed in SUM_FILE.
# Log output from the tests will be stored in their own LOG_FILE.
# Once the tests have completed, a summary is placed in SUM_FILE.
#
# A test fails when its output does not match the baseline files as
# determined by the "nccmp" utility. The baseline files are stored in
Expand Down Expand Up @@ -67,44 +66,49 @@ rm -fr $WORK_DIR
# C96 uniform grid
#-----------------------------------------------------------------------------

TEST1=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
LOG_FILE1=${LOG_FILE}01
TEST1=$(qsub -V -o $LOG_FILE1 -e $LOG_FILE1 -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
-N c96.uniform -l select=1:ncpus=30:mem=40GB $PWD/c96.uniform.sh)

#-----------------------------------------------------------------------------
# C96 uniform grid using viirs vegetation data.
#-----------------------------------------------------------------------------

TEST2=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
-N c96.viirs.vegt -l select=1:ncpus=30:mem=40GB -W depend=afterok:$TEST1 $PWD/c96.viirs.vegt.sh)
LOG_FILE2=${LOG_FILE}02
TEST2=$(qsub -V -o $LOG_FILE2 -e $LOG_FILE2 -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
-N c96.viirs.vegt -l select=1:ncpus=30:mem=40GB $PWD/c96.viirs.vegt.sh)

#-----------------------------------------------------------------------------
# gfdl regional grid
#-----------------------------------------------------------------------------

TEST3=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
-N gfdl.regional -l select=1:ncpus=30:mem=40GB -W depend=afterok:$TEST2 $PWD/gfdl.regional.sh)
LOG_FILE3=${LOG_FILE}03
TEST3=$(qsub -V -o $LOG_FILE3 -e $LOG_FILE3 -q $QUEUE -A $PROJECT_CODE -l walltime=00:07:00 \
-N gfdl.regional -l select=1:ncpus=30:mem=40GB $PWD/gfdl.regional.sh)

#-----------------------------------------------------------------------------
# esg regional grid
#-----------------------------------------------------------------------------

TEST4=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
-N esg.regional -l select=1:ncpus=30:mem=40GB -W depend=afterok:$TEST3 $PWD/esg.regional.sh)
LOG_FILE4=${LOG_FILE}04
TEST4=$(qsub -V -o $LOG_FILE4 -e $LOG_FILE4 -q $QUEUE -A $PROJECT_CODE -l walltime=00:07:00 \
-N esg.regional -l select=1:ncpus=30:mem=40GB $PWD/esg.regional.sh)

#-----------------------------------------------------------------------------
# Regional GSL gravity wave drag test.
#-----------------------------------------------------------------------------

TEST5=$(qsub -V -o $LOG_FILE -e $LOG_FILE -q $QUEUE -A $PROJECT_CODE -l walltime=00:10:00 \
-N rsg.gsl.gwd -l select=1:ncpus=30:mem=40GB -W depend=afterok:$TEST4 $PWD/regional.gsl.gwd.sh)
LOG_FILE5=${LOG_FILE}05
TEST5=$(qsub -V -o $LOG_FILE5 -e $LOG_FILE5 -q $QUEUE -A $PROJECT_CODE -l walltime=00:07:00 \
-N rsg.gsl.gwd -l select=1:ncpus=30:mem=40GB $PWD/regional.gsl.gwd.sh)

#-----------------------------------------------------------------------------
# Create summary log.
#-----------------------------------------------------------------------------

qsub -V -o ${LOG_FILE} -e ${LOG_FILE} -q $QUEUE -A $PROJECT_CODE -l walltime=00:02:00 \
-N grid_summary -l select=1:ncpus=1:mem=100MB -W depend=afterok:$TEST5 << EOF
-N grid_summary -l select=1:ncpus=1:mem=100MB -W depend=afterok:$TEST1:$TEST2:$TEST3:$TEST4:$TEST5 << EOF
#!/bin/bash
cd ${this_dir}
grep -a '<<<' $LOG_FILE | grep -v echo > $SUM_FILE
grep -a '<<<' ${LOG_FILE}* | grep -v echo > $SUM_FILE
EOF

0 comments on commit 8c4d532

Please sign in to comment.