Runs the job on one of the specified hosts or host groups, or within the specified compute units.
resource
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:
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
In the example, if host2 or a member of hostgroupA has two or more processors, the entire job runs on the first execution host.
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
bsub -m "host1 host3 host8 host9" my_program
Submit my_program to run on one of the candidate hosts: host1, host3, host8 and host9.