Skip to content

Commit 685c8d3

Browse files
author
Julian Giordani
committed
Merge changes from gadi and setonix together
2 parents 752de5d + 53dfc1c commit 685c8d3

6 files changed

+57
-11
lines changed
File renamed without changes.
File renamed without changes.

gadi_container_go.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash -l
2+
3+
# load Singularity
4+
module load singularity
5+
module load openmpi/4.1.4
6+
7+
8+
export singularityDir=/g/data/m18/software/underworld/
9+
10+
# Define the container to use
11+
export containerImage=$singularityDir/underworld-215.sif
12+
13+
env
14+
cat timed_model.py
15+
echo ""
16+
echo "---------- Running Job ----------"
17+
echo ""
18+
export TIME_LAUNCH_MPI=`date +%s%N | cut -b1-13`
19+
mpiexec -n $PBS_NCPUS singularity exec $containerImage bash -c "TIME_LAUNCH_PYTHON=\`date +%s%N | cut -b1-13\` python3 timed_model.py"

params.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
#!/bin/bash
2-
export JOBS="4 5 6 7 8"
3-
export UW_NAME="Strong_Scaling_Init_Test"
4-
export SCALING_TYPE=2 # 1=weak, 2=strong
2+
export JOBS="1 2 4 6 8"
3+
#export JOBS="1 2 4 6 8 10 12 14 16 18 20 22"
4+
#export JOBS="22 22"
5+
export UW_NAME="2.15.0_WeakScaling"
6+
export SCALING_TYPE=1 # 1=weak, 2=strong
57

68
export UW_MODEL="SolDB3d" # "SolDB3d" for dim3, though penalty method probably needed for q1.
79
export PICKLENAME=None #"SolDB3d_Gadi_1e-11.pickle" #"conv_test_results_high_res_tighter_take2.pickle" # set to "None" to disable conv testing
810
export UW_ENABLE_IO="0"
911

10-
export WALLTIME="00:15:00"
11-
export ACCOUNT="director2186"
12+
export WALLTIME="00:10:00"
13+
export ACCOUNT="m18"
1214
export QUEUE="normal" # normal or express
1315

1416
export UW_ORDER=1
1517
export UW_DIM=3
16-
export SCALING_BASE=256
18+
export SCALING_BASE=16
1719

1820
# Test style - UW_MAX_ITS (+ve, recommended >100): Fixed work, (-ve): Accuracy (UW_SOL_TERANCE is used)
1921
export UW_MAX_ITS=50 # set to negative for accuracy test, positive for fixed iterative work irrepective of result fidelity

scaling_test_job_launcher.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,13 @@ do
4242
export NTASKS="$((${i}*${i}*${i}))"
4343
export EXPORTVARS="UW_RESOLUTION,NTASKS,UW_ENABLE_IO,UW_ORDER,UW_DIM,UW_SOL_TOLERANCE,UW_MAX_ITS,UW_PENALTY,UW_MODEL,PICKLENAME"
4444
if [ $BATCH_SYS == "PBS" ] ; then
45-
# memory requirement guess: 3GB * nprocs
46-
MEMORY="$((4*${NTASKS}))GB"
4745
PBSTASKS=`python3 <<<"print((int(${NTASKS}/48) + (${NTASKS} % 48 > 0))*48)"` # round up to nearest 48 as required by nci
48-
CMD="qsub -v ${EXPORTVARS} -N ${NAME} -l storage=gdata/m18,ncpus=${PBSTASKS},mem=${MEMORY},walltime=${WALLTIME},wd -P ${ACCOUNT} -q ${QUEUE} gadi_baremetal_go.sh"
46+
# memory requirement guess: 3GB * nprocs
47+
MEMORY="$((3*${PBSTASKS}))GB"
48+
CMD="qsub -v ${EXPORTVARS} -N ${NAME} -l storage=gdata/m18+gdata/q97,ncpus=${PBSTASKS},mem=${MEMORY},walltime=${WALLTIME},wd -P ${ACCOUNT} -q ${QUEUE} gadi_container_go.sh"
4949
echo ${CMD}
5050
${CMD}
5151
else
52-
#export IMAGE=/group/m18/singularity/underworld/underworld2_2.11.0b.sif
5352
#export IMAGE=/group/m18/singularity/underworld/underworld2_2.10.0b_rc.sif
5453
#export IMAGE=/group/m18/singularity/underworld/underworld2_v29.sif
5554
if [[ "$QUEUE" == "express" ]] ; then
@@ -59,7 +58,11 @@ do
5958
fi
6059
export OUTNAME="Res_"${UW_RESOLUTION}"_Nproc_"${NTASKS}"_JobID_"%j".out"
6160

62-
CMD="sbatch --export=${EXPORTVARS} --job-name=${NAME} --output=${OUTNAME} --ntasks=${NTASKS} --time=${WALLTIME} --account=${ACCOUNT} setonix_baremetal_go.sh"
61+
# Container
62+
#CMD="sbatch --export=IMAGE,${EXPORTVARS} --job-name=${NAME} --output=${OUTNAME} --ntasks=${NTASKS} --time=${WALLTIME} --account=${ACCOUNT} --partition=${QUEUE} setonix_container_go.sh"
63+
64+
# Baremetal
65+
CMD="sbatch --export=IMAGE,${EXPORTVARS} --job-name=${NAME} --output=${OUTNAME} --ntasks=${NTASKS} --time=${WALLTIME} --account=${ACCOUNT} setonix_baremetal_go.sh"
6366
echo ${CMD}
6467
${CMD}
6568
fi

setonix_container_go.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -l
2+
3+
# load Singularity
4+
module load singularity/3.8.6
5+
6+
export UW_VIS_PORT=0
7+
8+
# as per
9+
# https://support.pawsey.org.au/documentation/pages/viewpage.action?pageId=116131367#UsewithSingularity-RunningPythonandR
10+
# we unset all the host python-related ENV vars
11+
unset $( env | grep ^PYTHON | cut -d = -f 1 | xargs )
12+
13+
scontrol show job ${SLURM_JOBID} -ddd
14+
env
15+
cat timed_model.py
16+
echo ""
17+
echo "---------- Running Job ----------"
18+
echo ""
19+
export TIME_LAUNCH_MPI=`date +%s%N | cut -b1-13`
20+
srun --export=all -u -n ${SLURM_NTASKS} singularity exec -B ${PWD}:/work $IMAGE bash -c "cd work ; TIME_LAUNCH_PYTHON=\`date +%s%N | cut -b1-13\` python3 timed_model.py"
21+
# execute
22+
#srun --export=all -u -n $SLURM_NTASKS singularity exec -B ${PWD}:/work $containerImage bash -c "whoami; cd /work/; python3 $model"

0 commit comments

Comments
 (0)