#!/bin/bash

set -euo pipefail

BIN="./scratch/var/exastencils.exe"
NAME=$(basename $(pwd))

if [[ ! -e ${BIN} ]]; then
  echo "executable ${BIN} not found"
  exit 1
fi

REPEAT=5

sbatch -C chimaira -n 1 -c 20 --array=1-${REPEAT} --nice=0 -o scratch/o5/run0_ref-%a.log -e scratch/o5/run0_ref-%a.log --job-name "pExpl run ref ${NAME}" --time=10 --wrap "taskset -c 0-9 ${BIN}"
