Job Scheduler script examples

| Theoretical Chemistry Home Page > Documentation > NQS

GNQS examples:

A simplest usage is as simple as:

% qsub -q shared
cd ${QSUB_WORKDIR}
./programName
^D
%

^D denotes pressing Ctrl-D. The job will be submitted to the shared queue. The output of the program will be collected in STDOUT.XX, where XX is the job number.

Or better yet, in a GNQS script:

#QSUB -s /bin/sh                 #Specify shell
#QSUB -eo -o output_file         #Write NQS error and output to single file.
#QSUB -r c4h6                    #Job name
#QSUB -q long                    # submit to the queue 'long'
#QSUB -me                        #Sends mail when the request ends execution.

DAL=min
MOL=c4h6

dalton=/pkg/dalton/1.2_atlas/dalton.x

if [ -z "$TMPDIR" ]; then
   TMPDIR=/tmp/$USER; mkdir $TMPDIR >/dev/null 2>&1
fi
cd $TMPDIR
#
cp $QSUB_WORKDIR/$DAL.dal $TMPDIR/DALTON.INP
cp $QSUB_WORKDIR/$MOL.mol $TMPDIR/MOLECULE.INP
#
$dalton > $QSUB_WORKDIR/$DAL_$MOL.out
exit

Save it to, say, run.sh and then run

qsub run.sh

Back to the overview

PBS script-example:

You have to remove the comments in PBS headers before actually running the script.

#PBS -S /bin/sh         #Specify shell 1)
#PBS -N nisse           #Job name 
#PBS -l cput=6:0:0      #6h of cpu-time requested.
#PBS -l nodes=p4        #Submit to a p4 (Xeon) machines 2)
#PBS -m ae              #Sends mail when the request gets aborted or ends execution.
cd $PBS_O_WORKDIR       #Goto the directory you submitted the job from.

/pkg/dalton/1.2_atlas/dalton file1 file2

As with NQS the script is submitted with the qsub command.

1) If omitted, your login shell will be used.

Note that the following warning messages can be ignored. It is a shortcoming of the (t)csh and will not affect your calculations in any way.

Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.

2) This parameter is optional - specify it only when it matters on which node your job will be run on. The different identifiers can be found in the table on the overview page. If you want a node all to yourself, e.g. if you need all the memory on a dual processor machine you can add :ppn=2 to your node identifier. Example: #PBS -l nodes=mp:ppn=2

Back to the overview

| Theoretical Chemistry Home Page > Documentation > NQS

Valid HTML 4.01!