#!/usr/bin/env bash

#SBATCH --job-name=ag_parallel_ser
#SBATCH --error=./slurm_reports/job.%J.err 
#SBATCH --output=./slurm_reports/job.%J.out
#SBATCH --nodes=6
#SBATCH --mem=0
#SBATCH --exclude=compute02,compute03,compute09
#SBATCH --export=ALL

export LD_LIBRARY_PATH=/home/nschrick/pkg/postgresql/13.4/lib
MPICH_NEMESIS_NETMOD=ofi
MPIEXEC_TIMEOUT=129600

#Argument for running test batches
NUM_SERV=${1:-1}
TYPE=${2:-sync}
CARS=${3:-2}
DBNAME=${4:-tmp}
NUM_THREADS=${5:-1}
NODES=${6:-4}

module load graphviz
module load gcc
module load openmpi
#module load mpich
module load cmake
module load postgresql

#./run.sh 1 sync 2 "$TESTING" 2
./run.sh "$NUM_SERV" "$TYPE" "$CARS" "$DBNAME" "$NUM_THREADS" "$NODES"
