GPU+MPI+OpenMP


#!/bin/bash

#SBATCH -J job_name                # name of the job

#SBATCH -p standard-low            # name of the partition: available options "standard,standard-low,gpu,gpu-low,hm"

#SBATCH -N 1                       # no of Nodes

#SBATCH -n 4                       # no of processes or tasks

#SBATCH --gres=gpu:1               # request gpu card: it should be either 1 or 2

#SBATCH --cpus-per-task=4          # no of threads per process or task

#SBATCH -t 01:00:00                # walltime in HH:MM:SS, max value 72:00:00

 

#list of modules you want to use, for example

#module load apps/lammps/12.12.2018/cuda9.2/gpu

 

#name of the executable

exe=name_executable

 

export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK

 

#run the application

mpirun -bootstrap slurm -n $SLURM_NTASKS $exe      #specify the application command-line options, if any, after $exe