#!/bin/bash # nodes: number of nodes needed, ppn: number of CPU needed #PBS -l nodes=2:ppn=2,walltime=01:00:00 #job name #PBS -N hung_samplejob # mail to user when job "b" (begins), "e" (terminates) and "a" aborted #PBS -m bea # mail to address #PBS -M myemail@example.com PROG="/home/hungnq/nhanmatranmpi" PROGARGS="1000 2000 2000" OUTFILE="out" # The following line changes to the directory that you submit your job from cd $PBS_O_WORKDIR mpiexec -np 4 $PROG $PROGARGS > $OUTFILE exit 0