Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Valgrind Functionality
From: Tom Riddle (rarebitusa_at_[hidden])
Date: 2008-07-08 21:01:21


Thanks Ashley, after going through your suggestions we tried our test with valgrind 3.3.0 and with glibc-devel-2.5-18.el5_1.1, both exhibit the same results. A simple non-MPI test prog however returns expected responses, so valgrind itself look ok. We then checked that the same (shared) libc gets linked in both the MPI and non-MPI cases, adding -pthread to the cc command line yields the same result, the only difference it appears is the open mpi libraries.

Now mpicc links against libopen-pal which defines malloc for it's own purposes. The big difference seems to be that libopen-pal.so is providing its own malloc replacement

Is there perhaps something I have missed in runtime? I have included the ompi_info just in case. Thanks in advance. Tom

--- On Tue, 7/8/08, Ashley Pittman <apittman_at_[hidden]> wrote:
From: Ashley Pittman <apittman_at_[hidden]>
Subject: Re: [OMPI users] Valgrind Functionality
To: rarebitusa_at_[hidden], "Open MPI Users" <users_at_[hidden]>
Date: Tuesday, July 8, 2008, 2:05 AM

On Mon, 2008-07-07 at 19:09 -0700, Tom Riddle wrote:
>
> I was attempting to get valgrind working with a simple MPI app
> (osu_latency) on OpenMPI. While it appears to report uninitialized
> values it fails to report any mallocs or frees that have been
> conducted.

The normal reason for this is either using static applications or having
a very stripped glibc. It doesn't appear you've done the former as you
are linking in libpthread but the latter is a possibility, you might
benefit from installing the glibc-devel package. I don't recalled RHEL
being the worst offenders at stripping libc however.

> I am using RHEL 5, gcc 4.2.3 and a drop from the repo labeled
> openmpi-1.3a1r18303. configured with
>
> $ ../configure --prefix=/opt/wkspace/openmpi-1.3a1r18303 CC=gcc
> CXX=g++ --disable-mpi-f77 --enable-debug --enable-memchecker
> --with-psm=/usr/include --with-valgrind=/opt/wkspace/valgrind-3.3.0/

> As the FAQ's suggest I am running a later version of valgrind,
> enabling the memchecker and debug. I tested a slightly modified
> osu_latency test which has a simple char buffer malloc and free but
> the valgrind summary shows no malloc/free activity whatsoever. This is
> running on a dual node system using Infinipath HCAs. Here is a
> trimmed output.

Although you configured openmpi with what appears to be valgrind 3.3.0
the version of valgrind you are using is 3.2.1, perhaps you want to
specify the full path of valgrind on the mpirun command line?

> [tom_at_lab01 ~]$ mpirun --mca pml cm -np 2 --hostfile my_hostfile
> valgrind ./osu_latency1
> ==17839== Memcheck, a memory error detector.
> ==17839== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et
> al.
> ==17839== Using LibVEX rev 1658, a library for dynamic binary
> translation.
> ==17839== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
> ==17839== Using valgrind-3.2.1, a dynamic binary instrumentation
> framework.
> ==17839== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et
> al.
> ==17839== For more details, rerun with: -v

Ashley Pittman.