How do I use the submit to the single-user batch queue? (qsub)
NAME
qsub -- submit an executable to run in single-user mode on a
single-user machine
SYNOPSIS
DESCRIPTION
qsub will execute the given executable on a single-user machine using
your account once the machine can be placed in single-user mode. The
purpose is to allow a parallel program developer to test the
performance of her/his code on a parallel machine without interference
from other jobs. The intended use is to use this batch script for short
running jobs to get immediate single-user access, even during the work
day.
You can supply your executable with parameters, just as if you executed
a command line.
OPTIONS
-m machine | single-user machine to run your job on
(currently runs on lagavulin) |
-d run-directory | directory to run your executable in |
-omp | number of OpenMP threads, sets OMP_NUM_THREADS |
-np | number of processors, sets NTASK used by mpi |
-t | maximum time to allow your code to execute, default is 5 minutes |
-csh -sh -tcsh -ksh | You may specify a subshell to execute your
executable in, such as '/bin/sh myshellscript' |
-p | copy path; by default, all environment variables
other than path and LD_LIBRARY_PATH, host,
and pwd variables are copied. If you also want the two
path variables to be copied then include the -p option. |
executable & parameters
After the options you must include an executable, which can be any executable
file. It can be a script that sets certain environment variables and
executes an executable or a script that executes several executables,
or just an executable file.
If parameters are necessary for the executable then just place them
after the executable as you would on the command line. For example,
qsub run.seis.sh -ds test -ph 1 -timex
DETAILS
qsub will set up a script to execute your executable on the
single-user machine. The script is given the a name:
${USER}_${MACHINE}_${EXECUTABLE}_#
The script is placed in the queue directory. The first part of the
script sets up your environment to be the same as the one in which you
executed qsub.
The second part of the script will execute your executable in a
subshell (if you specified one.) If you do not specify a full path for
the executable, qsub will either use the executable given relative to
directory that qsub was executed in, or the executable in the run
directory (if a run directory is given.) For example,
- I execute qsub in my directory, ~/bench, to run the executable
exec.sh in a run directory of /tmp/mytemp:
qsub -d /tmp/mytemp exec.sh
- Since I did not give a full path name of exec.sh qsub will
attempt to find an exec.sh in the specified run directory
(/tmp/mytemp). If /tmp/mytemp/exec.sh does not exist then it will
assume I meant exec.sh in the directory from which I ran qsub (~/bench/exec.sh).
qsub will create the specified run directory if it does not already
exist.
Your job will be killed using at -s KILL after the MAXTIME
specified (or 5 minutes by default) from the time your script begins
to execute.
NOTE: you must have your account set up to allow sut to log in as
you. sut will do the following to run the script that qsub creates:
ssh ${MACHINE} -l ${USER} ${QUEUE_SCRIPT}
If you have ssh set up in your account, copy:
~sut/.ssh/identity.pub to your ~/.ssh/authorized_keys
. If you don't mind people logging into your account then just use
.rhosts .
OUTPUT
The qsub script will assign a job name to your submitted job and place it
in the queue directory to be run by the single-user queue monitor. When
completed, the stdout and stderr will be mailed to you. The job script
will be placed in the completed-queue folder.
LOCATION OF QUEUES
/home/peak/a/sut/suQueue the queue folder holding jobs not yet executed.
/home/peak/a/sut/suQueue_completed where all the completed
jobs get placed.
/home/peak/a/sut/suQ_sh/qsub
/home/peak/a/sut/suQ_sh/suQ-monitor.sh