forked from NOAA-EMC/WW3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b30f472
commit dc4bc5f
Showing
1 changed file
with
109 additions
and
0 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,109 @@ | ||
#!/bin/sh | ||
|
||
#SBATCH -n 40 | ||
#SBATCH -q batch | ||
#SBATCH -t 04:00:00 | ||
#SBATCH -A marine-cpu | ||
#SBATCH -J w3_pdlib | ||
#SBATCH -o w3_pdlib.out | ||
|
||
|
||
REGDIR=/scratch1/NCEPDEV/climate/Matthew.Masarik/projs/reproduce_mpi/regtest_ww3_ufs1.1-unstr/runs/ww3-blk-exp-02/regtests | ||
|
||
module purge | ||
module load cmake/3.20.1 | ||
module load intel/2022.1.2 | ||
module load impi/2022.1.2 | ||
module use /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack | ||
module load hpc/1.2.0 | ||
module load hpc-intel/2022.1.2 | ||
module load hpc-impi/2022.1.2 | ||
module load libpng/1.6.37 | ||
module load zlib/1.2.11 | ||
module load jasper/2.0.25 | ||
module load hdf5/1.10.6 | ||
module load netcdf/4.7.4 | ||
module load bacio/2.4.1 | ||
module load g2/3.4.5 | ||
module load w3emc/2.9.2 | ||
module load esmf/8.3.0b09 | ||
export METIS_PATH=/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hpc-stack/parmetis-4.0.3/install | ||
export SCOTCH_PATH=/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hpc-stack/scotch-v7.0.3/install | ||
export path_build_root=$REGDIR/build | ||
|
||
function run_pdlib() { | ||
if [ $# -ne 3 ]; then | ||
echo 'usage: run_pdlib <nprocs> <worktag> <grid>' | ||
return | ||
fi | ||
local nprocs=$1 | ||
local worktag=$2 | ||
local grid=$3 | ||
./bin/run_cmake_test -b slurm -o all -S -T -s MPI -s PDLIB -i input_unstr -w work_${grid}_${nprocs}_${worktag} -g $grid -f -p srun -n $nprocs ../model ww3_ufs1.1 | ||
return | ||
} | ||
|
||
function cmp_pdlib() { | ||
if [ $# -ne 2 ]; then | ||
echo 'usage: cmp_pdlib <wrkdir1> <wrkdir2>' | ||
return | ||
fi | ||
local wrkdir1=$1 | ||
local wrkdir2=$2 | ||
./bin/test.comp ww3_ufs1.1 work_${wrkdir1} work_${wrkdir2} | ||
return | ||
} | ||
|
||
|
||
echo ' ' | ||
echo ' **********************************************' | ||
echo ' *** WAVEWATCH III - PDLIB ***' | ||
echo ' **********************************************' | ||
echo ' ' | ||
|
||
cd $REGDIR | ||
[[ -d ${path_build_root} ]] && rm -rf ${path_build_root} | ||
|
||
# A-RUN1: 39 vs. 40 | ||
GRD="a" | ||
TAG="run1" | ||
NP0=39 | ||
NP1=40 | ||
run_pdlib ${NP0} ${TAG} $GRD | ||
run_pdlib ${NP1} ${TAG} $GRD | ||
cmp_pdlib ${GRD}_${NP0}_${TAG} ${GRD}_${NP1}_${TAG} | ||
du -hs $REGDIR/ww3_ufs1.1/work_${GRD}_${NP0}_${TAG}/* | ||
du -hs $REGDIR/ww3_ufs1.1/work_${GRD}_${NP1}_${TAG}/* | ||
|
||
|
||
# B-RUN1: 39 vs. 40 | ||
GRD="b" | ||
TAG="run1" | ||
NP0=39 | ||
NP1=40 | ||
run_pdlib ${NP0} ${TAG} $GRD | ||
run_pdlib ${NP1} ${TAG} $GRD | ||
cmp_pdlib ${GRD}_${NP0}_${TAG} ${GRD}_${NP1}_${TAG} | ||
du -hs $REGDIR/ww3_ufs1.1/work_${GRD}_${NP0}_${TAG}/* | ||
du -hs $REGDIR/ww3_ufs1.1/work_${GRD}_${NP1}_${TAG}/* | ||
|
||
# C-RUN1: 39 vs. 40 | ||
GRD="c" | ||
TAG="run1" | ||
NP0=39 | ||
NP1=40 | ||
run_pdlib ${NP0} ${TAG} $GRD | ||
run_pdlib ${NP1} ${TAG} $GRD | ||
cmp_pdlib ${GRD}_${NP0}_${TAG} ${GRD}_${NP1}_${TAG} | ||
du -hs $REGDIR/ww3_ufs1.1/work_${GRD}_${NP0}_${TAG}/* | ||
du -hs $REGDIR/ww3_ufs1.1/work_${GRD}_${NP1}_${TAG}/* | ||
|
||
|
||
echo "done running." | ||
|
||
[[ -d ${path_build_root} ]] && rm -rf ${path_build_root}* | ||
echo ' ' | ||
echo ' **************************************************************' | ||
echo ' * end of WAVEWATCH III - PDLIB regtest *' | ||
echo ' **************************************************************' | ||
echo ' ' |