#6 Memory Leak on MPI_Recv



Extending previous Patch #647810, and answering Support
Request #974684, this path will (I hope) fix the memory
leak which when a process executes (for example)

msg, status = mpi.recv(0)

Reference counts for the PyObjects which eventually are
built into the (msg, status) tuple are not properly
decremented. Attached is a simple patch for
pyMPI_util.c and commhelpers.c. I haven't tested it
completely, but mpi.recv() still works and correctly
transmits both large lists and small lists of data, and
the pyMPI processes no longer leak huge amounts of memory.

I hope that you will find this useful and helpful, but
use at your own risk.


  • Ted Carnahan

    Ted Carnahan - 2004-07-09

    Patch for pyMPI_util.c and commhelpers.c

  • Patrick Miller

    Patrick Miller - 2005-02-23
    • assigned_to: nobody --> patmiller
    • status: open --> closed
  • Patrick Miller

    Patrick Miller - 2005-02-23

    Logged In: YES

    Found this independently [I had not been lurking on
    patch and bug lists, so was unaware that it
    had been biting others]. Fixes went up in December 04.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks