.rn '' }`
''' $RCSfile$$Revision$$Date$
'''
''' $Log$
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R

.fi
..
'''
'''
'''     Set up \*(-- to give an unbreakable dash;
'''     string Tr holds user defined translation string.
'''     Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.ie n \{\
.ds -- \(*W-
.ds PI pi
.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
.ds L" ""
.ds R" ""
'''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
'''   \*(L" and \*(R", except that they are used on ".xx" lines,
'''   such as .IP and .SH, which do another additional levels of
'''   double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\"	If the F register is turned on, we'll generate
.\"	index entries out stderr for the following things:
.\"		TH	Title 
.\"		SH	Header
.\"		Sh	Subsection 
.\"		Ip	Item
.\"		X<>	Xref  (embedded
.\"	Of course, you have to process the output yourself
.\"	in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH QPREP 1 "perl 5.005, patch 03" "9/May/2002" "User Contributed Perl Documentation"
.UC
.if n .hy 0
.if n .na
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ          \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
.	\" AM - accent mark definitions
.bd B 3
.	\" fudge factors for nroff and troff
.if n \{\
.	ds #H 0
.	ds #V .8m
.	ds #F .3m
.	ds #[ \f1
.	ds #] \fP
.\}
.if t \{\
.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.	ds #V .6m
.	ds #F 0
.	ds #[ \&
.	ds #] \&
.\}
.	\" simple accents for nroff and troff
.if n \{\
.	ds ' \&
.	ds ` \&
.	ds ^ \&
.	ds , \&
.	ds ~ ~
.	ds ? ?
.	ds ! !
.	ds /
.	ds q
.\}
.if t \{\
.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
.	\" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'u*4/10)'E
.	\" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.	\" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.	ds : e
.	ds 8 ss
.	ds v \h'-1'\o'\(aa\(ga'
.	ds _ \h'-1'^
.	ds . \h'-1'.
.	ds 3 3
.	ds o a
.	ds d- d\h'-1'\(ga
.	ds D- D\h'-1'\(hy
.	ds th \o'bp'
.	ds Th \o'LP'
.	ds ae ae
.	ds Ae AE
.	ds oe oe
.	ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
\fBqprep\fR \- Translate job-submission scripts from a platform independent
format to the local, platform-dependent format.
.SH "SYNOPSIS"
\fBqprep\fR\ [key1=value1[\ key2=value2\ ...]]\ \fIfilename\fR\ 
.SH "DESCRIPTION"
The goal of \fBqprep\fR is portability of batch queue scripts.
Scripts written for \fBqprep\fR can be used at any site where \fBqprep\fR
is installed, regardless of the target queuing system.
.PP
\fBqprep\fR provides users with a uniform, site-independent command
interface to the local queuing system, eliminating the need
to learn the myriad syntactical variations that appear at different
institutions to perform essentially identical job-submission tasks.
.PP
\fBqprep\fR translates a script from a site-independent format (described
below) into a site-dependent format, typically one using NQS (Network
Queuing System), PBS (Portable Batch System), or a similar queuing system.
The translated script is written to a new file, and may optionally be
submitted to a queue.
.SH "DIRECTIVE SYNTAX"
Options to \fBqprep\fR are given in the form of key-value pairs, called
\*(L"directives\*(R".  These may be given either at the command line, seperated
by white space, or in the preamble to a job script.
.PP
Job scripts contain a preamble, similar to those found in scripts
processed by native queuing system.  The preamble contains directives that
control the resource limits and other attributes of the job.  \fBqprep\fR
directives in the preamble have this form:
.PP
#PSTQ key=value
.PP
The # character denotes the line is a script comment, the string PSTQ
alerts \fBqprep\fR that the line is a directive that it needs to process,
and the actual directive is in the form of a key=value pair, whose
possible values are described below.
.PP
The preamble ends with this line:
.PP
#PSTQ END_OF_PREAMBLE
.PP
Qprep considers all lines following the first line matching the above
string to follow the preamble.  Qprep simply passes lines occuring
after this directive to the output script without applying translation
or interpretation.
.PP
By default qprep will also consider the first non-blank, non-comment
line to end the preamble.  See also the \*(L'explicit_preamble\*(R' directive.
.PP
If a directive key occurs multiple times within the command line or
within a script then qprep ignores all but the first such directive.  If a
directive key occurs on the command line and within a script, qprep uses
the directive on the command line to override the value within the script.
.Sh "\s-1QPREP\s0 \s-1CONTROL\s0 \s-1DIRECTIVES\s0"
These directives specify the behavior of qprep upon translating
a script.  Some of these options only make sense if they occur on the
qprep command-line.  These options are not usually explicitly translated
to the target queue system;  they simply control behaviors of qprep.
.Ip "\fBsilent=y\fR" 4
Do not write the job identifier to stdout when the job is submitted to
a queue.
.Ip "\fBout_script\fR=\fIoutfile\fR" 4
Write the translated script to \fIoutfile\fR.  If this option is not
specified, the translated script is written to \fIfilename\fR.pst where
\fIfilename\fR is the script argument to \fBqprep\fR.  For this option to work
properly it must occur on the command line, not inside a script.  If
this directive occurs inside a script, it changes the contents of the
parameter \*(L"out_script\*(R" but does not change the name of the actual output
filename.  That would effectively change which script gets submitted,
if the \fBsubmit=y\fR directive occurs.
.Ip "\fBsubmit=y\fR" 4
After the script has been translated, submit the new script to the queue.
.Ip "\fBerase=[y|n]\fR" 4
If the value is \*(L'y\*(R' then erase the translated script once it has been
submitted to the queue.  This action is only taken if used in conjunction
with submit=y.
.Sp
If the value is \*(L'n\*(R' then do not erase the translated script.  This
allows the user to view the translated script, e.g., for debugging.
.Ip "\fBverbose_script=[y|Y|n]\fR" 4
Include extra comments in the output script that could help the user
understand how qprep translates input to the script format of the
target queue system.  The default value is \*(L"n\*(R", which tells qprep not to
produce this auxiliary information.  The value \*(L"y\*(R" (lower case) causes
qprep to include, as comments, the original input lines.  The value \*(L"Y\*(R"
(upper case) causes qprep to include yet more information.
.Ip "\fBoperation_verbosity=N\fR" 4
Set the verbosity of qprep.  This is useful for debugging qprep itself,
not something a typical user would find useful.
.Ip "\fBexplicit_preamble=[y|n]\fR" 4
Flag indicating whether the \s-1END_OF_PREAMBLE\s0 directive is required.
If explicit_preamble is \*(L'n\*(R' then the first non-blank, non-comment line
is considered to be the end-of-preamble.
.Sp
\s-1NOTE\s0: In the context of the preamble, qprep considers a comment line to be
a line that begins with the \s-1PST\s0 qprep comment string, which is a \*(L'#\*(R', and
it setable by the preamble_comment entry in the state table.  Note that
this could differ from the comment character for the script language.
.Sp
Default value is \*(L'n\*(R'.
.Sh "\s-1JOB\s0 \s-1ENVIRONMENT\s0 \s-1DIRECTIVES\s0"
These directives control the environment in which the script generated by
\fBqprep\fR operates.
.Ip "\fBaccount=account_string\fR" 4
Charge the job to account \fBaccount_string\fR.
.Ip "\fBusername=userlist\fR" 4
Run the job as the specified user. The userlist has the format:
.Sp
user[@host][,user[@host], ...]
.Sp
This allows the job to run as different users depending on the host
that runs the job.  Note, \fBuserlist\fR is specified with no white
space.
.Ip "\fBexport_vars=y\fR" 4
If \fBexport_vars\fR is set to the string \*(L"y\*(R", environment variables
are exported from the shell in which \fBqprep\fR is run to the script's
environment.
.Ip "\fBshell=shell_name\fR" 4
Define the shell that will be used to run the script.
.Sh "\s-1REPORTING\s0 \s-1DIRECTIVES\s0"
These directives control stdout, stderr, and mail reporting for the job.
.Ip "\fBstderr\fR=\fIfile\fR" 4
Define the \fIfile\fR to which stderr is written.  This may be the same as
the filename for stdout (see below).
.Ip "\fBstdout\fR=\fIfile\fR" 4
Define the \fIfile\fR to which stdout is written.  This may be the same as
the filename for stderr.
.Ip "\fBkeep=stderr,stdout\fR" 4
Keep either stdout or stderr, or both, on the host where the script was
executed.  See \s-1COMMAND\s0 \s-1NOTES\s0 for a comment on the comma notation used above.
.Ip "\fBmail=a,b,e,r,t\fR" 4
Send mail at different occurrences.  The user may specify multiple triggers
separated by commas.  See \s-1COMMAND\s0 \s-1NOTES\s0 for a discussion of the argument
notation.
.Sp
.Vb 5
\&    a: send mail when a job is aborted
\&    b: send mail when a job begins execution
\&    e: send mail when a job ends
\&    r: send mail when a job is rerun
\&    t: send mail when a job is routed
.Ve
.Ip "\fBmail_to=user_list\fR" 4
Specifies a comma-separated list (no white space) of users to whom mail
is sent.  Events that cause mail to be sent are set with mail=key.
.Sh "\s-1JOB\s0 \s-1CONTROL\s0 \s-1DIRECTIVES\s0"
These items specify particulars of how and where the job is run.
.Ip "\fBqueue=name\fR" 4
Specifies the queue to which the job is submitted.
.Ip "\fBparallel_env=name\fR" 4
Specifies the parallel environment to use to execute the job.
.Ip "\fBjob_name=name\fR" 4
Specifies a name to associate with the job.
.Ip "\fBcheckpoint=(n|s|number)\fR" 4
Defines the checkpointing characteristics of the job.
.Sp
.Vb 3
\&    n: never checkpoint
\&    s: checkpoint when the queue is shut down
\&    number: checkpoint every (number) minutes.
.Ve
\s-1NOTE\s0: Not all platforms support checkpointing.
.Sh "\s-1LIMIT\s0 \s-1DIRECTIVES\s0"
These items specify resource limits.  All times are in the format
hours:minutes, where hours and minutes are numbers.  All sizes are in
megabytes (\s-1MB\s0).
.PP
Limits can be specified per-process (a single process within the script)
or per-request (the total of all the processes within a script).
.Ip "\fBnodes=number\fR" 4
Specifies the number of nodes that are simultaneously required by the script.
Default is nodes=1.
.Ip "\fBcpus_per_node=number\fR" 4
Specifies the number of cpus per node that are simultaneously required
by the script.  Default is cpus_per_node=1.
.Ip "\fBwall_time=time\fR" 4
Specifies the maximum wall_time to be allotted for the script execution.
.Ip "\fBprocess_cpu_time=time\fR" 4
Specifies the maximum \s-1CPU\s0 time used by any single process within the script.
.Ip "\fBtotal_cpu_time=time\fR" 4
Specifies the total \s-1CPU\s0 time used by all single processes within the script.
.Ip "\fBproc_file_size=size\fR" 4
Specifies the maximum total size, in megabytes, of files written by a
single process within the script.
.Ip "\fBtotal_file_size=size\fR" 4
Specifies the maximum total size, in megabytes, of all files written by
all processes within a script.
.Ip "\fBtapemt(a|b|c|d|e|f|g|h)=number\fR" 4
This set of keys (tapemta, tapemtb, ...) specifies the maximum number of tape
drives required in the corresponding device class (a,b, ...).  Tape drive
device groups can be ascertained using the \fBtpstat\fR(1) command.
.Ip "\fBnice=number\fR" 4
Specifies the nice level at which the script is run when resources are shared.
See \fBnice\fR(1) for a description of nice levels.
.Ip "\fBprocess_memory=size\fR" 4
Specifies the maximum memory used by a single process within the script.
\fBsize\fR is specified in megabytes (\s-1MB\s0).  If the process does not share
memory with other processes, this option does not need to be specified.
.Ip "\fBtotal_memory=size\fR" 4
Specifies the total memory used by all processes within the script.
\fBsize\fR is specified in megabytes (\s-1MB\s0).  If the request does not share
memory with other requests, this option does not need to be specified.
.Sh "\s-1JOB\s0 \s-1DEPENDENCE\s0 \s-1DIRECTIVES\s0"
Sometimes it is necessary for a job to depend in some way upon another
job.  \fBqprep\fR allows jobs to depend upon one another in three ways:
.Ip "1. Multiple jobs can run at the same time using \fBsync_count\fR and \fBsync_with\fR." 4
.Ip "2. Job A can execute only after job B reaches a specified point (dependency is coded in A).  This uses the \fBafter\fR commands (see below)." 4
.Ip "3. When job B reaches a specified point, it allows job A to run (the dependency is coded in B).  This uses the \fBbefore\fR commands (see below)." 4
.PP
For \fBafter\fR and \fBbefore\fR, dependency can be specified on jobs beginning,
and ending (with error conditions taken into account).  This allows
robust scripting in which different jobs run depending on the successful
or unsuccessful completion of another job.
.PP
The syntax here is very nearly that specified by \s-1PBS\s0, which inspired these
commands.
.Ip "\fBsync_count=number\fR" 4
Synchronize (\fBnumber\fR) jobs.  This is the first job of a set of jobs.
.Ip "\fBsync_with=jobid\fR" 4
Synchronize with a job in which \fBsync_count\fR is set.
.Ip "\fBafter=jobid[,jobid, ...]\fR" 4
This job can be executed after all the jobs in the argument have been begun.
.Ip "\fBafter_ok=jobid[,jobid, ...]\fR" 4
This job can be executed after all the jobs in the argument have terminated
without errors.
.Ip "\fBafter_not_ok=jobid[,jobid, ...]\fR" 4
This job can be executed after all the jobs in the argument have terminated
with errors.
.Ip "\fBafter_any=jobid[,jobid, ...]\fR" 4
This job can be executed after all the jobs in the argument have terminated
regardless of errors.
.Ip "\fBdepends_on=number\fR" 4
This job can be executed after (\fBnumber\fR) before dependencies (below) have been
satisfied.
.Ip "\fBbefore=jobid[,jobid, ...]\fR" 4
Jobs \fBjobid, ...\fR can be scheduled for execution after the current job
begins.
.Ip "\fBbefore_ok=jobid[,jobid, ...]\fR" 4
Jobs \fBjobid, ...\fR can be scheduled for execution after the current job
terminates without errors.
.Ip "\fBbefore_not_ok=jobid[,jobid, ...]\fR" 4
Jobs \fBjobid, ...\fR can be scheduled for execution after the current job
terminates with errors.
.Ip "\fBbefore_any=jobid[,jobid, ...]\fR" 4
Jobs \fBjobid, ...\fR can be scheduled for execution after the current job
terminates regardless of errors.
.Sh "\s-1EXTRA\s0 \s-1DIRECTIVES\s0"
.Ip "\fBtarget_cmd_line_args=string\fR" 4
Pass \*(L"string\*(R" to the target queue submission command line just before
the output script name.  This is useful if \fBqprep\fR does not implement
functionality of the target system that you require, and if your
local site administrator failed to include that option in the local
configuration module.
.Sp
You should avoid using this option in a script since it makes a script
site- or machine-dependent, which misses the point of using \fBqprep\fR.
If you find that you require this option then \fBqprep\fR probably needs
modification.  In that case, send a request for enhancement to the \s-1PST\s0
developers by sending email to \*(L"pst-dev@pstoolkit.org\*(R".
.Ip "\fBtarget_script_directive=string\fR" 4
Pass \*(L"string\*(R" to the output script, \s-1NOT\s0 preceded by the target directive
prefix.  (The value may be translated by the local configuration module,
however.)  This is useful if \fBqprep\fR does not implement functionality of
the target system that you require, and if your local site administrator
failed to include that option in the local configuration module.
.Sp
You should avoid using this option in a script since it potentially
makes a script site- or machine-dependent, which misses the point of
using \fBqprep\fR.  If you find that you require this option then \fBqprep\fR
probably needs modification.  In that case, send a request for enhancement
to the \s-1PST\s0 developers by sending email to \*(L"pst-dev@pstoolkit.org\*(R".
.Sh "\s-1TRANSLATION\s0 \s-1CONTROL\s0 \s-1PARAMETERS\s0"
These parameters control how \fBqprep\fR translates directives to the target
format.  These are set by the local configuration module.  Normally,
users should not alter these values, and these directives should not
occur in user qprep scripts.  These directives do not typically translate
directly into anything in the target script.  This manual page contains
these directives for completeness and to document some of the state
variables that go into a local configuration module.
.Ip "\fBsource_directive_prefix=string\fR" 4
Set the qprep directive prefix to \*(L"string\*(R".  By default this is \*(L"#\s-1PSTQ\s0\*(R"
but this assumes that the script language uses a \*(L"#\*(R" character as a
comment character, or at least that the script language ignores strings
that have a character in the first line.  It is conceivable, though,
that the target queue system could accept scripts in languages for which
this is not true, in which case the user might have to change the source
directive prefix.
.Ip "\fBtarget_comment_prefix=string\fR" 4
Set the target script comment prefix to \*(L"string\*(R".  By default this is
\*(L"#\*(R", which indicates a comment in typical script languages.
.Ip "\fBtarget_comment_suffix=string\fR" 4
Set the target script comment suffix to "string".  By default this is
"", (an empty string) since typical script languages have on comment
terminator.  Some languages (such as C) require that comments be
terminated by a special string.
.Ip "\fBtarget_directive_prefix=string\fR" 4
Set the target script directive prefix to \*(L"string\*(R".  This value is set
in the local configuration module for qprep, and its value depends on
the target queue system.  For example, for \s-1PBS\s0 this could be \*(L"#\s-1PBS\s0\*(R" or
\*(L"#\s-1PBS\s0 \-\*(R", and for \s-1LSF\s0 this could be \*(L"#\s-1BSUB\s0\*(R" or \*(L"#\s-1BSUB\s0 \-\*(R".
.Sp
User qprep scripts should \s-1NOT\s0 use this directive.
.Ip "\fBtarget_key_value_separator=string\fR" 4
Set the target script directive separator to "string".  This value is set
in the local configuration module for qprep, and its value depends on
the target queue system.  For example, for \s-1PBS\s0 and \s-1LSF\s0 this could be "",
an empty string.
.Ip "\fBtarget_submit_command=string\fR" 4
Set the target queue submission command to \*(L"string\*(R".  This value is set
in the local configuration module for qprep, and its value depends on
the target queue system.  For example, for \s-1PBS\s0 this is probably \*(L"qsub\*(R",
and for \s-1LSF\s0 this is probably \*(L"bsub\*(R".  Qprep issues this command after
writing the output script.  The command arguments are those set by the
target command line arguments directive (which you should avoid using)
followed by the name of the output script file, i.e.:
.SH "DIAGNOSTICS"
.SH "EXAMPLES"
To translate, but not submit, job script \*(L'script\*(R' as a 100 node job to
queue \*(L'exqueue':
.Sp
qprep nodes=100 queue=exqueue script
.Sp
To translate and submit \*(L'script\*(R' and have it send mail to user1 and
user2 when the job ends:
.Sp
qprep mail=e mail_to=user1,user2 submit=y script
.Sp
To insert a directive (\-option) that will be interpreted by the target
queueing system:
.Sp
qprep target_cmd_line_args=\*(R'\-option\*(R' submit=y script
.Sp
Any of these options may instead be placed inside script such as:
.Sp
#PSTQ nodes=100
.Sp
#PSTQ queue=exqueue
.Sp
#PSTQ mail=e
.Sp
#PSTQ mail_to=user1,user2
.Sp
#PSTQ target_cmd_line_args=\*(R'\-option\*(R'
.Sp
#PSTQ submit=y
.Sp
In such a case, qprep is simply invoked as:
.Sp
qprep script
.SH "ENVIRONMENT"
.SH "FILES"
.SH "NOTES"
.Sh "qprep'S \s-1ROLE\s0"
\fBqprep\fR is a script-editing translation tool in the \s-1TUSC\s0 layer of the
Practical Supercomputing Toolkit (\s-1PST\s0).  By using \fBqprep\fR (and other
elements of \s-1PST\s0), users develop scripts and techniques that work,
without modification, at all institutions supported by \s-1PST\s0.
.Sp
A script written for \fBqprep\fR will contain both a preamble and a body.
\fBqprep\fR translates the preamble only.  \s-1PST\s0 also contains a number of other
programs to abstract particular elements of the script body, such as the
command to run jobs (e.g. \fBpstrun\fR).  Currently, the only such command that
the core \s-1PST\s0 team has funding to implement is \fBpstrun\fR, but others are
possible as future projects.
.Sp
This page represents an early attempt to standardize the relevant options
for \fBqprep\fR.  If there are options that you will require in order for \fBqprep\fR
to be useful to you, that are not listed above, please send a request for
enhancement to pst-dev@pstoolkit.org describing the problem.
.Sh "\s-1COMMAND\s0 \s-1NOTES\s0"
When a value is shown above as a set of comma-delimeted arguments, one
or more of those arguments may be given as the value of the command.
For instance, valid specifications of keep would be:
.Sp
.Vb 4
\&    keep=stderr
\&    keep=stdout
\&    keep=stdout,stderr
\&    keep=stderr,stdout
.Ve
Possible specifications for mail would include
.Sp
.Vb 4
\&    mail=a
\&    mail=a,b
\&    mail=b,e
\&    and so on.
.Ve
.SH "SEE ALSO"
http://pstoolkit.org
.Sp
pstrun: a unified command-line method of running executables.
.SH "AUTHOR"
Written and Copyright (C) 2001 by Michael Gourlay, Joseph Werne, and Chris
Bizon.
.SH "HISTORY"
Documentation v0.1 assembled Friday, December 5, 2001.

.rn }` ''
.IX Title "QPREP 1"
.IX Name "B<qprep> - Translate job-submission scripts from a platform independent
format to the local, platform-dependent format."

.IX Header "NAME"

.IX Header "SYNOPSIS"

.IX Header "DESCRIPTION"

.IX Header "DIRECTIVE SYNTAX"

.IX Subsection "\s-1QPREP\s0 \s-1CONTROL\s0 \s-1DIRECTIVES\s0"

.IX Item "\fBsilent=y\fR"

.IX Item "\fBout_script\fR=\fIoutfile\fR"

.IX Item "\fBsubmit=y\fR"

.IX Item "\fBerase=[y|n]\fR"

.IX Item "\fBverbose_script=[y|Y|n]\fR"

.IX Item "\fBoperation_verbosity=N\fR"

.IX Item "\fBexplicit_preamble=[y|n]\fR"

.IX Subsection "\s-1JOB\s0 \s-1ENVIRONMENT\s0 \s-1DIRECTIVES\s0"

.IX Item "\fBaccount=account_string\fR"

.IX Item "\fBusername=userlist\fR"

.IX Item "\fBexport_vars=y\fR"

.IX Item "\fBshell=shell_name\fR"

.IX Subsection "\s-1REPORTING\s0 \s-1DIRECTIVES\s0"

.IX Item "\fBstderr\fR=\fIfile\fR"

.IX Item "\fBstdout\fR=\fIfile\fR"

.IX Item "\fBkeep=stderr,stdout\fR"

.IX Item "\fBmail=a,b,e,r,t\fR"

.IX Item "\fBmail_to=user_list\fR"

.IX Subsection "\s-1JOB\s0 \s-1CONTROL\s0 \s-1DIRECTIVES\s0"

.IX Item "\fBqueue=name\fR"

.IX Item "\fBparallel_env=name\fR"

.IX Item "\fBjob_name=name\fR"

.IX Item "\fBcheckpoint=(n|s|number)\fR"

.IX Subsection "\s-1LIMIT\s0 \s-1DIRECTIVES\s0"

.IX Item "\fBnodes=number\fR"

.IX Item "\fBcpus_per_node=number\fR"

.IX Item "\fBwall_time=time\fR"

.IX Item "\fBprocess_cpu_time=time\fR"

.IX Item "\fBtotal_cpu_time=time\fR"

.IX Item "\fBproc_file_size=size\fR"

.IX Item "\fBtotal_file_size=size\fR"

.IX Item "\fBtapemt(a|b|c|d|e|f|g|h)=number\fR"

.IX Item "\fBnice=number\fR"

.IX Item "\fBprocess_memory=size\fR"

.IX Item "\fBtotal_memory=size\fR"

.IX Subsection "\s-1JOB\s0 \s-1DEPENDENCE\s0 \s-1DIRECTIVES\s0"

.IX Item "1. Multiple jobs can run at the same time using \fBsync_count\fR and \fBsync_with\fR."

.IX Item "2. Job A can execute only after job B reaches a specified point (dependency is coded in A).  This uses the \fBafter\fR commands (see below)."

.IX Item "3. When job B reaches a specified point, it allows job A to run (the dependency is coded in B).  This uses the \fBbefore\fR commands (see below)."

.IX Item "\fBsync_count=number\fR"

.IX Item "\fBsync_with=jobid\fR"

.IX Item "\fBafter=jobid[,jobid, ...]\fR"

.IX Item "\fBafter_ok=jobid[,jobid, ...]\fR"

.IX Item "\fBafter_not_ok=jobid[,jobid, ...]\fR"

.IX Item "\fBafter_any=jobid[,jobid, ...]\fR"

.IX Item "\fBdepends_on=number\fR"

.IX Item "\fBbefore=jobid[,jobid, ...]\fR"

.IX Item "\fBbefore_ok=jobid[,jobid, ...]\fR"

.IX Item "\fBbefore_not_ok=jobid[,jobid, ...]\fR"

.IX Item "\fBbefore_any=jobid[,jobid, ...]\fR"

.IX Subsection "\s-1EXTRA\s0 \s-1DIRECTIVES\s0"

.IX Item "\fBtarget_cmd_line_args=string\fR"

.IX Item "\fBtarget_script_directive=string\fR"

.IX Subsection "\s-1TRANSLATION\s0 \s-1CONTROL\s0 \s-1PARAMETERS\s0"

.IX Item "\fBsource_directive_prefix=string\fR"

.IX Item "\fBtarget_comment_prefix=string\fR"

.IX Item "\fBtarget_comment_suffix=string\fR"

.IX Item "\fBtarget_directive_prefix=string\fR"

.IX Item "\fBtarget_key_value_separator=string\fR"

.IX Item "\fBtarget_submit_command=string\fR"

.IX Header "DIAGNOSTICS"

.IX Header "EXAMPLES"

.IX Header "ENVIRONMENT"

.IX Header "FILES"

.IX Header "NOTES"

.IX Subsection "qprep'S \s-1ROLE\s0"

.IX Subsection "\s-1COMMAND\s0 \s-1NOTES\s0"

.IX Header "SEE ALSO"

.IX Header "AUTHOR"

.IX Header "HISTORY"

