[mpich-discuss] question on correct use of mpi_isend/mpi_irecv
Rob Latham
robl at mcs.anl.gov
Sun Jun 1 19:36:44 CDT 2014
On 05/27/2014 11:15 AM, Grindeanu, Iulian R. wrote:
> Hello,
> We are trying to track down a memory leak, and we are not sure if we are
> using correctly MPI_ISend and MPI_Irecv
compiling mpich with --enable-g=all will report (in a manner not nearly
as refined as valgrind) if you are leaking any MPI resources. Things
like memory, communicators, datatypes, attributes, INFO objects...
==rob
>
> We would like to use non-blocking communication, between pairs of processes.
>
> (it happens during a computation, at every time step; every processor
> has a list of processors it needs to communicate with; what we do not
> know, is the size of the messages, in advance)
>
> Let's assume A needs to send to B
> Because we do not know the size in advance, we send first a fixed size
> message from A to B; this first message has info about how big the total
> message needs to be; A knows it has to send more. When B receives the
> first part, it sends an ack (small size, int 4) to A, acknowledging, and
> also resizing the local buffer, to fill more data; then A sends the rest.
>
> All these sends / receives use Isend and Irecv, and we try to match the
> messages, using proper tags. We use different tags for fixed size, ack,
> and rest of the message.
>
> Before sending the code, I would like to know is what we try is feasible
> and doable?
>
> We notice that the memory use on processor A keeps increasing, when we
> do this in a loop, on the order of about 1000-2000 bytes per iteration.
>
> I think we are matching correctly isends and ireceives, and that our
> buffers are not leaking (we may be wrong)
>
> So again, an iteration is like this:
> A sends a fixed size message to B; B sends back an ack, and when A
> receives it, sends the rest, because B has now the proper buffer to receive.
>
> Next iteration, the size of the message is again unknown, so we do again
> the dance.
>
> Do you have an example like that we can use? Should we use other types
> of sends/receives?
>
> Thanks,
> Iulian
>
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA
More information about the discuss
mailing list