Difference between revisions of "Example SLURM-GPU-Job-Scripts"

From UFRC
Jump to navigation Jump to search
(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...")
 
m (Redirected page to Sample SLURM Scripts#GPU job)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:SLURM]]
+
#REDIRECT [[Sample_SLURM_Scripts#GPU_job]]
{{HPG2}}
 
 
 
 
 
== GPU/CUDA Job Script ==
 
<source lang=bash>
 
 
 
#!/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
 
 
 
</source>
 

Latest revision as of 22:02, 8 February 2017