#!/bin/sh
#PBS -N jobname
#PBS -l nodes=4:ppn=16:regular
#PBS -l walltime=72:00:00
#PBS -e path_of_executable/error.log
cd /path_of_executable
NPROCS=`wc -l < $PBS_NODEFILE`
HOSTS=`cat $PBS_NODEFILE | uniq | tr '\n' "," | sed 's|,$||'`
mpirun -np $NPROCS --host $HOSTS /name_of_executable > output.log
#where error.log and output.log are error and output files respectively.
|