#!/bin/bash -l
#SBATCH --job-name={job_name}_{n_procs}
#SBATCH --output={output_dir}{job_name}_{n_procs}.out
#SBATCH --error={err_dir}{job_name}_{n_procs}.err
#SBATCH --nodes={n_nodes}
#SBATCH --time=00:10:00
#SBATCH --export=NONE

unset SLURM_EXPORT_ENV

module load intel intelmpi likwid 

unset I_MPI_PMI_LIBRARY
export  LIKWID_SILENT=1

OUTPUT_FILENAME="{data_dir}/{job_name}_$SLURM_JOB_ID.dat"

echo  "# CREATION_TIME : {time_stamp}" > $OUTPUT_FILENAME
echo  "# N_NODES       : {n_nodes}" >> $OUTPUT_FILENAME
echo  "# OFF_CACHE_FLAG  : {off_cache_flag}">> $OUTPUT_FILENAME

srun --cpu-freq=2000000-2000000:performance  ./likwid-mpirun -np {n_procs} -mpi intelmpi -omp intel -nperdomain M:18 {bin} {job_name} -npmin {n_procs} {off_cache_flag}  >> $OUTPUT_FILENAME 


