submit.sh 678 Bytes
Newer Older
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
#!/bin/bash

bin=nekrs
project_id=nfi114
time="00:30"

#source $NEKRS_INSTALL_DIR/bin/nekrs.bashrc
export OCCA_VERBOSE

case=$1

#if [ $# -ne 3 ]; then
#  echo "usage: $0 <setup file> <number of nodes> <GPUs per node> <hh:mm>"
#  echo "usage: $0 <setup file> <number of nodes> <GPUs per node>"
#  exit 0
#fi
if [ $# -eq 4 ]; then
  time=$4
fi

if [ ! -f $case.par ]; then
  echo "Cannot find" $case.par
  exit 1
fi

mkdir -p $OCCA_CACHE_DIR 2>/dev/null

nodes=$2
gpu_per_node=$3
let nn=$nodes*$gpu_per_node

cmd="bsub -nnodes $nodes -W $time -P $project_id -J nekRS jsrun -n$nn -r$gpu_per_node -a1 -c1 -g1 -b packed:1 -d packed $bin --setup $case"
echo $cmd
echo $cmd > qq
$cmd