Commit 492c23de authored by Devanshu Agrawal's avatar Devanshu Agrawal
Browse files

Add summit scripts.

parent 14471d13
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
#!/bin/bash

#BSUB -P MED107
#BSUB -W 2:00
#BSUB -nnodes 6
#BSUB -J boston
#BSUB -o output/boston.o
#BSUB -e output/boston.e

#BSUB -q batch
#BSUB -rn

# this must match the -nnodes argument above
NNODES=6

set -ex

PROJDIR=$PROJWORK/med107
USERDIR=$PROJDIR/$USER
REPODIR=$USERDIR/bottleneck_nngp
JOBSCRIPTDIR=$REPODIR/torch_experiments

# set up env
. /sw/summit/init/profile
module load ibm-wml-ce
conda activate $USERDIR/condaenvs/torch

jsrun -n$((NNODES*6)) -a1 -g1 -c7 -r6 \
	-E LD_LIBRARY_PATH \
	--bind=proportional-packed:7 --launch_distribution=packed \
	$JOBSCRIPTDIR/mapper.sh \
		$(which python) $JOBSCRIPTDIR/main.py \
		--dataset=boston \
		--depths=1,%depth% \
		--widths=%width% \
		--vb=0.1 \
		--vw=1.0 \
		--vn=0.1 \
		--train_samples=100 \
		--test_samples=1000 \
		--lr=1e-1 \
		--iters=100 \
		--gpu=0 \
		--manual_grad \
+33 −0
Original line number Diff line number Diff line
#!/bin/bash
set -e

# post-bottleneck depths and bottleneck widths
depths=(10 20 30 40 50 60 70 80 90)
widths=(2 8 32 128)

# get argument
CMD=$*

# list env variables
#env

# get MPI env variables
LOCALRANK=$OMPI_COMM_WORLD_LOCAL_RANK
RANK=$OMPI_COMM_WORLD_RANK
JOB=$LSB_JOBID

# calculate architecture given rank
DEPTH=${depths[$((RANK/4))]}
WIDTH=${widths[$((RANK%4))]}

# substitute into command
CMD=${CMD//%depth%/$DEPTH}
CMD=${CMD//%width%/$WIDTH}

CMD=${CMD//%rank%/$RANK}
CMD=${CMD//%localrank%/$LOCALRANK}
CMD=${CMD//%jobid%/$JOB}

# run command
echo Running command: \"$CMD\"
$CMD