Dear all, Thanks very much for kind replies.
I get a better idea where to look into when debugging. Cheers, Rebecca Quoting Barry Smith <bsmith at mcs.anl.gov>: > > When using valgrind it is best to use the additional PETSc option > -malloc off this turns off PETSc's malloc tracking and usually makes > the problem code clearer. > > I am updating the troubleshooting.html guide to indicate this. > > Barry > > On Jan 18, 2010, at 3:32 PM, (Rebecca) Xuefei YUAN 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"? >> >> 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 >> -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 k
