#PBS -S /bin/bash #PBS -l nodes=4,walltime=1:00:00 #PBS -m abe #PBS -M username@your.address.here #PBS -N jobname # Change to working directory cd $HOME/working_directory # Create scratch directory mkdir -p /scratch/serial/$USER/$PBS_JOBID # Copy data files scratch directory cp $HOME/working_directory/data_files /scratch/serial/$USER/$PBS_JOBID # Execute serial or mpi job # This uses standard MPICH compiled with GNU/Pathscale located in # /uufs/icebox/sys/pkg/mpich/std # For executables compiled with PGI compilers, use /uufs/icebox/sys/pkg/mpich/std_pgi mpirun -np 4 -machinefile $PBS_NODEFILE ./a.out > outputfile # In case of using MPICH2, make sure you are setting up the environment as specified # on our Software-MPI webpage and then: # mpdboot -n 2 -r rsh -f $PBS_NODEFILE # mpiexec -n 4 ./a.out > outputfile # Copy files back home and cleanup cp * $HOME/working_directory && cd .. && rm -rf /scratch/serial/$USER/$PBS_JOBID