6.13. Custom Batch commands

You can modify the list and add/delete your own commands. Example of a simple script to submit fluka in a OpenPBS/Torque batch system

#/bin/bash
# Script to launch flair-FLUKA jobs on a cluster using OpenPBS

NAME="flair${!#}"
JOBFILE=${NAME}.job
NAME=`echo ${NAME} | cut -c 1-15`

cat > ${JOBFILE} << EOF
#!/bin/bash
#PBS -q normal
#PBS -N ${!#}
cd $PWD
$*
EOF

echo "Submitting job ${JOBFILE}"
chmod +x ${JOBFILE}
qsub ${JOBFILE}