submit 1 LOCAL 26 Sept 1992
NAME
submit - Submit a job to a batch queue (HP/UX)
SYNTAX
submit QUEUE [ JOBID ] (user input of commands)
QUEUE :: the name of a batch queue; prompted for if not supplied
JOBID :: used to name the job script, log file; timestamp if not supplied
SYNOPSIS
The 'submit' command creates a /bin/csh script named QUEUE.JOBID in the
current working directory, accepts user input of multiple commands, and
places an entry in the 'queue.txt' file for the named queue. Those
files are in directories named /batch for each queue host. The process
'batch_server', run as a cron job by root, periodically (every 4 min)
checks for an active job on the queue host. If no job is running,
'batch_server' removes the top line of the file 'queue.txt', does an
interleaving sort (see "batchq" man page), and either submits a job or,
if the file is empty, places the string "no job running" in 'queue.txt'.
If no arguments are supplied, a queue name is prompted for, and the JOBID
becomes a job submission timestamp. The queue name is validated against the
list of queues maintained in /batch/batch_queues, and 'submit' exits if
the queue is not defined. The user input may be redirected, but be sure to
supply the QUEUE argument or an error may result.
The script QUEUE.JOBID is run under the submitter's userid, placed in the
background by 'batch_server' on machine parN, with a log file created named
LOGNAME.JOBID where LOGNAME is the userid of the job submitter. The log file
provides job information such as: start and stop times, host name, queue name,
echoed commands, and any output not redirected.
The 'queue.txt' file contains either the phrase "no job running" or one or more
entries in the format:
LOGNAME JOBID WORKING_DIRECTORY
where WORKING_DIRECTORY was the current working directory when the 'submit'
command was invoked.
EXAMPLES:
% == prompt; _ == cursor; ^D == [CTRL]-[D] keystroke
(1) User input from the keyboard
% submit par0
Enter commands for batch file; terminate with EOF (^D)
charmm22 < min0.inp > min.out
^D
submit to batch queue: par0 running on node: par0
% _
(2) User input from a file
% submit par4 < file_name
Enter commands for batch file; terminate with EOF (^D)
submit to batch queue: par4 running on node: par4
% _
The text in 'file_name' is embedded in the /bin/csh script, so attempts to
invoke a different shell with this method will fail. Supply the name of a
script invoking the desired shell with #! in the first line as a command from
the keyboard (or one of the commands in 'file_name').
(3) User input in a "here document", in a script which invokes 'submit':
--- script 'run_job' begins ---
submit par3 << FIN
charmm22 < build_psf.inp > build_psf.out
charmm22 < min0.inp > min.out
FIN
--- script 'run_job' ends ---
% run_job
Enter commands for batch file; terminate with EOF (^D)
submit to batch queue: par3 running on node: par3
% _
FILES
/usr/local/bin:
submit prepares script and queue entry; user command
/batch:
batch_queues the list of active queues
queue.txt queue file for an active queue
SEE ALSO
qb, batchq, kill, remsh
AUTHORS
Initial Aegis batch system by BR Brooks, with contributions by RM Venable.
Unix /bin/csh translation and enhancements by RM Venable.
BUGS
You tell me: rvenable@deimos.cber.nih.gov
Information and HTML Formatting Courtesy of:
NHLBI/LBC Computational Biophtsics Section
FDA/CBER/OVRR Biophysics Laboratory