Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Commit

Permalink
Cluster batch file
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Walker committed Apr 24, 2020
1 parent 9677e4e commit c520868
Show file tree
Hide file tree
Showing 8 changed files with 168 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

include config.mk

CODES :=oneD #twoD
CODES :=/oneD #twoD
CODE_DIR :=$(addprefix $(SOURCEPATH), $(CODES))
BIN_DIR :=$(SOURCEPATH)bin
UTIL_DIR :=$(SOURCEPATH)utilities
BIN_DIR :=$(SOURCEPATH)/bin
UTIL_DIR :=$(SOURCEPATH)/utilities
UTIL_BIN :=$(BIN_DIR)/util
TESTDIR :=$(UTIL_BIN)/tests
EQ_BIN :=$(BIN_DIR)/eqobj
Expand Down
101 changes: 101 additions & 0 deletions src/hsweep-all-batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#!/bin/bash

#SBATCH -J walker # name of job

#SBATCH -A niemeyek # name of my sponsored account, e.g. class or research group

#SBATCH -p mime4 # name of partition or queue

#SBATCH -F ./nrg-nodes

#SBATCH -N 2

#SBATCH --ntasks-per-node=1

#SBATCH --cpus-per-task=20

#SBATCH --time=7-00:00:00

#SBATCH -o walker.out # name of output file for this submission script

#SBATCH -e walker.err # name of error file for this submission script

#SBATCH --mail-type=BEGIN,END,FAIL # send email when job begins, ends or aborts

#SBATCH [email protected] # send email to this address

# load any software environment module required for app

# run my jobs

#/scratch/a1/mpich3i/bin/mpirun -bootstrap slurm --host compute-e-1,compute-e-2 -n 40 ./bin/euler S ./oneD/tests/eulerTest.json ./rslts tpb 64 gpuA 20 nX 200000 lx 21 tf 1

echo $SLURM_JOB_ID

