Submitting Enroot jobs to LSF

Use the Enroot application profiles or queues to submit Enroot jobs to LSF.

About this task

The following job submission (bsub) options are not supported for container jobs: -E, -Ep.

Procedure

  1. Submit a job to an Enroot application profile or queue.
    • Use the bsub -app option to submit a job to an Enroot application profile (that is, an application profile with a specified value for the CONTAINER parameter).

      For example, if CONTAINER is defined in the enrootapp application profile, run the following command to submit a Enroot job:

      bsub -app enrootapp ./myjob.sh

    • Use the bsub -q option to submit a job to a Enroot queue (that is, a queue with a specified value for the CONTAINER parameter).

      For example, if CONTAINER is defined in the enrootq queue, run the following command to submit a Enroot job:

      bsub -q enrootq ./myjob.sh

    If you specify both the application profile and the queue in the same job submission, the CONTAINER and EXEC_DRIVER parameter settings in the application profile take precedence over the same parameter settings in the queue.

    For example, if you submit a job with the following command, the parameters in the enrootapp application profile override the corresponding parameters in the enrootq queue:

    bsub -app enrootapp -q enrootq ./myjob.sh

  2. If users are allowed to specify image names for Enroot container jobs at job submission time (that is, if the $LSB_CONTAINER_IMAGE environment variable is used as the image name when specifying the image keyword), set the LSB_CONTAINER_IMAGE environment variable at job submission time to specify the Enroot image name.

    Specify a container image name (such as centos) at the job submission time by setting the LSB_CONTAINER_IMAGE environment using one of the following methods:

    • Specify the LSB_CONTAINER_IMAGE environment variable according to your shell environment. For example, to specify the Enroot image named centos, set the environment variable as follows:
      • In csh or tcsh:

        setenv LSB_CONTAINER_IMAGE centos

      • In sh, ksh, or bash:

        export LSB_CONTAINER_IMAGE=centos

    • Use the bsub -env option. For example, to specify the Enroot image named centos

      bsub -env LSB_CONTAINER_IMAGE=centos -app enrootapp a.out -in in.dat -out out.dat

    • Use an esub script to set the LSB_CONTAINER_IMAGE environment variable, then call the esub with the bsub command:
      For example, create an esub.enroot script in the $LSF_SERVERDIR directory with the following contents:
      #!/bin/sh
      exec 1>&2
      echo "LSB_CONTAINER_IMAGE=\"$1\"" >> $LSB_SUB_MODIFY_ENVFILE

      Submit a job to call the esub.enroot script by running the following command:

      bsub -a "docker(centos)" -app enrootapp a.out -in in.dat -out out.dat