#!/bin/bash
#SBATCH --job-name=TheM1
#SBATCH --workdir=#WRC#
#SBATCH --output=mpi_%j_#NODES#.out
#SBATCH --error=mpi_%j_#NODES#.err
#SBATCH --ntasks=#NTASK#
#SBATCH --time=00:10:00
#SBATCH --constraint=highmem
#SBATCH --nodes=#NODES#
#SBATCH --ntasks-per-node=#TASKPERNODE#
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=#NODES#
#SBATCH --exclusive

#set -e
#export OMP_NUM_THREADS=#OMPTHREADS#
#export KMP_AFFINITY=compact,1,0,granularity=fine,verbose
#export KMP_HW_SUBSET=1T

export OMP_NUM_THREADS=#OMPTHREADS#
export KMP_AFFINITY=balanced,granularity=fine
export I_MPI_PIN=1
export I_MPI_PIN_DOMAIN=6

module load intel/2018.4 impi/2018.4
module load hdf5

EXE=$1
name=$2

echo "mpirun -n #NTASK# $EXE "

mpirun -n #NTASK# $EXE > $name

