#!/bin/bash
#SBATCH --nodes=#NODES#
#SBATCH -C quad,cache
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=68
#SBATCH --ntasks=#NODES#
#SBATCH --exclusive
#SBATCH --mem=150GB
#SBATCH -J test1
#SBATCH --time=00:10:00
#SBATCH --output slurm-%J.out 

set -e

export OMP_NUM_THREADS=68
export KMP_AFFINITY=compact,1,0,granularity=fine,verbose
export KMP_HW_SUBSET=1T

##module load intel/17.0
source /opt/software/intel/composer_xe_2015/bin/compilervars.sh intel64
source /opt/software/intel/impi_5.0.3/bin64/mpivars.sh
export I_MPI_MIC=enable

n=$1
m=$2
g=$3
v=$4
EXE=$5
name=$6
lx=$7
ly=$8
lz=$9
lt=${10}
prec=${11}

echo "mpirun -n #NODES# $EXE -x $lx -y $ly -z $lz -t $lt -by 4 -bz 4 -pxy 1 -pxyz 0 -c 68 -sy 1 -sz 1 -minct 1 -compress12 -geom $v $g $m $n -prec  $prec -cg"
mpirun -n #NODES# $EXE -x $lx -y $ly -z $lz -t $lt -by 4 -bz 4 -pxy 1 -pxyz 0 -c 68 -sy 1 -sz 1 -minct 1 -compress12 -geom $v $g $m $n -prec  $prec -cg > $name

