User Tools

Site Tools


slurm

SLURM Scheduler

Example Script for GPU Jobs

The file /home/itp/volker/Slurm/blacklist contains a line-by-line listing of nodes we wish to avoid.

#!/bin/bash
#SBATCH --output /home/itp/volker/Genga/Jobs/Debris/ReRuns-01/formation/pro_2/Logs/runm_5-%j.out
#SBATCH --job-name pro_2/runm_5
#SBATCH --partition tasna
#SBATCH --account gpu
#SBATCH --ntasks 1
#SBATCH --gres gpu:1
#OLDSBATCH --time 0-00:10:00
#SBATCH --exclude=/home/itp/volker/Slurm/blacklist
#SBATCH --mail-user volker@physik.uzh.ch

genga=/home/itp/volker/Source/genga-dev/source/genga_sm20
scratch=/zbox/data/volker/Debris/ReRuns-01/formation/pro_2/runm_5

echo $genga
echo $scratch
echo ""

echo "***** LAUNCHING *****"
echo `date '+%F %H:%M:%S'`
echo ""

cd $scratch
export DATE=`date +%F_%H%M`
time srun $genga > Run_$DATE.log

echo ""
echo "***** DONE *****"
echo `date '+%F %H:%M:%S'`
echo ""

Example Script for MPI Jobs

#!/bin/bash
#SBATCH -o /home/itp/volker/Mydisk/Jobs/AdaC/1024/Logs/t03000_E4__R1-%j.out
#SBATCH -J AdaC/1024/t03000_E4__R1
#SBATCH -p zbox
#SBATCH --time 0-24:00:00
#SBATCH --ntasks=256 --exclusive
#SBATCH --exclude=/home/itp/volker/Slurm/blacklist
#SBATCH --mail-user=volker@physik.uzh.ch

home=/home/itp/volker
scratch=/zbox/project/volker

nml=$home/Mydisk/NML/AdaC/1024/t03000_E4__R1.nml
ramses=$home/Source/ramses-dev/trunk/ramses/bin/ppd3d
data=$scratch/Mydisk/AdaC/1024/t03000_E4__R1
cd $data

echo $nml
echo $ramses
echo "***"
pwd

echo ""
echo "***** LAUNCHING *****"
echo `date '+%F %H:%M:%S'`
echo ""

export DATE=`date +%F_%H%M`
time srun $ramses $nml > $data/Run_$DATE.log

echo ""
echo "***** DONE *****"
echo `date '+%F %H:%M:%S'`
echo ""

Example Script for Node-Sharing Single-Core Jobs

#!/bin/bash
#SBATCH -o /home/itp/volker/Mydisk/Jobs/Viz4/AdaC/1024/Logs/t03000_E4__R1-%j.out
#SBATCH -J Viz4/AdaC/1024/t03000_E4__R1
#SBATCH -p zbox
#SBATCH --ntasks=1
#SBATCH --time=0-06:00:00
#SBATCH --exclude=/home/itp/volker/Slurm/blacklist
#SBATCH --mail-user=volker@physik.uzh.ch

# Load Python Environment
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Source
source $HOME/.local/bin/virtualenvwrapper.sh
workon scipy

imin=1
imax=47
opts="--together"
#fps=15

home=/home/itp/volker
scratch=/zbox/project/volker

script1=$home/Source/Viz4/reduce.py
script2=$home/Source/Viz4/plot_quad_xy.py
script3=$home/Source/Viz4/plot_quad_rz.py
script4=$home/Source/Viz4/plot_quad_r.py

data=$scratch/Mydisk/AdaC/1024/t03000_E4__R1

echo $data
echo $script1 $imin $imax --lofi
echo $script2 $imin $imax
echo $script3 $imin $imax 
echo $script4 $imin $imax 

echo ""
echo "***** LAUNCHING *****"
echo `date '+%F %H:%M:%S'`
echo ""

cd $data
time python $script1 $imin $imax --lofi
time python $script2 $imin $imax
time python $script3 $imin $imax
time python $script4 $imin $imax

# mencoder "mf://quad_r_*.png" -mf w=1600:h=1200:fps=${fps}:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o quad_r.avi
# mencoder "mf://quad_rz_*.png" -mf w=1600:h=1200:fps=${fps}:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o quad_rz.avi
# mencoder "mf://quad_xy_*.png" -mf w=1600:h=1200:fps=${fps}:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o quad_xy.avi

echo ""
echo "***** DONE *****"
echo `date '+%F %H:%M:%S'`
echo ""

slurm.txt · Last modified: 2015/03/01 15:13 by Volker