bpost

sends external status messages and attaches data files to a job

Synopsis

bpost [-i message_index] [-d "description"] [-a data_file] job_ID | "job_ID[index]" | -J job_name
bpost [-h | -V]

Description

Provides external status information or sends data to a job in the system. Done or exited jobs cannot accept messages.

By default, operates on the message index 0. By default, posts the message "no description".

If a you specify a job ID:
  • You can only send messages and data to your own jobs.

  • You cannot send messages and data to jobs submitted by other users.

  • Only root and LSF administrators can send messages to jobs submitted by other users.

  • Root and LSF administrators cannot attach data files to jobs submitted by other users.

Job names are not unique; if you specify -J job_name:
  • You can only send messages and data to your own jobs.

  • You cannot send messages and data to jobs submitted by other users.

  • Root and the LSF administrators can only send messages and data to their own jobs.

A job can accept messages until it is cleaned from the system. If your application requires transfer of data from one job to another, use the -a option of bpost(1) to attach a data file to the job, then use the bread(1) command to copy the attachment to another file.

You can associate several messages and attached data files with the same job. As the job is processed, use bread(1) or bstatus(1) to retrieve the messages posted to the job. Use bread(1) to copy message attachments to external files.

For example, your application may require additional job status descriptions besides the ones that LSF provides internally (PEND, RUN, SUSP, etc.) Use the -d option to place your own status or job description text as a message to the job.

You can also use bstatus -d to update the external job status. The command:
bstatus -d "description" myjob

is equivalent to:

bpost -i 0 -d "description" myjob

With MultiCluster, both clusters must run LSF VersionĀ 7 or later. You cannot post a message to a MultiCluster job if the clusters are disconnected. You cannot attach files to MultiCluster jobs.

Options

-a data_file

Attaches the specified data file to the job external storage. This option is ignored for MultiCluster jobs; you can only attach a file if the job executes in the local cluster.

Use the JOB_ATTA_DIR parameter in lsb.params(5) to specify the directory where attachment data files are saved. The directory must have at least 1 MB of free space. mbatchd checks for available space in the job attachment directory before transferring the file.

Use the MAX_JOB_ATTA_SIZE parameter in lsb.params to set a maximum size for job message attachments.

-d "description"

Places your own status text as a message to the job. The message description has a maximum length of 512 characters.

For example, your application may require additional job status descriptions besides the ones that LSF provides internally (PEND, RUN, SUSP, etc.)

Default: "no description"

-i message_index

Operates on the specified message index.

Default: 0

Use the MAX_JOB_MSG_NUM parameter in lsb.params to set a maximum number of messages for a job. With MultiCluster, to avoid conflicts, MAX_JOB_MSG_NUM should be the same in all clusters.

job_ID | "job_ID[index]" | -J job_name

Required. Operates on the specified job. With MultiCluster job forwarding model, you must always use the local job ID.

The job name can be up to 4094 characters long. Job names are not unique.

The wildcard character (*) can be used anywhere within a job name, but cannot appear within array indices. For example job* returns jobA and jobarray[1], *AAA*[1] returns the first element in all job arrays with names containing AAA, however job1[*] will not return anything since the wildcard is within the array index.

-h

Prints command usage to stderr and exits.

-V

Prints LSF release version to stderr and exits.

Example

bpost -i 1 -d "step 1" -a step1.out 2500

Puts the message text step 1 into message index 1, and attaches the file step1.out to job 2500.

See also

bread(1), bstatus(1), MAX_JOB_ATTA_SIZE, MAX_JOB_MSG_NUM