Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] MPI Blocking Routines and Memory Leaks
From: Simon Köstlin (kiyu0.83_at_[hidden])
Date: 2009-03-25 12:55:01


I'm new to MPI and I've got a question about blocking routines like the
Send-, Wait-Function and so on. I wrote a parallel program that uses the
blocking Send and the Nonblocking Isend function. Now my question: If I'm
sending something with the blocking Send function it should block the
process until the other process received the message. I think that works so
far. But I'm also sending a message to the process itself and my programm
doesn't block. So does MPI not block if I'm sending a message to the same
process from which I'm sending the message and it is a blocking routine? The
same happens if I'm sending with a non-blocking Isend and do a
request.Wait() on the send request after each send operation. So it doesn't
block if I'm sending the message to itself. I'm wondering about that because
the Recv function will occur only after all messages have been sent. It's ok
that it works, because I need to send a message to the process itself for
simplicity. I'm only wondering why this works.

Another question I have is about a memory leak. I got a heavy memory leak if
I did not a request.Wait() on the send request before the Isend function and
didn't wait until the last Isend operation completed. But all messages were
arrived if I do the request.Wait() or not. Now I'm doing a request.Wait()
before each Isend function and my memory isn't increasing much, but still a
bit. Do I have to do something else on the blocking Send function? And is
there a function in MPI to clean up its buffers in a running application
without using the Finalize function.

Thank you for your help so far.