On 12 Feb 2009, at 15:53, Reuben D. Budiardja wrote:
Hello,
I am having problem that if a program is compiled with OpenMPI,
Valgrind
doesn't work correctly, i.e: it does not show the memory leak like it
supposed too. The same test program compiled with regular "gfortran"
and run
under Valgrind will show the memory leak.
Not only will Valgrind not show the memory leak but it also won't show
buffer over-runs, as it doesn't understand the allocator it'll assume
all memory handled by the allocator is read/writeable even if it's
redzone or hasn't been allocated.
I search the list archive and found this post here, which exactly
described my
problem:
http://www.open-mpi.org/community/lists/users/2008/07/6058.php,
but I don't understand if there is resolution to it.
It's worth reading the whole of that thread, in particular
http://www.open-mpi.org/community/lists/users/2008/07/6076.php
I am using OpenMPI-1.2.8 with all the default configure option. What
should I
do to be able use Valgrind with program compiled by OpenMPI ?
From memory and reading the above links (i.e. untested advice):
1) Use OpenMPI 1.3 where the default is not to include this.
2) Configure Open MPI 1.2.8 with the --disable-memory-manager option
3) Compile you application without the -lopen-pal otion. In practice
this means running "mpicc --show" and cut-and pasting the underlying
compile line without the -lopen-pal into your application build
procedure. I was able to do this for hello world but I can image it'll
be a real PITA for anything larger.
I'm experimenting with Open MPI and valgrind at this time, if you are
still having problems I may be able to help further.
Ashley,