In some Lava job scripts, especially those for parallel jobs, it is necessary to have a run time variable that contains a list of machines the job is dispatched to. There are two such variables in Platform Lava, but they are not documented at all in the two official Lava documents: Running Jobs with Platform Lava and Inside Platform Lava. Since they can be very useful, I decided to document them here.

First variable that you can use are LSB_HOSTS and LSB_MCPU_HOSTS.

The following example illustrates the difference between the two:

Say that you have 3 hosts (hostA, hostB, hostC), each having 1 dual core processor. That would mean that you 2 job slots available on each machine.

If you submitted the following job with bsub:

# bsub -m "hostA hostB hostC" -n 5 my_job

The difference between LSB_HOSTS and LSB_MCPU_HOSTS would be:

LSB_HOSTS=hostA hostA hostB hostB hostC

LSB_MCPU_HOSTS=hostA 2 hostB 2 hostC 1