#PBS -S /bin/bash
#PBS -l nodes=2:ppn=48+1:ppn=32,walltime=480:00:00
#PBS -q chem-2
#PBS -o "VASP.out"
#PBS -e "ERROR.out"
#PBS -r n
export P4_GLOBMEMSIZE=100000000
export PATH="/state/partition1/apps/medea/MD/Linux-x86_64/IntelMPI5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
export LD_LIBRARY_PATH="/state/partition1/apps/medea/MD/Linux-x86_64/IntelMPI5/lib:/state/partition1/apps/medea/MD/Linux-x86_64/IntelMPI5/bin:'/state/partition1/apps/medea/MD/bin/Linux-x86_64':/state/partition1/apps/medea/MD/TaskServer/Tools/vasp6.3.1/Linux-x86_64:/state/partition1/apps/medea/MD/Linux-x86_64/IntelMPI5/lib"
cd "/share/apps/medea/MD/TaskServer/Tasks/v-hpc-medea.nwu.ac.za-32000-task00857"
echo "Running VASP on 128 cores on 3 nodes:"
echo "  Using executable /state/partition1/apps/medea/MD/TaskServer/Tools/vasp6.3.1/Linux-x86_64/vasp_std"
echo "On nodes"
cat $PBS_NODEFILE
echo ""

trap 'touch finished; touch interrupted' 2 9 15
mpirun -genv I_MPI_PIN 0 -np 128 "/state/partition1/apps/medea/MD/TaskServer/Tools/vasp6.3.1/Linux-x86_64/vasp_std"
touch finished