Newer
Older
#!/bin/bash
####################################
# ARIS slurm script template #
# #
# Submit script: sbatch filename #
# #
####################################
#SBATCH --job-name=run_mpi # Job name
#SBATCH --output=J.out # Stdout (%j expands to jobId)
#SBATCH --error=J.err # Stderr (%j expands to jobId)
#SBATCH --ntasks=256 # Number of processor cores (i.e. tasks)
#SBATCH --nodes=256 # Number of nodes requested
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#SBATCH --ntasks-per-node=1 # Tasks per node
#SBATCH --cpus-per-task=20 # Threads per task
#SBATCH --time=00:10:00 # walltime
#SBATCH --mem=50G # memory per NODE
#SBATCH --partition=compute # Partition
#SBATCH --account=testproj # Accounting project
export I_MPI_FABRICS=shm:dapl
## LOAD MODULES ##
module purge # clean up loaded modules
# load necessary modules
module load gnu ##/7.2.0
module load intel ##/17.0.4
module load intelmpi ##/5.1.3.258
module load binutils
module load cuda
output="/users/guest/petyros/Training/Outputs" ##/Inputs
partition="compute"
## Change this to the directory of your executable!
gpu_prog="/users/guest/petyros/Training/MPI/MPI"
gpu_prog1="/users/guest/petyros/Training/MPI/MPI-OpenMP"
##rm -f "$output/MPI.$partition"
export OMP_PROC_BIND=spread
for n;
do
for tr in 1 2 5 10 20
do
export OMP_NUM_THREADS=$tr
srun $gpu_prog1 $n $n >> "$output/MPI-OpenMP.$partition"
done
#srun $gpu_prog $n $n >> "$output/MPI.$partition"
done