#!/bin/bash
#SBATCH --job-name=L8R128
#SBATCH --partition=astro_short
#SBATCH --mail-user=nauman@nbi.ku.dk
#SBATCH --mail-type=ALL
#SBATCH --time=11:59:00
#SBATCH --no-requeue
#SBATCH --no-kill
#SBATCH --nodes=16                        # Number of nodes [must be power of 2 within queue limitations]
#SBATCH --ntasks-per-node=4             # Number of tasks per node (There are 16 cores per node)
#SBATCH --cpus-per-task=5                # Number of cores per task (If not 1, then you should use openmp or a compiler that can auto-parallelize)

export OMP_NUM_THREADS=5

srun ./snoopy

source /software/astro/startup.sh

# debug flags
#export I_MPI_DEBUG=6

# number of threads and OpenMP affinity
export KMP_AFFINITY="verbose,granularity=thread,scatter,1,0"

srun --cpu_bind=threads --distribution=block:block ./snoopy
