PBSpro script


Writing a submission script is typically the most convenient way to submit your job to the job submission system but jobs can also be submitted on the command line. A job script consists of PBS directives, comments and executable commands.

A PBSpro script is composed of 3 parts:

  • Shell (PBSpro always executes the shell startup script)
  • PBSpro directives
  • Instructions set of your code


#PBS -j oe
#PBS -N HPLtest
#PBS -l walltime=1:00:00
#PBS -l select=1:ncpus=24:mem=63000mb:mpiprocs=1:ompthreads=24:cenaero=z_has
#PBS -W group_list=PRACE_T1FWB
#PBS -r y

echo "------------------ Work dir --------------------"
echo "------------------ Job Info --------------------"
echo "jobid : $PBS_JOBID"
echo "jobname : $PBS_JOBNAME"
echo "submit dir : $PBS_O_WORKDIR"
echo "exec dir : $PBS_JOBDIR"
echo "queue : $PBS_O_QUEUE"
echo "user : $PBS_O_LOGNAME"
echo "threads : $OMP_NUM_THREADS"
echo "------------------ $PBS_NODEFILE ---------------"

source /usr/share/Modules/init/csh
module purge
module load compiler/intel/composerxe/2015.5.223
module load intelmpi/
module list

setenv name `eval hostname`
setenv OUT ${name}_xhpl_intel64_${PBS_JOBID}.txt

echo -n "This run was done on: " >> $OUT
date >> $OUT
mpirun -perhost 1 -np 1 $MKLROOT/benchmarks/mp_linpack/bin_intel/intel64/xhpl_offload_intel64>>$OUT
echo -n "Done: " >> $OUT
date >> $OUT