Platform LSF Reference Version 6.2

bsub
Platform LSF Reference
158
If the pre-exec command exits with 0 (zero), then the real job is started on the selected
host. Otherwise, the job (including the pre-exec command) goes back to PEND status
and is rescheduled.
If your job goes back into PEND status, LSF will keep on trying to run the pre-exec
command and the real job when conditions permit. For this reason, be sure that your
pre-exec command can be run many times without having side effects.
The standard input and output for the pre-exec command are directed to the same files
as for the real job. The pre-exec command runs under the same user ID, environment,
home, and working directory as the real job. If the pre-exec command is not in the user’s
normal execution path (the $PATH variable), the full path name of the command must
be specified.
-f "local_file operator [remote_file]" ...
Copies a file between the local (submission) host and the remote (execution) host.
Specify absolute or relative paths, including the file names. You should specify the
remote file as a file name with no path when running in non-shared systems.
If the remote file is not specified, it defaults to the local file, which must be given. Use
multiple
-f options to specify multiple files.
operator
An operator that specifies whether the file is copied to the remote host, or
whether it is copied back from the remote host. The operator must be
surrounded by white space.
The following describes the operators:
> Copies the local file to the remote file before the job starts. Overwrites the
remote file if it exists.
< Copies the remote file to the local file after the job completes. Overwrites the
local file if it exists.
<< 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. Overwrites the
remote file if it exists. 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. Overwrites the
remote file if it exists. Then copies the remote file to the local file after the job
completes. Overwrites the local file.
If you use the
-i input_file option, then you do not have to use the -f option to copy
the specified input file to the execution host. LSF does this for you, and removes the
input file from the execution host after the job completes.
If you use the
-o out_file,-e err_file, -oo out_file, or the -eo err_file option, and you
want the specified file to be copied back to the submission host when the job completes,
then you must use the
-f option.
If the submission and execution hosts have different directory structures, you must
make sure that the directory where the remote file and local file will be placed exists.