[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
bsub
submits a batch job to LSF desktop support
SYNOPSIS
bsub
[options] command [arguments]
bsub
[-h
|-V
]OPTION LIST
-H
-K
-b
begin_time
-e
err_file
-eo
err_file
-extsched "AC_RES_REQ=
resources"
-f "
local_file op [remote_file]"
...
-J
job_name |-J
"
job_name[
index_list]%
job_limit"
-o
out_file
-oo
out_file
-P
project_name
-q
"
queue_name ..."
-sp
priority
-u
mail_user
-w '
dependency_expression'
-W
run_limit
DESCRIPTION
Submits a job for batch execution to a queue and assigns it a unique numerical job ID.
Unless your cluster is configured as an LSF desktop support-only cluster and the LSF desktop support queue is the default queue, you must specify the LSF desktop support queue when you submit a job using the
-q
option.OPTIONS
-H
Holds the job in the PSUSP state when it is submitted. The job is not scheduled until you tell the system to resume the job.
-K
Submits a batch job and waits for the job to complete. You are not able to submit another job until the job is completed.
-b begin_time
Dispatches the job for execution on or after the specified date and time. The date and time are in the form of [[month:]day:]hour:minute where the number ranges are as follows: month 1-12, day 1-31, hour 0-23, minute 0-59.
At least two fields must be specified. These fields are assumed to be hour:minute. If three fields are given, they are assumed to be day:hour:minute, and four fields are assumed to be month:day:hour:minute.
-e err_file
Specify a file path. Appends the standard error output of the job to the specified file.
If the current working directory is not accessible on the execution host after the job starts, LSF writes the standard error output file to
/tmp/
.-eo err_file
Specify a file path. Overwrites the standard error output of the job to the specified file.
If the current working directory is not accessible on the execution host after the job starts, LSF writes the standard error output file to
/tmp/
.-extsched "AC_RES_REQ=resources"
Specifies that the job must run on a desktop client that meets the specified resource requirements. You use the information that follows to create a logical expression that defines the resources required. Check with your LSF desktop support administrator for a list of any custom resource requirements you can specify in addition to the following list:
The following CPU types are supported:
Specify the resource specification in the following format:
"AC_RES_REQ=resource_name operator value[operator resource_name operator value...]"Note: The resource specification cannot exceed 512 bytes in length.
resource_name
The name of the resource as defined in
ac.restype.xml.
operator
The operator that defines the relationship between the resource name and the value, or between nested expressions. The operators are listed below in the order of precedence (the order in which they are evaluated, from top to bottom). The operator can be one of the following:
value
The value of the resource to compare.
To specify multiple resources, combine specifications together using && or || operators. You can join specifications using parentheses. For example:
"AC_RES_REQ=(cput==PIV||mem>256)&&disk>500"The above example specifies either a Genuine Intel Pentium 4 CPU or 256 MB RAM, and 500 MB disk space.
-f "local_file operator [remote_file]" ...
Required within LSF desktop support, because it does not use a shared file system--all files and executables must be copied to the remote host.
Copies a file between the local (submission) host and the remote (execution) host. Specify absolute or relative paths for the file on the local host, but specify a relative path for the remote file.
If the remote file is not specified, it defaults to the local file, which is required.
Use multiple
-f
options to specify multiple files. You can specify up to 32 file transfers in onebsub
command. If you need to make more than 32 file transfer requests, you can use zip and unzip to transfer all data files or results files in a single transfer.You can use the following operators:
- > Copies the local file to the remote file before the job starts.
You can enable or disable reading from the cache on the desktop client for a specific file when submitting a job. If the administrator allows writing to the cache on desktop clients (when the
SEDDisableCache
parameter inSEDConfig.xml
is set tono
), you can also enable or disable writing to the cache for a specific file when submitting a job, as described below. For additional information on file caching settings, refer to the Platform LSF Desktop Support Administrator's Guide.
- The + operator indicates:
- LSF desktop support downloads the file from the cache, if it exists there. Otherwise, it downloads the file from the Web server.
- If the administrator allows desktop clients to write to the cache, then LSF desktop support also writes the file to the desktop client cache.
For example:
bsub -f "local_file+ > remote_file"
caches the file on the desktop client.- The - operator indicates:
- LSF desktop support downloads the file from the Web server.
- LSF desktop support does not write the file to the desktop client cache.
For example:
bsub -f "local_file- > remote_file"
does not write the file to the desktop client cache.- If there is no additional operator, for example
bsub -f "local_file > remote_file"
, then file caching on the desktop client depends on the file caching setting for each desktop server (specified by theLSB_MED_CACHEFILE_DEFAULT
parameter inmed.conf
). For additional information on file caching, refer to the Platform LSF Desktop Support Administrator's Guide.
Note: If a + or - operator is the last character of a file name used with the > operator, it is removed from the file name. Therefore, to use a file name ending in + or - with the > operator, repeat the operator as the last character. For example, if the copied file ismy_data+
, specify it asmy_data++
. For example, the command would be:bsub -f "myfile++ > myfile"
- < Copies the remote file to the local file after the job completes.
- << Appends the remote file to the local file after the job completes. The local file must exist.
- >< Copies the local file to the remote file before the job starts. Then copies the remote file to the local file after the job completes. Overwrites the local file.
- <> Copies the local file to the remote file before the job starts. Then copies the remote file to the local file after the job completes. Overwrites the local file.
Note: If an operator specifies copying a file from the server to a client when caching on the desktop client is enabled, then if the file has been transferred to the desktop client before, it is copied from the cache instead of from the desktop server.
-J job_name
-J "job_name[index_list]%job_slot_limit"Assigns the specified name to the job, and, for job arrays, specifies the indices of the job array and optionally the maximum number of jobs that can run at any given time. If you do not specify a job name, the command name is used.
To specify a job array, enclose the index list in square brackets, as shown, and enclose the entire job array specification in quotation marks, as shown. The index list is a comma-separated list whose elements have the syntax start[-end[
:
step]] where start, end and step are positive integers. If the step is omitted, a step of one is assumed. The job array index starts at one. By default, the maximum job array index is 1000.All jobs in the array share the same job ID and parameters. Each element of the array is distinguished by its array index.
-o out_file
Specify a file path. Appends the standard output of the job to the specified file. Sends the output by mail if the file does not exist, or the system has trouble writing to it.
If only a file name is specified, LSF writes the output file to the current working directory. If the current working directory is not accessible on the execution host after the job starts, LSF writes the standard output file to
/tmp/
.-oo out_file
Specify a file path. Overwrites the standard output of the job to the specified file if it exists, or sends the output to a new file if it does not exist. Sends the output by mail if the system has trouble writing to the file.
If only a file name is specified, LSF writes the output file to the current working directory. If the current working directory is not accessible on the execution host after the job starts, LSF writes the standard output file to
/tmp/
.If you use
-oo
without-e
or-eo
, the standard error of the job is stored in the output file.-P project_name
Assigns the job to the specified project. If you do not specify a project, the project defined in LSB.DEFAULTPROJECT is used.
-q "queue_name ..."
Submits the job to one of the specified queues. Quotes are optional for a single queue. The specified queues must be defined for LSF desktop support.
If you do not specify a queue name, the default LSF desktop support queue AC_QUEUE is used.
-sp priority
Specifies job priority, which allow users to order their jobs in a queue. Valid values for priority are any integers between 1 and MAX_USER_PRIORITY. LSF and queue administrators can specify priorities beyond MAX_USER_PRIORITY.
-u mail_user
Sends mail to the specified email destination.
-w 'dependency_expression'
LSF places your job only when the dependency expression evaluates to TRUE. If you specify a dependency on a job that LSF cannot find (such as a job that has not yet been submitted), your job submission fails.
The dependency expression is composed of one or more dependency conditions. To combine conditions, use the following logical operators:
&& (AND)
|| (OR)
! (NOT)
Use parentheses to indicate the order of operations, if necessary.
Enclose the dependency expression in single quotes ('), and use double quotes for quoted items within it, such as job names.
In dependency conditions, the variable op represents one of the following relational operators:
>, >=, <, <=, ==, or !=
Use the following conditions to form the dependency expression:
done(job_ID |"job_name" ...)
The job state is DONE. This is the default condition.
ended(job_ID | "job_name")
The job state is EXIT or DONE.
exit(job_ID | "job_name" [,[op] exit_code])
The job state is EXIT, and the job's exit code satisfies the comparison test. If you specify an exit code with no operator, the test is for equality (== is assumed).
job_ID |"job_name"
numdone(job_ID, op number | *)
For a job array, the number of jobs in the DONE state satisfies the test. Use * (with no operator) to specify all the jobs in the array.
numended(job_ID, op number | *)
For a job array, the number of jobs in the DONE or EXIT states satisfies the test. Use * (with no operator) to specify all the jobs in the array.
numexit(job_ID, op number | *)
For a job array, the number of jobs in the EXIT state satisfies the test. Use * (with no operator) to specify all the jobs in the array.
numpend(job_ID, op number | *)
For a job array, the number of jobs in the PEND state satisfies the test. Use * (with no operator) to specify all the jobs in the array.
numrun(job_ID, op number | *)
For a job array, the number of jobs in the RUN state satisfies the test. Use * (with no operator) to specify all the jobs in the array.
numstart(job_ID, op number | *)
For a job array, the number of jobs in the RUN, USUSP, or SSUSP states satisfies the test. Use * (with no operator) to specify all the jobs in the array.
post_done(job_ID | "job_name")
The job state is POST_DONE (the post-processing of specified job has completed without errors).
post_err(job_ID | "job_name")
The job state is POST_ERR (the post-processing of the specified job has completed with errors).
started(job_ID | "job_name")
The job state is:
- RUN, DONE, or EXIT
- PEND or PSUSP, and the job has a pre-execution command
(bsub -E) that is running.-W [hour:]minute
Sets the run time limit of the batch job. If a job runs longer than the specified run limit, it is killed immediately.
The run limit is in the form of [hour
:
]minute. The minutes can be specified as a number greater than 59. For example, three and a half hours can either be specified as 3:30, or 210.-h
Prints command usage to
stderr
and exits.-V
Prints LSF release version to
stderr
and exits.command [argument]
The job can be specified by a command line argument command. command is assumed to begin with the first word that is not part of a
bsub
option. All arguments that follow command are provided as the arguments to the command.Example: Transfer single application file
The following example transfers a single Windows application TestCPU.exe to an desktop client to run:
bsub -f "TestCPU.exe > TestCPU.exe" TestCPU.exe
Example: Transfer multiple files
The following example transfers
TestCPU.bat
, which launchesTestCPU.exe
:
bsub -f "TestCPU.exe > TestCPU.exe" \
-f "TestCPU.bat > TestCPU.bat" \
TestCPU.bat[ Top ]
[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
Date Modified: January 29, 2009
Platform Computing: www.platform.com
Platform Support: support@platform.com
Platform Information Development: doc@platform.com
Copyright © 1994-2009 Platform Computing Corporation. All rights reserved.