Example SLURM-GPU-Job-Scripts

From UFRC
Revision as of 19:41, 31 May 2016 by Yingz (talk | contribs) (Created page with "Category:SLURM {{HPG2}} == GPU/CUDA Job Script == <source lang=bash> #!/bin/bash #SBATCH --job-name=gpuMemTest #SBATCH --output=gpuMemTest.out #SBATCH --error=gpuMemTes...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hpg2 wiki logo.png

HiPerGator 2.0 documentation


GPU/CUDA Job Script

#!/bin/bash
#SBATCH --job-name=gpuMemTest
#SBATCH --output=gpuMemTest.out
#SBATCH --error=gpuMemTest.err
#SBATCH --ntasks=2
#SBATCH --cpus-per-task=1
#SBATCH --distribution=cyclic:cyclic
#SBATCH --time=12:00:00
#SBATCH --mem-per-cpu=2000
#SBATCH --mail-type=ALL
#SBATCH --mail-user=taylor@rc.ufl.edu
#SBATCH --account=ufhpc
#SBATCH --qos=ufhpc-b
#SBATCH --partition=hpg1-gpu
#SBATCH --gres=gpu:tesla:2

module load cuda/5.5

cudaMemTest=/home/taylor/Cuda/cudaMemTest/cuda_memtest

cudaDevs=$(echo $CUDA_VISIBLE_DEVICES | sed -e 's/,/ /g')

for cudaDev in $cudaDevs
do
  echo cudaDev = $cudaDev
  #srun --gres=gpu:tesla:1 -n 1 --exclusive ./gpuMemTest.sh > gpuMemTest.out.$cudaDev 2>&1 &
  $cudaMemTest --num_passes 1 --device $cudaDev > gpuMemTest.out.$cudaDev 2>&1 &
done
wait