#!/bin/bash -l

#PBS -N test_BGW
#PBS -q debug
#PBS -l walltime=00:30:00,nodes=1
#PBS -l gres=widow0
#PBS -V
#PBS -A mat037

#You must change the line above for YOUR appropriate allocation.

export TEMPDIRPATH=/tmp/work/$USER/tmp

# Modify the below to change the number of threads per 
# MPI task if using OMP or threaded libraries
export OMP_NUM_THREADS=1

# Uncomment below to set number ofprocs in testsuite
export BGW_TEST_MPI_NPROCS=16

cd $PBS_O_WORKDIR 
export MPIEXEC=`which aprun`
# -N 24"
# Uncomment below to test threaded version
#export OMP_NUM_THREADS=2
#export MPIEXEC="`which aprun` -N 12 -d 2 -S 3 -ss"

export NO_STOP_MESSAGE=1
# do not write silly FORTRAN STOP messages from PGI
make check-parallel &> test.out

echo "Exit status = $?"
