[petsc-users] valgrind errors.

Matthew Knepley knepley at gmail.com
Mon Jan 18 15:53:22 CST 2010


On Mon, Jan 18, 2010 at 3:32 PM, (Rebecca) Xuefei YUAN
<xy2102 at columbia.edu>wrote:

> Dear Jed,
>
> I got some origins, but I still do not understand what is going on here?
>
> Here is a piece of uninitialised value from
>
> ==9725== Conditional jump or move depends on uninitialised value(s)
> ==9725==    at 0x86EFB20: dnrm2_ (dnrm2.f:46)
> ==9725==    by 0x857ECB1: VecNorm_Seq (bvec2.c:60)
> ==9725==    by 0x8556C5B: VecNormBegin (comb.c:507)
> ==9725==    by 0x80BCE2D: SNESSolve_LS (ls.c:164)
> ==9725==    by 0x809E6E3: SNESSolve (snes.c:2221)
> ==9725==    by 0x80B71E4: DMMGSolveSNES (damgsnes.c:510)
> ==9725==    by 0x80B0A23: DMMGSolve (damg.c:372)
> ==9725==    by 0x8050E41: Solve (twgcqt2unffnidgp.c:580)
> ==9725==    by 0x804DBE0: main (twgcqt2unffnidgp.c:288)
> ==9725==  Uninitialised value was created by a heap allocation
> ==9725==    at 0x4022BF3: malloc (vg_replace_malloc.c:195)
> ==9725==    by 0x8628840: PetscMallocAlign (mal.c:40)
> ==9725==    by 0x862992F: PetscTrMallocDefault (mtr.c:194)
> ==9725==    by 0x8583503: VecCreate_Seq (bvec2.c:809)
> ==9725==    by 0x8569F43: VecSetType (vecreg.c:54)
> ==9725==    by 0x858E01B: VecCreateSeq (vseqcr.c:40)
> ==9725==    by 0x821F345: DACreateLocalVector (dalocal.c:82)
> ==9725==    by 0x825E26C: DMCreateLocalVector (dm.c:115)
> ==9725==    by 0x821F7FF: DMGetLocalVector (dalocal.c:139)
> ==9725==    by 0x8055EBD: FormFunction (twgcqt2unffnidgp.c:1033)
> ==9725==    by 0x80953E8: SNESComputeFunction (snes.c:1016)
> ==9725==    by 0x80BCD06: SNESSolve_LS (ls.c:159)
>
> What would it mean by "Uninitialised value was created by a heap
> allocation"?
>

Heap allocation means calling malloc(). It looks like you get a vector but
do not
set some components.

  Matt


> Thanks a lot!
>
> Rebecca
>
> Quoting Jed Brown <jed at 59A2.org>:
>
>  On Mon, 18 Jan 2010 15:33:21 -0500, "(Rebecca) Xuefei YUAN"  <
>> xy2102 at columbia.edu> wrote:
>>
>>> Dear Jed,
>>>
>>> Thanks for the reply.
>>>
>>> However, there was an error message for this option:
>>>
>>
>> It was introduced in valgrind-3.4.0 (and it's worth upgrading just for
>> this feature).
>>
>> Jed
>>
>>
>>
>
>
> --
> (Rebecca) Xuefei YUAN
> Department of Applied Physics and Applied Mathematics
> Columbia University
> Tel:917-399-8032
> www.columbia.edu/~xy2102 <http://www.columbia.edu/%7Exy2102>
>
>


-- 
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/20100118/033450bf/attachment.htm>


More information about the petsc-users mailing list