BHOST(5)

πŸ’– bhost(5) β€” LAM boot schema (host file) format πŸ’–

okay bestie, listen up, this is the manual page for bhost, aka the LAM file formats family, and it's literally the glow-up guide for your cluster. it's giving "who am i booting and how many CPUs do they have" and honestly? iconic. πŸŽ€


✨ NAME ✨

bhost β€” the LAM boot schema (host file) format, bestie. that's it, that's the whole name. πŸ’…


🌸 SYNTAX 🌸

here's the vibe, fr fr:

#
# comments
#
<machine> [cpu=<cpucount>] [user=<userid>]
<machine> [cpu=<cpucount>] [user=<userid>]
 ...

comments start with #, one machine per line, and the cpu= and user= bits are optional β€” like accessories on a cute outfit. πŸ¦‹


🫢 DESCRIPTION 🫢

so a boot schema is basically the guest list for the machines that are gonna team up and form a multicomputer running LAM. it gets used by recon(1) to double-check the initial conditions before running LAM, by lamboot(1) to actually start LAM, and by lamhalt(1) to shut LAM down. also heads up: lamwipe(1) has been deprecated by the lamhalt(1) command, so if you're still using it… bestie, no. πŸ’€

the particular syntax of a LAM boot schema is sometimes called the "host file" syntax, and it's line oriented. one line tells you the name of a machine (usually the full Internet domain name), an optional number of CPUs available on that machine, and optionally the userid to access it with. three little facts per line, main character energy. ✨

common boot schemas for a particular site can be made by the system administrator and dropped in the installation directory under etc/. they typically start with the prefix bhost. but individual users usually make their own boot schema, especially when the configurations are simple β€” do it yourself, it's self-care. πŸ’–


🌈 NAME RESOLUTION 🌈

ngl, this part matters: lamboot resolves all names listed in bhost on the node where lamboot was invoked. that's a hard yes on "the node in which lamboot was invoked on," periodt. the lamboot(1) man page has the tea on address resolution, plus examples on how to handle multiple network interface cards (NICs) in a node, etc. go read it, iykyk. 🧚


πŸŽ€ EXAMPLE πŸŽ€

here's an example three node boot schema, look at her:

#
# example LAM host file
#
server.cluster.example.com schedule=no
beowulf1.cluster.example.com cpu=2
beowulf2.cluster.example.com
beowulf2.cluster.example.com
somewhere.else.example.com user=guest

okay let's break it down because the details are everything:

  • the guest ID is significant, because the user has an alternate login ID on somewhere.else.example.com. plot twist, but a necessary one. πŸ¦‹
  • beowulf1 has a CPU count of 2 listed β€” and note that a CPU count of 1 is assumed if it's not given. this value gets used by mpirun(1), MPI_Comm_spawn(2), and MPI_Comm_spawn_multiple(2) for the "C" (or CPU) notation that specifies how many ranks to start. super useful for running on SMP machines, fr fr. πŸ’…
  • note the schedule=no clause. this means LAM will boot a daemon on that node, but by default will not launch any MPI processes on that node. handy when you wanna control your MPI applications from one node (like a server) but don't wanna run any MPI applications on it. in some environments this is the default (e.g., BProc). see the LAM User's Guide for more details. πŸ‘‘
  • beowulf2 is listed twice, but has no specific CPU count listed. in this case, LAM keeps a running tally of the total number of CPUs for that host. so LAM calculates that beowulf2 has two CPUs available for use. counting CPUs by counting occurances of a hostname is useful in a batch environment where a hostfile may list the same hostname multiple times, indicating that the batch scheduler has allocated multiple CPUs for a single job (e.g., PBS operates this way). no cap, that's the trick. ✨

and for the above-mentioned schema, the command "mpirun C foo" would start five instances of the foo program: two on beowulf1, two on beowulf2, and one on somewhere.else. ate that. πŸ”₯


πŸ’œ FILES πŸ’œ

  • $LAMHOME/etc/bhost.def β€” the default boot schema file. the OG, the blueprint, the moment. πŸŽ€

⭐ SEE ALSO ⭐

go give these their own little moment too:


LAM 7.1.4 β€’ July, 2007

and that's the whole page, bestie β€” this one's from LAM 7.1.4, dated July, 2007, and it still slays. go boot something cute. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά