Last active
December 2, 2019 01:04
-
-
Save 05jd/fa144195fa49226d1741a5f2dbdb8573 to your computer and use it in GitHub Desktop.
Slurm batch submission template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Schedules and Resources | |
#SBATCH --nodes=1 | |
##SBATCH --ntasks-per-node=1 | |
##SBATCH --cpus-per-task=2 | |
#SBATCH --mem=16GB | |
#SBATCH --time=24:00:00 # Default: one-hour 01:00:00 | |
# GPU resources to request | |
# - Format: "gpu:{NUM_GPUS}" or "gpu:{GPU_TYPE}:{NUM_GPUS}" (if you want to specify a gpu type) | |
# - Avaiable GPU types: p1080(? need-to-confirm), k80, p40, p100, v100 | |
#SBATCH --gres=gpu:p100:1 | |
#SBATCH --job-name={_REPLACE_BY_JOB_NAME_} # Specify the name of this job. | |
#SBATCH --mail-type=END,FAIL | |
#SBATCH --mail-user=jaedeok@cims.nyu.edu | |
#SBATCH --output=%x.%j.out | |
echo "Puring all modules previously loaded" | |
module purge | |
echo "Loading python-3.7.3 cuda-10.0 cudnn-v7.6" | |
module load python3/intel/3.7.3 cuda/10.0.130 cudnn/10.0v7.6.2.24 | |
# Activate a virtual environment if needed. | |
source $HOME/venv/tc-1.3/bin/activate | |
# Log when this job started | |
echo "Begin at `date`" | |
# From here you can write your own commands to run. | |
# e.g. | |
# python train.py | |
{_REPLACE_BY_YOUR_OWN_COMMANDS_TO_RUN_} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment