#!/bin/sh
### Job name
#PBS -N cpi
### Declare job non-rerunable
#PBS -r n
### Output files
###PBS -e test.err
###PBS -o test.log
### Mail to user
##PBS -m ae
### Queue name (small, medium, long, verylong)
### Number of nodes (node property ev67 wanted)
##PBS -l nodes=8:ev67
#PBS -l nodes=10
#PBS -l walltime=08:00:00

# This job's working directory
echo Working directory is $PBS_O_WORKDIR
cd $PBS_O_WORKDIR    


echo Running on host `hostname`
echo Time is `date`
echo Directory is `pwd`
echo This jobs runs on the following processors:
echo `cat $PBS_NODEFILE`
# Define number of processors
NPROCS=`wc -l < $PBS_NODEFILE`
echo This job has allocated $NPROCS nodes

# Run the parallel MPI executable "a.out"
/u1/local/mpich-1.2.5/bin/mpirun -v -machinefile $PBS_NODEFILE -np $NPROCS /u1/local/share/pbsexamples/cpi
#/usr/share/mpi/bin/mpirun -v -machinefile $PBS_NODEFILE -np $NPROCS /usr/local/mpich/examples/cpi




