Skip to content

Instantly share code, notes, and snippets.

@thomasweng15
Last active March 29, 2019 23:23
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 thomasweng15/5a933bf7f099522797933258c9a0e9ce to your computer and use it in GitHub Desktop.
Save thomasweng15/5a933bf7f099522797933258c9a0e9ce to your computer and use it in GitHub Desktop.
Bash script for running sbatch
#!/usr/bin/env bash
#SBATCH --nodes=1
#SBATCH --partition=GPU
#SBATCH --ntasks-per-node=1
#SBATCH --time=96:00:00
#SBATCH --gres=gpu:1
#SBATCH --mem=8G
#SBATCH --exclude=compute-0-[9,11,13]
#SBATCH -o /home/USER/out.txt
#SBATCH -e /home/USER/out.txt
set -x
set -u
set -e
module load singularity
module load cuda-90
CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=$1 singularity exec --nv SINGULARITY.img python SCRIPT.py /scratch/DATADIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment