Re: [Pympi-users] pyMPI 2.4 beta 2 available..../the problem of the extra stdout output
Status: Alpha
Brought to you by:
patmiller
From: <tha...@bi...> - 2005-07-29 11:54:43
|
> I haven't verified the leak status though I did plug some holes > in the 2.4b1 release. Is there a mocapy run that illustrates the > problem? I could use it in the release test suite then. The problem arises when using scatter with large lists. Long running jobs crash because the slave nodes run out of memory due to a memory leak. The following script for example quickly eats memory: --- import mpi while 1: a=None if mpi.rank==0: a=range(0,1000000) b=mpi.scatter(a) --- The problem is due to a line in pyMPI_send.c. For long messages, buffer2 needs to be cleaned up by calling pyMPI_message_free. But buffer2 is erroneoulsy set to 0 right before calling pyMPI_message_free, so the memory is not free'd. Removing the "buffer2 = 0" line gets rid of the leak. Here's the offending piece of code: --- if ( buffer1.bytes_in_second_message ) { MPICHECK( self->communicator, MPI_Send(buffer2, buffer1.bytes_in_second_message, MPI_BYTE,destination,tag, self->communicator) ); buffer2 = 0; /* ERROR (?) */ } pyMPI_message_free(&buffer1,&buffer2); --- Best regards, -Thomas |