Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] Valgrind Functionality
From: Tom Riddle (rarebitusa_at_[hidden])
Date: 2008-07-07 22:09:26


Hi,

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.

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.

[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
==17839==
==17823== Memcheck, a memory error detector.
==17823== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==17823== Using LibVEX rev 1658, a library for dynamic binary translation.
==17823== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==17823== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==17823== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==17823== For more details, rerun with: -v
==17823==
==17839== Syscall param write(buf) points to uninitialised byte(s)
==17839==    at 0x3DD8C0CAA0: __write_nocancel (in /lib64/libpthread-2.5.so)
==17839==    by 0x7C283E8: ipath_userinit (ipath_proto.c:191)
==17839==    by 0x7AFCDF4: psmi_port_open (psm_port.c:116)
==17839==    by 0x7AFE1FB: psm_ep_open (psm_ep.c:535)
==17839==    by 0x78E842C: ompi_mtl_psm_module_init (mtl_psm.c:108)
==17839==    by 0x78E9137: ompi_mtl_psm_component_init (mtl_psm_component.c:125)
==17839==    by 0x4CE32D4: ompi_mtl_base_select (mtl_base_component.c:105)
==17839==    by 0x76D9EDE: mca_pml_cm_component_init (pml_cm_component.c:145)
==17839==    by 0x4CE7425: mca_pml_base_select (pml_base_select.c:122)
==17839==    by 0x4C50ED2: ompi_mpi_init (ompi_mpi_init.c:398)
==17839==    by 0x4C93EE4: PMPI_Init (pinit.c:88)
==17839==    by 0x400D78: main (in /home/tomr/osu_latency1)
==17839==  Address 0x7FEFFE9D4 is on thread 1's stack
==17839==
==17823==
==17823== Syscall param sched_setaffinity(mask) points to uninitialised byte(s)
==17823==    at 0x3EA36B8AD0: sched_setaffinity@@GLIBC_2.3.4 (in /lib64/libc-2.5.so)
==17823==    by 0x7C2775E: ipath_setaffinity (ipath_proto.c:160)
==17823==    by 0x7C28400: ipath_userinit (ipath_proto.c:198)
==17823==    by 0x7AFCDF4: psmi_port_open (psm_port.c:116)
==17823==    by 0x7AFE1FB: psm_ep_open (psm_ep.c:535)
==17823==    by 0x78E842C: ompi_mtl_psm_module_init (mtl_psm.c:108)
==17823==    by 0x78E9137: ompi_mtl_psm_component_init (mtl_psm_component.c:125)
==17823==    by 0x4CE32D4: ompi_mtl_base_select (mtl_base_component.c:105)
==17823==    by 0x76D9EDE: mca_pml_cm_component_init (pml_cm_component.c:145)
==17823==    by 0x4CE7425: mca_pml_base_select (pml_base_select.c:122)
==17823==    by 0x4C50ED2: ompi_mpi_init (ompi_mpi_init.c:398)
==17823==    by 0x4C93EE4: PMPI_Init (pinit.c:88)
==17823==  Address 0x7FEFFEC30 is on thread 1's stack
==17823==
# OSU MPI Latency Test v3.0
# Size            Latency (us)
384                      61.78
==17839==
==17839== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 5 from 1)
==17839== malloc/free: in use at exit: 0 bytes in 0 blocks.
==17839== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==17839== For counts of detected errors, rerun with: -v
==17839== All heap blocks were freed -- no leaks are possible.
==17823==
==17823== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 5 from 1)
==17823== malloc/free: in use at exit: 0 bytes in 0 blocks.
==17823== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==17823== For counts of detected errors, rerun with: -v
==17823== All heap blocks were freed -- no leaks are possible.

Hopefully this was enough info to garner a bit of input, Thanks in advance. Tom