HP-MPI User's Guide (11th Edition)
Understanding HP-MPI
Dynamic Processes
Chapter 3 169
Dynamic Processes
HP-MPI provides support for dynamic process management, specifically
the spawn, join, and connecting of new processes. MPI_Comm_spawn()
starts MPI processes and establishes communication with them,
returning an intercommunicator.
MPI_Comm_spawn_multiple() starts several different binaries (or the
same binary with different arguments), placing them in the same
comm_world and returning an intercommunicator. The
MPI_Comm_spawn() and MPI_Comm_spawn_multiple() routines provide an
interface between MPI and the runtime environment of an MPI
application.
MPI_Comm_accept() and MPI_Comm_connect() along with
MPI_Open_port() and MPI_Close_port() allow two independently run
MPI applications to connect to each other and combine their ranks into a
single communicator.
MPI_Comm_join() allows two ranks in independently run MPI
applications to connect to each other and form an intercommunicator
given a socket connection between them.
Each collection of spawned ranks only talks to the others through the
comm daemons via sockets. Even if two comm_worlds are on the same
host, the ranks within one comm_world will talk among themselves
through shared memory, but ranks between the two comm_worlds will
not talk to each other through shared memory.
Spawn functions supported in HP MPI:
• MPI_Comm_get_parent()
• MPI_Comm_spawn()
• MPI_Comm_spawn_multiple()
• MPI_Comm_accept()
• MPI_Comm_connect()
• MPI_Open_port()
• MPI_Close_port()
• MPI_Comm_join()