[petsc-users] Valgrind and uninitialized values

Matthew Knepley knepley at gmail.com
Thu Feb 2 23:25:06 CST 2012


On Thu, Feb 2, 2012 at 11:20 PM, Max Rudolph <rudolph at berkeley.edu> wrote:

> I am trying to track down a memory corruption bug using valgrind, but I am
> having to wade through lots and lots of error messages similar to this one,
> which I believe are either spurious or related to some problem in Petsc and
> not in my code (please correct me if I'm wrong!)
>

Are you using ---download-mpich? It should be valgrind clean. These are a
pain, but you can make a supressions
file as well.

   Matt


> ==18162== Conditional jump or move depends on uninitialised value(s)
> ==18162==    at 0x7258D73: MPIDI_CH3U_Handle_recv_req
> (ch3u_handle_recv_req.c:99)
> ==18162==    by 0x724F2E1: MPIDI_CH3I_SMP_read_progress
> (ch3_smp_progress.c:656)
> ==18162==    by 0x72462D4: MPIDI_CH3I_Progress (ch3_progress.c:185)
> ==18162==    by 0x72AC52B: MPIC_Wait (helper_fns.c:518)
> ==18162==    by 0x72AC314: MPIC_Sendrecv (helper_fns.c:163)
> ==18162==    by 0x7218E18: MPIR_Allgather_OSU (allgather_osu.c:524)
> ==18162==    by 0x7217099: PMPI_Allgather (allgather.c:840)
> ==18162==    by 0x649FFD: PetscLayoutSetUp (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x631C32: VecCreate_MPI_Private (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x63253E: VecCreate_MPI (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x5E3279: VecSetType (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x6329CC: VecCreate_Standard (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x5E3279: VecSetType (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x93BFE7: DMCreateGlobalVector_DA (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x8C7F68: DMCreateGlobalVector (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x93B6DA: VecDuplicate_MPI_DA (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x5CF419: VecDuplicate (in
> /work/01038/max/gk_0.1mm/gk_conv_50_vg/iso-convect-p)
> ==18162==    by 0x438F04: initializeNodalFields (nodalFields.c:35)
> ==18162==    by 0x434730: main (main_isotropic_convection.c:123)
>
> The relevant line of code is:
> 33:  ierr = DMCreateGlobalVector(grid->da, &nodalFields->lastT);
> CHKERRQ(ierr);
> 34:  ierr = PetscObjectSetName((PetscObject) nodalFields->lastT,
> "lastT");CHKERRQ(ierr);
> 35:  ierr = VecDuplicate( nodalFields->lastT,
> &nodalFields->thisT);CHKERRQ(ierr);
>
> I am using icc with petsc-3.2 on the Intel Westmere cluster at TACC. Petsc
> was compiled with debugging enabled. Thanks for your help.
>
> Max




-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120202/42c6bc0b/attachment.htm>


More information about the petsc-users mailing list