#24 Memory leak

closed-fixed
None
9
2005-08-08
2005-05-04
No

Hi,

The following little script runs until it crashes
because the memory
runs out, so it seems that there are some serious
memory leaks. (version 2.1b4, running on a cluster of
PCs running Debian Linux).

import mpi

while 1:
if mpi.rank==0:
l=range(0,1000)
else:
l=[]
local=mpi.scatter(l)

I'll see if I can fix the problem.
Probably just a matter of some missing DECREFs, I guess?

Best regards,

-Thomas

Discussion

  • Thomas Hamelryck

    • priority: 5 --> 9
     
  • Thomas Hamelryck

    Logged In: YES
    user_id=1118850

    Since I could not find any obvious DECREF/INCREF errors, I
    used Valgrind to look for memory leaks.

    The problem is due to the fact that buffer2 (which is used
    to send long messages) is not always cleaned up. This is because
    it is sometimes erroneously set to 0, before it is cleaned up.

    The problem is line 56 in pyMPI_send.c:

    buffer2 = 0;

    Uncommenting this line solves the memory leak.

    Cheers & Lots of thanks to the pyMPI developers for a
    fantastic tool!

    -Thomas

     
  • Patrick Miller

    Patrick Miller - 2005-05-12
    • assigned_to: nobody --> patmiller
     
  • Patrick Miller

    Patrick Miller - 2005-05-12

    Logged In: YES
    user_id=30074

    I'll go apply that fix! Thanks!

    Pat

     
  • Patrick Miller

    Patrick Miller - 2005-08-08
    • status: open --> closed-fixed
     
  • Patrick Miller

    Patrick Miller - 2005-08-08

    Logged In: YES
    user_id=30074

    Actually found a few more places that were potential
    leakers. This is fixed in 2.4b3

     

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

Sign up for the SourceForge newsletter:





No, thanks