Reputation: 2926
I am writing a c++ wrapper of mpi.
I met a strange bug with mpi: in my case the bug only appeared when message is large enough, the run-time error is below:
Fatal error in MPI_Send: Other MPI error, error stack:
MPI_Send(173)...........................: MPI_Send(buf=0x7fffbd3db7f8, count=1, MPI_DOUBLE, dest=1, tag=2014, comm=0x84000004) failed
PIDI_CH3I_Progress(461)................:
MPID_nem_handle_pkt(636)................:
MPIDI_CH3_PktHandler_EagerShortSend(308): Failed to allocate memory for an unexpected message. 261895 unexpected messages queued.
I am only use MPI_Send(no MPI_Isend with request) and how could this error happen(can deadlock trigger this)?
Upvotes: 0
Views: 584
Reputation: 9062
The problem appears to be that you're not posting the matching calls to MPI_Recv
. When it say you have 200000 messages in the unexpected message queue, it means you've sent 200000 messages without ever telling the receiving process where to put them when they arrive.
This will eventually happen no matter what your message size is. It just happens sooner if your messages are bigger (due to lack of memory).
Upvotes: 2