-m

Runs the job on one of the specified hosts or host groups, or within the specified compute units.

Categories

resource

Synopsis

bsub -m "host_name[@cluster_name][[!] | +[pref_level]] | host_group[[!] | +[pref_level | compute_unit[[!] | +[pref_level]] ..."

Description

By default, if multiple hosts are candidates, runs the job on the least-loaded host.

When a compute unit requirement is specified along with a host or host group preference, the host or host group preference only affects the host order within the compute unit. In addition the job will be rejected unless:

  • A host in the list belongs to a compute unit, and
  • A host in the first execution list belongs to a compute unit.

When used with a compound resource requirement, the first host allocated must satisfy the simple resource requirement string appearing first in the compound resource requirement.

To change the order of preference, put a plus (+) after the names of hosts or host groups that you would prefer to use, optionally followed by a preference level. For preference level, specify a positive integer, with higher numbers indicating greater preferences for those hosts. For example, -m "hostA groupB+2 hostC+1" indicates that groupB is the most preferred and hostA is the least preferred.

The keyword others can be specified with or without a preference level to refer to other hosts not otherwise listed. The keyword others must be specified with at least one host name or host group, it cannot be specified by itself. For example, -m "hostA+ others" means that hostA is preferred over all other hosts.

If you also use -q, the specified queue must be configured to include at least a partial list of the hosts in your host list. Otherwise, the job is not submitted. To find out what hosts are configured for the queue, use bqueues -l.

If the host group contains the keyword all, LSF dispatches the job to any available host, even if the host is not defined for the specified queue.

To display configured host groups and compute units, use bmgroup.

For the MultiCluster job forwarding model, you cannot specify a remote host by name.

For parallel jobs, specify first execution host candidates when you want to ensure that a host has the required resources or runtime environment to handle processes that run on the first execution host.

To specify one or more hosts or host groups as first execution host candidates, add the (!) symbol after the host name, as shown in the following example:

bsub -n 2 -m "host1 host2! hostgroupA! host3 host4" my_parallel_job

LSF runs my_parallel_job according to the following steps:
  1. LSF selects either host2 or a host defined in hostgroupA as the first execution host for the parallel job.
    Note: First execution host candidates specified at the job-level (command line) override candidates defined at the queue level (in lsb.queues).
  2. If any of the first execution host candidates have enough processors to run the job, the entire job runs on the first execution host, and not on any other hosts.

    In the example, if host2 or a member of hostgroupA has two or more processors, the entire job runs on the first execution host.

  3. If the first execution host does not have enough processors to run the entire job, LSF selects additional hosts that are not defined as first execution host candidates.
    Follow these guidelines when you specify first execution host candidates:
    • If you specify a host group, you must first define the host group in the file lsb.hosts.
    • Do not specify a dynamic host group as a first execution host.
    • Do not specify all, allremote, or others, or a host partition as a first execution host.
    • Do not specify a preference (+) for a host identified by (!) as a first execution host candidate.
    • For each parallel job, specify enough regular hosts to satisfy the processor requirement for the job. Once LSF selects a first execution host for the current job, the other first execution host candidates become unavailable to the current job, but remain available to other jobs as either regular or first execution hosts.
    • You cannot specify first execution host candidates when you use the brun command.

In a MultiCluster environment, insert the (!) symbol after the cluster name, as shown in the following example:

bsub -n 2 -m "host2@cluster2! host3@cluster2" my_parallel_job

When specifying compute units, the job runs within the listed compute units. Used in conjunction with a mandatory first execution host, the compute unit containing the first execution host is given preference.

In the following example one host from host group hg appears first, followed by other hosts within the same compute unit. Remaining hosts from other compute units appear grouped by compute, and in the same order as configured in the ComputeUnit section of lsb.hosts.

bsub -n 64 -m "hg! cu1 cu2 cu3 cu4" -R "cu[pref=config]" my_job

Examples

bsub -m "host1 host3 host8 host9" my_program

Submit my_program to run on one of the candidate hosts: host1, host3, host8 and host9.