#!/bin/bash
#PBS -V
#PBS -N test24_R8
#PBS -e pdtimcom.err
#PBS -o pdtimcom.out
#PBS -l nodes=2:ppn=12

echo "Working dir: " $PBS_O_WORKDIR
cd $PBS_O_WORKDIR
echo "Nodes used: " `uniq $PBS_NODEFILE`
echo "NOdes count: " $PBS_NP 
NPROCS=`wc -l < $PBS_NODEFILE`
cp $PBS_NODEFILE MPI.nodefile
echo "Cores used: " $NPROCS
echo "Starting at: " `date`

module purge
module load tools 
module load intel-13.1/compiler 
module load intel-13.1/openmpi-1.8.8 
module load intel-13.1/netcdf-4.4.1-nc4 
module list
mpirun -machinefile $PBS_NODEFILE -np $NPROCS ./main.exe
echo "Ending at: " `date`
