Parallel Programming Guide for HP-UX Systems

MPI
Running
Chapter 2 51
You can also use an indirect approach and specify that all off-host communication occur
between daemons, by specifying the -commd option to the mpirun command. In this case, the
processes on a host use shared memory to send messages to and receive messages from the
daemon. The daemon, in turn, uses a socket connection to communicate with daemons on
other hosts.
Figure 2-1 shows the structure for daemon communication.
Figure 2-1 Daemon communication
To use daemon communication, specify the -commd option in the mpirun command. Once you
have set the -commd option, you can use the MPI_COMMD environment variable to specify the
number of shared-memory fragments used for inbound and outbound messages. Refer to
“mpirun (mpirun.all)” on page 36 and “MPI_COMMD” on page 28 for more information.
Daemon communication can result in lower application performance. Therefore, use it only
when scaling an application to a large number of hosts.
NOTE HP MPI sets up one daemon per host (or appfile entry) for communication. If
you invoke your application with -np x, HP MPI generates x+1 processes.
host1
host2
Daemon
process
Daemon
process
A
B
C
F
E
Application
Socket
connection
processes
Outbound/Inbound
shared-memory
fragments