HP-MPI User's Guide (11th Edition)

Debugging and troubleshooting
Troubleshooting HP-MPI applications
Chapter 6208
After shared-memory allocation is done, every MPI process attempts to
attach to the shared-memory region of every other process residing on
the same host. This shared memory allocation can fail if the system is
not configured with enough available shared memory. Consult with your
system administrator to change system settings. Also, MPI_GLOBMEMSIZE
is available to control how much shared memory HP-MPI tries to
allocate. See “MPI_GLOBMEMSIZE” on page 153 for more information.
Message buffering
According to the MPI standard, message buffering may or may not occur
when processes communicate with each other using MPI_Send. MPI_Send
buffering is at the discretion of the MPI implementation. Therefore, you
should take care when coding communications that depend upon
buffering to work correctly.
For example, when two processes use MPI_Send to simultaneously send a
message to each other and use MPI_Recv to receive the messages, the
results are unpredictable. If the messages are buffered, communication
works correctly. If the messages are not buffered, however, each process
hangs in MPI_Send waiting for MPI_Recv to take the message. For
example, a sequence of operations (labeled "Deadlock") as illustrated in
Table 6-1 would result in such a deadlock. Table 6-1 also illustrates the
sequence of operations that would avoid code deadlock.
Propagation of environment variables
When working with applications that run on multiple hosts using an
appfile, if you want an environment variable to be visible by all
application ranks you must use the -e option with an appfile or as an
argument to mpirun.
One way to accomplish this is to set the -e option in the appfile:
Table 6-1 Non-buffered messages and deadlock
Deadlock No Deadlock
Process 1 Process 2 Process 1 Process 2
MPI_Send(,...2
,....)
MPI_Send(,...1
,....)
MPI_Send(,...2
,....)
MPI_Recv(,...1
,....)
MPI_Recv(,...2,
....)
MPI_Recv(,...1,
....)
MPI_Recv(,...2
,....)
MPI_Send(,...1
,....)