-pack

Submits job packs instead of an individual job.

Categories

pack

Synopsis

bsub -pack job_submission_file

Conflicting options

Do not use with any other bsub option in the command line.

Description

The purpose of the job packs feature is to speed up the submission of a large number of jobs. When job pack submission is enabled, you can submit jobs by submitting a single file containing multiple job requests.

Specify the full path to the job submission file. The job packs feature must be enabled (by defining LSB_MAX_PACK_JOBS in lsb.conf) to use the -pack option.

In the command line, this option is not compatible with any other bsub options. Do not put any other bsub options in the command line, as they must be included in each individual job request in the file.

In the job submission file, define one job request per line, using normal bsub syntax but omitting the word "bsub". For requests in the file, job pack submission supports all bsub options in the job submission file except for the following:

-I, -Ip, -Is, -IS, -ISp, -ISs, -IX, -XF, -K, -jsdl, -h, -V, -pack.

When you use the job packs feature to submit multiple jobs to mbatchd at once, instead of submitting the jobs individually, it minimizes system overhead and improves the overall job submission rate dramatically. When you use this feature, you create a job submission file that defines each job request. You specify all the bsub options individually for each job, so unlike chunk jobs and job arrays, there is no need for jobs in this file to have anything in common. To submit the jobs to LSF, you simply submit the file using the bsub -pack option.

LSF parses the file contents and submits the job requests to mbatchd, sending multiple requests at one time. Each group of jobs submitted to mbatchd together is called a job pack. The job submission file can contain any number of job requests, and LSF will group them into job packs automatically. The reason to group jobs into packs is to maintain proper mbatchd performance: while mbatchd is processing a job pack, mbatchd is blocked from processing other requests, so limiting the number of jobs in each pack ensures a reasonable mbatchd response time for other job submissions. Job pack size is configurable.

If the cluster configuration is not consistent and mbatchd receives a job pack that exceeds the job pack size defined in lsf.conf, it will be rejected.

Once the pack is submitted to mbatchd, each job request in the pack is handled by LSF as if it was submitted individually with the bsub command.

Enabling job packs

About this task

Job packs are disabled by default. Before running bsub -pack, you must enable the job packs feature.

Procedure

  1. Edit lsf.conf.
  2. Define the parameter LSB_MAX_PACK_JOBS=100.

    Defining this parameter enables the job packs feature and sets the job pack size. Set 100 as the initial pack size and modify the value as needed. If set to 1, jobs from the file are submitted individually, as if submitted directly using the bsub command. If set to 0, job packs are disabled.

  3. Optionally, define the parameter LSB_PACK_MESUB=N.

    Do this if you want to further increase the job submission rate by preventing the execution of any mesub during job submission. This parameter only affects the jobs submitted using job packs.

  4. Optionally, define the parameter LSB_PACK_SKIP_ERROR=Y.

    Do this if you want LSF to process all requests in a job submission file, and continue even if some requests have errors.

  5. Restart mbatchd to make your changes take effect.

Submitting job packs

Procedure

  1. Prepare the job submission file.

    The job submission file is a text file containing all the jobs that you want to submit. Each line in the file is one job request. For each request, the syntax is identical to the bsub command line without the word "bsub".

    For example,
    #This file contains 2 job requests.
    -R "select[mem>200] rusage[mem=100]" job1.sh
    -R "select[swap>400] rusage[swap=200]" job2.sh
    #end

    The job submission file has the following limitations:

    • The following bsub options are not supported:

      -I, -Ip, -Is, -IS,-ISp, -ISs, -IX, -XF, -K, -jsdl, -h, -V, -pack.

    • Terminal Services jobs are not supported.
    • I/O redirection is not supported.
    • Blank lines and comment lines (beginning with #) are ignored. Comments at the end of a line are not supported.
    • Backslash (\) is not considered a special character to join two lines.
    • Shell scripting characters are treated as plain text, they will not be interpreted.
    • Matched pairs of single and double quotations are supported, but they must have space before and after. For example, -J "job1" is supported, -J"job1" is not, and -J "job"1 is not.

    For job dependencies, use the job name instead of job ID to specify the dependency condition. A job request will be rejected if the job name or job ID of the job it depends on does not already exist.

  2. After preparing the file, use the bsub -pack option to submit all the jobs in the file.

    Specify the full path to the job submission file. Do not put any other bsub options in the command line, they must be included in each individual job request in the file.