Skip to content

Instantly share code, notes, and snippets.

@affans
Created August 22, 2018 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save affans/442a9ac186df115a2166a7c1f3fecb10 to your computer and use it in GitHub Desktop.
Save affans/442a9ac186df115a2166a7c1f3fecb10 to your computer and use it in GitHub Desktop.
a sample sbatch
using srun from command line
srun -J $jobname -n $np -o "job%4t.out" -D $exehome $(srunargs) $exename $exeflags $worker_arg
or sbatch script
#!/bin/sh
#SBATCH --partition=defq
#SBATCH --nodes=16
#SBATCH --ntasks=512
#SBATCH --job-name="hello_test"
#SBATCH --output=test-srun.out
echo "SLURM_JOBID="$SLURM_JOBID
echo "SLURM_JOB_NODELIST"=$SLURM_JOB_NODELIST
echo "SLURM_NNODES"=$SLURM_NNODES
echo "SLURMTMPDIR="$SLURMTMPDIR
echo "working directory = "$SLURM_SUBMIT_DIR
module load EasyBuild
module load OpenCV
module list
srun opencv_traincascade -data data2 -vec positives2.vec -bg bg2.txt -numPos 20000 -numNeg 1400 -numStages 19 -w 50 -h 50 --numTreads 20
@affans
Copy link
Author

affans commented Aug 22, 2018

#SBATCH --array=1-8

srun ./my_program.exe $SLURM_ARRAY_TASK_ID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment