#!/bin/bash -l

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=40
#SBATCH --gres=gpu:2
#SBATCH --time=04:00:00
#SBATCH --partition=p.talos
#SBATCH --job-name=k1
#SBATCH -o ./tjob.out.%j
#SBATCH -e ./tjob.err.%j

module purge
module load mkl
module load intel
module load anaconda
module load impi
module load cuda/10.1

module list

export OMP_NUM_THREADS=1
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/afs/@cell/common/soft/intel/ics2015/15.0/mkl/lib/intel64 # Eos
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mpcdf/soft/SLES122/common/intel/ps2017.4/17.0/linux/mkl/lib/intel64 # Draco
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mpcdf/soft/SLE_12_SP3/packages/x86_64/intel_parallel_studio/2018.2/mkl/lib/intel64 # Cobra
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mpcdf/soft/SLES122/common/intel/ps2017.4/17.0/linux/mkl/lib/intel64 # Draco
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mpcdf/soft/SLE_15/packages/x86_64/intel_parallel_studio/2018.4/lib/intel64:/mpcdf/soft/SLE_15/packages/x86_64/intel_parallel_studio/2019.4/mkl/lib/intel64 # talos

export aimsbin=/u/mkryn/bin/aims.191029.scalapack.mpi.x

date=$(date +"%s")
echo "the date is: $date"

# Run the program:
srun $aimsbin > out_$date
