forked from NERSC/sc21-dl-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit_pm.sh
executable file
·43 lines (36 loc) · 1.15 KB
/
submit_pm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#SBATCH -C gpu
#SBATCH -A ntrain4_g
#SBATCH -q debug
#SBATCH --ntasks-per-node 4
#SBATCH --cpus-per-task 32
#SBATCH --gpus-per-task 1
#SBATCH --time=0:10:00
#SBATCH --image=romerojosh/containers:sc21_tutorial
#SBATCH -J pm-crop64
#SBATCH -o %x-%j.out
DATADIR=/pscratch/sd/j/joshr/nbody2hydro/datacopies
LOGDIR=${SCRATCH}/sc21-dl-tutorial/logs
mkdir -p ${LOGDIR}
args="${@}"
hostname
#~/dummy
export NCCL_NET_GDR_LEVEL=PHB
# Profiling
if [ "${ENABLE_PROFILING:-0}" -eq 1 ]; then
echo "Enabling profiling..."
NSYS_ARGS="--trace=cuda,cublas,nvtx --kill none -c cudaProfilerApi -f true"
NSYS_OUTPUT=${PROFILE_OUTPUT:-"profile"}
export PROFILE_CMD="nsys profile $NSYS_ARGS -o $NSYS_OUTPUT"
fi
BENCHY_CONFIG=benchy-conf.yaml
BENCHY_OUTPUT=${BENCHY_OUTPUT:-"benchy_output"}
sed "s/.*output_filename.*/ output_filename: ${BENCHY_OUTPUT}.json/" ${BENCHY_CONFIG} > benchy-run-${SLURM_JOBID}.yaml
export BENCHY_CONFIG_FILE=benchy-run-${SLURM_JOBID}.yaml
set -x
srun -u shifter -V ${DATADIR}:/data -V ${LOGDIR}:/logs \
bash -c "
source export_DDP_vars.sh
${PROFILE_CMD} python train.py ${args}
"
rm benchy-run-${SLURM_JOBID}.yaml