#!/bin/bash -l
#SBATCH -p parallel
#SBATCH -N 2              # Number of nodes
#SBATCH -n 12             # total nuber of cores  
#SBATCH -t 1:30:00        # time as hh:mm:ss
#SBATCH -J molpro-parallel
#SBATCH -e jobfile.err%J
#SBATCH -o jobfile.out%J
#SBATCH --mem-per-cpu=2000  # requested memory per process in MB
#SBATCH --tmp=500000        # requested scratch disk in total on /tmp in MB 
#                           # the maximum value is 800000 
SDIR=`pwd`
echo "Submission directory is: $SDIR"
echo "The job ID assigned by the Batch system is: $SLURM_JOBID"
echo "Number of requested processes $SLURM_NPROCS"
export MOLPRO_RUN=/tmp/$USER/$SLURM_JOB_ID
export MOLPRO_INTS=/tmp/$USER/$SLURM_JOB_ID
export HOSTS_FILE=$SDIR/molpro.machines
rm -f $HOSTS_FILE
srun hostname > $HOSTS_FILE
module load molpro/2010.1_pl25
/usr/bin/time -p $MOLPROP -d$MOLPRO_RUN -I$MOLPRO_INTS -W$PWD ts1_numhess.com 
rm -rf $MOLPRO_RUN
rm -rf $MOLPRO_INTS
