Submitting jobs to launch instances from IBM Cloud Virtual Servers for VPC Gen 2

Use the bsub command to submit jobs that require instances that are launched from IBM Cloud Gen 2 as the resource provider. Use the bhosts command to monitor borrowed hosts and host status.

Procedure

  1. Use the bsub command to submit jobs that require instances that are launched from IBM Cloud Gen 2 as the resource provider.
    The following bsub command with no options submits a job that triggers a launch demand when no resources are available in the LSF cluster:
    bsub myjob
    You can also use the icgen2host resource in a select[] resource requirement string. Because the icgen2host resource is defined in a template as a Boolean attribute, it triggers a launch demand:
    bsub -R "select[icgen2host]" myjob
  2. Use the bhosts command to monitor instances.

    The bhosts command with the -a option shows all hosts, including terminated instances.

    The status of the instances shows as ok when they join the LSF cluster as dynamic hosts.

    If no jobs start running on an instance from IBM Cloud Gen 2 in the number of minutes specified by the LSF_EXTERNAL_HOST_IDLE_TIME parameter, the instance is relinquished and its host status changes to closed_RC. When the instance is terminated, the host status becomes unavail.

    If an instance is in the cluster longer than the number of minutes specified in the LSB_RC_EXTERNAL_HOST_MAX_TTL parameter, it is closed and any jobs running on the instance are allowed to run to completion. Once the instance is idle, it is terminated and its status becomes unavail.

    Note: You cannot use the badmin hopen command to open a borrowed host in closed_RC status.
  3. Optional: Use external job submission and execution controls.

    Use the job submission and execution controls feature to use external, site-specific executable files to validate, modify, and reject jobs, transfer data, and modify the job execution environment.

    To control job submissions such as permission checks before instances are launched from IBM Cloud Gen 2, you can set up an external submission (esub) script. For more information, see External Job Submission and Execution Controls