TORQUE template script example

From Relion
Revision as of 16:52, 27 September 2011 by Sjors Scheres (talk | contribs) (Created page with "#!/bin/bash ### Inherit all current environment variables #PBS -V ### Job name #PBS -N relion <code> ### Output and Error #PBS -e XXXerrfileXXX #PBS -o XXXoutfileXXX ### Queu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. !/bin/bash
      1. Inherit all current environment variables
  2. PBS -V
      1. Job name
  3. PBS -N relion

### Output and Error
#PBS -e XXXerrfileXXX
#PBS -o XXXoutfileXXX
### Queue name
#PBS -q XXXqueueXXX
### Specify the number of nodes and thread (ppn) for your job.
#PBS -l nodes=XXXmpinodesXXX:ppn=XXXthreadsXXX
### Tell PBS the anticipated run-time for your job, where walltime=HH:MM:SS
###PBS -l walltime=XXXextra1XXX:00:00
#################################
### Switch to the working directory;
cd $PBS_O_WORKDIR
echo Working directory is $PBS_O_WORKDIR
# Calculate the number of processors allocated to this run.
NPROCS=`wc -l < $PBS_NODEFILE`
# Calculate the number of nodes allocated.
NNODES=`uniq $PBS_NODEFILE | wc -l`
### Display the job context
echo Running on host `hostname`
echo Time is `date`
echo Directory is `pwd`
echo Using ${NPROCS} processors across ${NNODES} nodes
#################################
mpirun --bynode -np XXXmpinodesXXX XXXcommandXXX
echo "done"