On 14 July 2017 at 10:39, <
a.ge...@gmail.com> wrote:
>
> Is there a maximum message size for pickled mpi messages? I found no other
> problem, since the rest of the setup ist the same, only the amount of data
> increases.
>
You are likely using "irecv()". Unfortunately, there is no way to
issue an "irecv()" call and determine the size of the incoming
message. This is an MPI limitation, but also a feature, as you can
post an "irecv()" at a point in time were the matching send operation
has not yet being issued. In an attempt to support "irecv()" for
pickled streams, mpi4py allocates a buffer of 32768 bytes to receive
the message. This is obviously not enough for your messages, so the
default buf size leads to truncated messages in your case. There are
three ways to "fix" this problem:
1) Avoid using "irecv()", maybe you can refactor your code to use
"iprobe()" and "recv()", though that is not thread-safe.
2) Issue plain "recv()" in a separate thread, mpi4py releases the GIL
and things will just work. Of course, you need an MPI implementation
with proper support for MPI_THREAD_MULTIPLE.
3) Use a larger buffer size by passing an integer as first argument,
i.e, use "request = comm.irecv(131072, source, tag)". This is likely
the easiest approach, but with a few downsides: you allocate too many
memory pages if the message size is small, or the buffer may still not
be enough if your messages ever grow larger than your guess.
--
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa
Office Phone:
+966 12 808-0459