lamssi_rpi(7)
β¨ lamssi_rpi β the RPI SSI tea, served fresh π
okay bestie, sit down, hydrate, because this is the lamssi_rpi(7) page and it's literally all about LAM's RPI SSI modules. no cap, this one's a whole vibe. π¦
πΈ DESCRIPTION πΈ
so the "kind" for RPI SSI modules is rpi. like, that's the magic word. specifically, the string rpi (no quotes, we're not doing that) is what you use to say which RPI should be used, and you say it on the mpirun command line with the -ssi switch. for example:
mpirun -ssi rpi tcp C my_mpi_program
which specifies to use the tcp RPI (and to launch a single copy of the executable "foo" on each node). yes, it says "foo" in there. i'm just the messenger. π
the rpi string also gets used as a prefix to send parameters to specific RPI modules. like this:
mpirun -ssi rpi tcp -ssi rpi_tcp_short 131072 C my_mpi_program
that one specifies to use the tcp RPI, and to pass in the value of 131072 (128K) as the short message length for TCP messages. peep each RPI section below for a full description of parameters that are accepted by each RPI. π
LAM currently supports five different RPI SSI modules: gm, lamd, tcp, sysv, usysv. periodt.
π SELECTING AN RPI MODULE π
only ONE RPI module may be selected per command execution. just one. not two. don't try it. π«
the selection of which module happens during MPI_INIT, and is used for the duration of the MPI process. and it is erroneous to select different RPI modules for different processes β like, that's a no from the whole group chat.
the kind for selecting an RPI is rpi. for example:
mpriun -ssi rpi tcp C my_mpi_program
that selects to use the tcp RPI and run a single copy of the foo exectuable on each node. (yes, "mpriun". yes, "exectuable". the manpage said it, not me. iykyk π)
π AVAILABLE MODULES π
as with all SSI modules, it is possible to pass parameters at run time. this section discusses the built-in LAM RPI modules, as well as the run-time parameters that they accept. the way that we can do that?? iconic.
in the discussion below, the parameters are discussed in terms of kind and name. the kind and name may be specified as command line arguments to the mpirun command with the -ssi switch, or they may be set in environment variables of the form LAM_MPI_SSI_name=value. note that using the -ssi command line switch will take precendence over any environment variables. π
if the RPI that is selected is unable to run (e.g., attempting to use the gm RPI when gm support was not compiled into LAM, or if no gm hardware is available on the nodes), an appropriate error message will be printed and execution will abort. so like... vibe check failed, we're done here. π
π§ crtcp RPI π§
the crtcp RPI is a checkpoint/restart-able version of the tcp RPI (see below). it's separate from the tcp RPI because the current implementation imposes a slight performance penalty to enable the ability to checkpoint and restart MPI jobs. its tunable parameters are the same as the tcp RPI. this RPI probably only needs to be used when the ability to checkpoint and restart MPI jobs is required.
see the LAM/MPI User's Guide for more details on the crtcp RPI as well as the checkpoint/restart capabilities of LAM/MPI. the lamssi_cr(7) manual page also contains additional information. π«Ά
β gm RPI β
the gm RPI is used with native Myrinet networks. please note that the gm RPI exists, but has not yet been optimized. it gives significantly better performance than TCP over Myrinet networks, but has not yet been properly tuned and instrumented in LAM. it's giving "potential unlocked, tuning pending". π
that being said, there are several tunable parameters in the gm RPI:
rpi_gm_maxport Nβ ifrpi_gm_portis not specified, LAM will attempt to find an open GM port to use for MPI communications starting with port1and ending with theNvalue speified by therpi_gm_maxportparameter. if unspecified, LAM will try all existing GM ports.rpi_gm_port Nβ LAM will attempt to use gm portNfor MPI communications.rpi_gm_tinymsglen Nβ specifies the maximum message size (in bytes) for "tiny" messages (i.e., messages that are sent entirely in one gm message). tiny messages arememcpy'ed into the header before it is sent to the destination, andmemcpy'ed out of the header into the destination buffer on the receiver. hence, it is not advisable to make this value too large.rpi_gm_fast 1β specifies to use the "fast" protocol for sending short gm messages. unreliable in the presence of GM errors or timeouts; this parameter is not advised for MPI applications that essentially do not make continual progress within MPI.rpi_gm_cr 1β enable checkpoint/restart behavior for gm. this can only be enabled if the gm rpi module was compiled with support for thegm_get()function, which is disabled by default. see the LAM Installation and User's Guides for more information on this parameter before you use it. π
π lamd RPI π
the lamd RPI uses LAM's "out-of-band" communication mechanism for passing MPI messages. specifically, MPI messages are sent from the user process to the local LAM daemon, then to the remote LAM daemon (if the destination process is on a different node), and then to the destination process. it's a little road trip, every single message. π
while this adds latency to message passing because of the extra hops that each message must travel, it allows for true asynchronous message passing. since the LAM daemon is running in its own execution space, it can make progress on message passing regardless of the state / status of the user's program. this can be an overall net savings in performance and execution time for some classes of MPI programs. main character energy, honestly.
it is expected that this RPI will someday become obsolete when LAM becomes multi-threaded and allows progress to be made on message passing in separate threads rather than in separate processes. so enjoy it while it's here bestie. π₯²
the lamd RPI has no tunable parameters.
π tcp RPI π
the tcp RPI uses pure TCP for all MPI message passing. TCP sockets are opened between MPI processes and are used for all MPI traffic.
the tcp RPI has one tunable parameter:
rpi_tcp_short <bytes>β tells thetcpRPI the smallest size (in bytes) for a message to be considered "long". short messages are sent eagerly (even if the receiving side is not expecting them). long messages use a rendevouz protocol (i.e., a three-way handshake) such that the message is not actually sent until the receiver is expecting it. this value defaults to64k.
π§ sysv RPI π§
the sysv RPI uses shared memory for communication between MPI processes on the same node, and TCP sockets for communication between MPI processes on different nodes. System V semaphores are used to lock the shared memory pools. this RPI is best used when running multiple MPI processes on uniprocessors (or oversubscribed SMPs) because of the blocking / yielding nature of semaphores. π«
the sysv RPI has the following tunable parameters:
rpi_tcp_short <bytes>β since thesysvRPI uses parts of thetcpRPI for off-node communication, this parameter also has relevance to thesysvRPI. the meaning of this parameter is discussed in thetcpRPI section.rpi_sysv_short <bytes>β tells thesysvRPI the smallest size (in bytes) for a message to be considered "long". short shared memory messages are sent using a small "postbox" protocol; long messages use a more general shared memory pool method. this value defaults to8k.rpi_sysv_pollyield <bool>β if set to a nonzero number, force the use of a system call to yield the processor. the system call will beyield(),sched_yield(), orselect()(with a 1ms timeout), depending what LAM'sconfigurescript finds at configuration time. this value defaults to1.rpi_sysv_shmpoolsize <bytes>β the size of the shared memory pool that is used for long message transfers. it is allocated once on each node for each MPI parallel job. specifically, if multiple MPI processes from the same parallel job are spawned on a single node, this pool will only be allocated once. theconfigurescript will try to determine a default size for the pool if none is explicitly specified (you should always check this to see if it is reasonable). larger values should improve performance especially when an application passes large messages, but will also increase the system resources used by each task.rpi_sysv_shmmaxalloc <bytes>β to prevent a single large message transfer from monopolizing the global pool, allocations from the pool are actually restricted to a maximum ofrpi_sysv_shmmaxallocbytes each. even with this restriction, it is possible for the global pool to temporarily become exhausted. in this case, the transport will fall back to using the postbox area to transfer the message. performance will be degraded, but the application will progress. theconfigurescript will try to determine a default size for the maximum atomic transfer size if none is explicitly specified (you should always check this to see if it is reasonable). larger values should improve performance especially when an application passes large messages, but will also increase the system resources used by each task.
π¦ usysv RPI π¦
the usysv RPI uses shared memory for communication between MPI processes on the same node, and TCP sockets for communication between MPI processes on different nodes. spin locks are used to lock the shared memory pools. this RPI is best used when the multiple of MPI processes on a single node is less than or equal to the number of processors because it allows LAM to fully occupy the processor while waiting for a message and never be swapped out. π
the usysv RPI has many of the same tunable parameters as the sysv RPI:
rpi_tcp_short <bytes>β same meaning as in thesysvRPI.rpi_usysv_short <bytes>β same meaning asrpi_sysv_shortin thesysvRPI.rpi_usysv_pollyield <bool>β same meaning asrpi_sysv_pollyieldin thesysvRPI.rpi_usysv_shmpoolsize <bytes>β same meaning asrpi_sysv_shmpoolsizein thesysvRPI.rpi_usysv_shmmaxalloc <bytes>β same meaning asrpi_sysv_shmmaxallocin thesysvRPI.rpi_usysv_readlockpoll <iterations>β number of iterations to spin before yielding the processor while waiting to read. this value defaults to10,000.rpi_usysv_writelockpoll <iterations>β number of iterations to spin before yielding the processor while waiting to write. this value defaults to10.
π SEE ALSO π
lamssi(7), lamssi_cr(7), mpirun(1), LAM User's Guide
and that's the whole page bestie!! π this absolute masterpiece of a manual page is from LAM 7.1.4, dated July, 2007 β so yeah, it's a vintage icon, but it still ate. go forth and pick your RPI wisely. slay. β¨π«Ά
π¦ where this page comes from
- debian bookworm: lam-runtime 7.1.4-7+b1
- debian trixie: lam-runtime 7.1.4-7.2
- ubuntu jammy: lam-runtime 7.1.4-7
- ubuntu noble: lam-runtime 7.1.4-7.1build2
- ubuntu questing: lam-runtime 7.1.4-8
- ubuntu resolute: lam-runtime 7.1.4-8build1
- ubuntu stonking: lam-runtime 7.1.4-8build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms