Use the bsub command to submit jobs that require instances that are
launched from Google Cloud Platform as the resource provider. Use the bhosts
command to monitor borrowed hosts and host status.
About this task
In this task, compute-kfxsz0 is a sample instance from Google Cloud
Platform.
Procedure
-
Use the bsub command to submit jobs that require instances that are launched
from Google Cloud Platform 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
googlehost resource in a
select[] resource requirement
string. Because the
googlehost resource is defined in a template as a Boolean
attribute, it triggers a launch
demand:
bsub -R "select[googlehost]" myjob
-
Use the bhosts command to monitor status of the 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 Google Cloud 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.
Verify that the job runs on the instance
compute-kfxsz0:
bhosts -a
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
lsfmanagement ok - 1 0 0 0 0 0
compute-kfxsz0 ok - 1 1 1 0 0 0
Note: You cannot use the badmin hopen command to open a borrowed host in
closed_RC status.
- 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 Google
Cloud, you can set up an external submission (esub) script. For more information,
see External Job Submission and Execution Controls