hostname
ls rslts
rm rslts/* || true
ls rslts
tfile="./trslt/otime.dat"
opath="./rslts"
rm $tfile || true

mkdir -p $opath
mkdir -p $(dirname $tfile)

tfs=(0.06 1.2)
nxStart=100000

for eq in euler heat
do
if [ $eq == 'euler' ]
then
tf=0.06
else
tf=1.2
fi
for sc in S C
do
for t in $(seq 6 10)
do
for dvt in $(seq 0 1)
do
tpbz=$((2**$t))
tpb=$(($tpbz + $dvt*$tpbz/2))
for g in $(seq 0 5 100)
do
snx0=$SECONDS
for x in $(seq 0 7)
do
if [[ $x -gt 0 && $x -lt 7 ]]
then
midpt=1
else
midpt=0
fi
for dvx in $(seq 0 $midpt)
do
echo -------- START ------------
nxo=$(($nxStart * 2**$x))
nx=$(($nxo + $dvx*$nxo/2))
lx=$(($nxo/10000 + 1))
S0=$SECONDS
/scratch/a1/mpich3i/bin/mpirun -n 40 --hostfile ./nrg-nodes ./bin/$eq $sc ./oneD/tests/"$eq"Test.json $opath tpb $tpb gpuA $g nX $nx lx $lx tf $tf
echo len, eq, sch, tpb, gpuA, nX, tf
s1=$(($SECONDS-$S0))
echo $lx, $eq, $sc, $tpb, $g, $nx $tf took $s1
echo -------- END ------------
sleep 0.05
done
done
snx1=$(($SECONDS-$snx0))
snxout=$(($snx1/60))
echo "----------------------WRITING TIME-------------------------"
echo $snxout
echo $eq "|" $sc "|" $tpb "|" $g :: $snxout >> $tfile
echo "----------------------END WRITING TIME----------------------"
done
done
done
done
done
10 changes: 5 additions & 5 deletions src/launch/OSU_cluster/hSweep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ rm rslts/* || true
ls rslts

tfile="trslt/otime.dat"
opath="../../rslts"

opath="$MSCRATCH/rslts"
testdir=$HSWEEPDIR/src/oneD/tests
rm $tfile || true

eqs=(euler heat)
Expand All @@ -39,13 +39,13 @@ do
tf=$tfs[$ix]
for sc in S C
do
for t in $(seq 6 9)
for t in $(seq 6 10)
do
for dvt in $(seq 0 1)
do
tpbz=$((2**$t))
tpb=$(($tpbz + 0.5*$dvt*$tpbz))
for g in $(seq 0 2 20)
for g in $(seq 0 10 100)
do
snx0=$SECONDS
for x in $(seq 0 7)
Expand All @@ -64,7 +64,7 @@ do
lx=$(($nxo/10000 + 1))
S0=$SECONDS

$MPIPATH/bin/mpirun -np $NSLOTS -machinefile $TMPDIR/machines $bindir/$eq $sc $testdir/"$eq"Test.json $opath tpb $tpb gpuA $g nX $nx lx $lx tf $tf
$MPIPATH/bin/mpirun -np 40 -machinefile $HSWEEPDIR/src/nrg-nodes $HSWEEPDIR/src/bin/$eq $sc $testdir/"$eq"Test.json $opath tpb $tpb gpuA $g nX $nx lx $lx tf $tf

echo len, eq, sch, tpb, gpuA, nX
s1=$(($SECONDS-$S0))
Expand Down
26 changes: 26 additions & 0 deletions src/launch/slurm-batch-files/hsweep-batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

#SBATCH -J shsweep # name of job

#SBATCH -A niemeyek # name of my sponsored account, e.g. class or research group

#SBATCH -p mime4 # name of partition or queue

#SBATCH -F ./nrg-nodes

#SBATCH -o shsweep.out # name of output file for this submission script

#SBATCH -e shsweep.err # name of error file for this submission script

#SBATCH --mail-type=BEGIN,END,FAIL # send email when job begins, ends or aborts

#SBATCH [email protected] # send email to this address

#SBATCH --time=7-00:00:00
#SBATCH --ntasks=40

# load any software environment module required for app
# run my jobs
/scratch/a1/mpich3i/bin/mpirun -bootstrap slurm --host compute-e-1,compute-e-2 -n 40 ./bin/euler S ./oneD/tests/eulerTest.json ./rslts tpb 64 gpuA 20 nX 200000 lx 21 tf 1

28 changes: 28 additions & 0 deletions src/launch/slurm-batch-files/test-hsweep-batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

#SBATCH -J testjob # name of job

#SBATCH -A niemeyek # name of my sponsored account, e.g. class or research group

#SBATCH -p mime4 # name of partition or queue

#SBATCH -F ./test-nrg-nodes

#SBATCH -o testjob.out # name of output file for this submission script

#SBATCH -e testjob.err # name of error file for this submission script

#SBATCH --mail-type=BEGIN,END,FAIL # send email when job begins, ends or aborts

#SBATCH [email protected] # send email to this address

#SBATCH --time=7-00:00:00
#SBATCH --ntasks=40

# load any software environment module required for app
# run my jobs
for i in 10000 20000
do
/scratch/a1/mpich3i/bin/mpirun -bootstrap slurm --host compute-e-3,compute-e-4 -n 40 ./bin/euler S ./oneD/tests/eulerTest.json ./rslts tpb 64 gpuA 0 nX $i lx 21 tf 0.5
done
2 changes: 2 additions & 0 deletions src/launch/slurm-batch-files/test-nrg-nodes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
compute-e-3
compute-e-4
2 changes: 2 additions & 0 deletions src/nrg-nodes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
compute-e-1
compute-e-2
2 changes: 1 addition & 1 deletion src/oneD/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# run make DEF="-DNOS"


MAKEPATH:=$(SOURCEPATH)oneD
MAKEPATH:=$(SOURCEPATH)/oneD

# LPATH+=

Expand Down

0 comments on commit c520868

Please sign in to comment.