surveilling-surveillance/detection/util/sbatch_template.sh

32 lines
816 B
Bash
Raw Permalink Normal View History

2021-05-20 20:20:48 +00:00
#!/bin/bash
#SBATCH --partition=deep --qos=normal
#SBATCH --nodes=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=16G
# only use the following on partition with GPUs
#SBATCH --gres=gpu:1
#SBATCH --job-name="NAME"
#SBATCH --output=/deep/group/aicc-bootcamp/wind/job_logs/NAME-%j.out
# only use the following if you want email notification
####SBATCH --mail-user=youremailaddress
####SBATCH --mail-type=ALL
# list out some useful information (optional)
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
# sample process (list hostnames of the nodes you've requested)
NPROCS=`srun --nodes=${SLURM_NNODES} bash -c 'hostname' |wc -l`
echo NPROCS=$NPROCS
COMMAND
# done
echo "Done"