Skip to content
MPI.slurm 1.46 KiB
Newer Older
petros.anastasiadis's avatar
petros.anastasiadis committed
#!/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
petros.anastasiadis's avatar
petros.anastasiadis committed
#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