[petsc-dev] Valgrind problems

Smith, Barry F. bsmith at mcs.anl.gov
Sun Dec 8 01:11:05 CST 2019



> On Dec 7, 2019, at 6:00 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> Nope, you are right.
> 
>   Thanks,
> 
>     Matt
> 
> On Sat, Dec 7, 2019 at 6:19 PM Balay, Satish <balay at mcs.anl.gov> wrote:
> The fix for this is in 363424266cb675e6465b4c7dcb06a6ff8acf57d2
> 
> Do you have this commit in your branch - and still seeing issues?
> 
> Satish
> 
> On Sat, 7 Dec 2019, Patrick Sanan wrote:
> 
> > I was actually wondering about this, as in some cases valgrind errors appear and sometimes they don't, but I didn't dig into it too deeply.
> > 
> > Here's my workaround, FWIW, which shows some output for that test on master.
> > 
> > I don't see any output when I just run the tests like this:
> > 
> >     VALGRIND=1 make -f gmakefile.test test globsearch="dm_impls_plex_tests-ex1_fluent_2"
> > 
> > But I do see something if I do this to find any non-empty .err files:
> > 
> >     find $PETSC_ARCH/tests -name *.err ! -size 0
> > 
> > And then I see these valgrind warnings after copy-pasting the path:

  This is really bad. Perhaps it is now fixed in master but obviously it crucial that all errors and valgrind errors are always visible in logging, otherwise we drive ourselves nuts chasing ghosts. 

   Barry




> > 
> > 
> > $ cat arch-master-extra-opt/tests/dm/impls/plex/examples/tests/runex1_fluent_2/runex1_fluent_2.err
> > ==4990== Conditional jump or move depends on uninitialised value(s)
> > ==4990==    at 0x4C3705A: rawmemchr (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> > ==4990==    by 0x7687351: _IO_str_init_static_internal (strops.c:41)
> > ==4990==    by 0x767878C: vsscanf (iovsscanf.c:40)
> > ==4990==    by 0x76721A3: sscanf (sscanf.c:32)
> > ==4990==    by 0x588147D: DMPlexCreateFluent_ReadSection (plexfluent.c:105)
> > ==4990==    by 0x5882E3A: DMPlexCreateFluent (plexfluent.c:246)
> > ==4990==    by 0x588492F: DMPlexCreateFluentFromFile (plexfluent.c:30)
> > ==4990==    by 0x577E2B7: DMPlexCreateFromFile (plexcreate.c:3254)
> > ==4990==    by 0x10BEDF: CreateMesh (ex1.c:170)
> > ==4990==    by 0x10A20B: main (ex1.c:430)
> > ==4990==  Uninitialised value was created by a stack allocation
> > ==4990==    at 0x5881313: DMPlexCreateFluent_ReadSection (plexfluent.c:96)
> > ==4990==
> > ==4990== Use of uninitialised value of size 8
> > ==4990==    at 0x766276F: _IO_vfscanf (vfscanf.c:633)
> > ==4990==    by 0x767879C: vsscanf (iovsscanf.c:41)
> > ==4990==    by 0x76721A3: sscanf (sscanf.c:32)
> > ==4990==    by 0x588147D: DMPlexCreateFluent_ReadSection (plexfluent.c:105)
> > ==4990==    by 0x5882E3A: DMPlexCreateFluent (plexfluent.c:246)
> > ==4990==    by 0x588492F: DMPlexCreateFluentFromFile (plexfluent.c:30)
> > ==4990==    by 0x577E2B7: DMPlexCreateFromFile (plexcreate.c:3254)
> > ==4990==    by 0x10BEDF: CreateMesh (ex1.c:170)
> > ==4990==    by 0x10A20B: main (ex1.c:430)
> > ==4990==  Uninitialised value was created by a stack allocation
> > ==4990==    at 0x5881313: DMPlexCreateFluent_ReadSection (plexfluent.c:96)
> > ==4990==
> > ==4990== Conditional jump or move depends on uninitialised value(s)
> > ==4990==    at 0x766277B: _IO_vfscanf (vfscanf.c:630)
> > ==4990==    by 0x767879C: vsscanf (iovsscanf.c:41)
> > ==4990==    by 0x76721A3: sscanf (sscanf.c:32)
> > ==4990==    by 0x588147D: DMPlexCreateFluent_ReadSection (plexfluent.c:105)
> > ==4990==    by 0x5882E3A: DMPlexCreateFluent (plexfluent.c:246)
> > ==4990==    by 0x588492F: DMPlexCreateFluentFromFile (plexfluent.c:30)
> > ==4990==    by 0x577E2B7: DMPlexCreateFromFile (plexcreate.c:3254)
> > ==4990==    by 0x10BEDF: CreateMesh (ex1.c:170)
> > ==4990==    by 0x10A20B: main (ex1.c:430)
> > ==4990==  Uninitialised value was created by a stack allocation
> > ==4990==    at 0x5881313: DMPlexCreateFluent_ReadSection (plexfluent.c:96)
> > ==4990==
> > > Am 07.12.2019 um 21:45 schrieb Matthew Knepley <knepley at gmail.com>:
> > > 
> > > I am trying to clean up valgrind errors. However this one
> > > 
> > >   dm_impls_plex_tests-ex1_fluent_2
> > > 
> > > is valgrind clean on my machine. Does anyone get it to output something?
> > > 
> > >   Thanks,
> > > 
> > >      Matt
> > > 
> > > -- 
> > > 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
> > > 
> > > https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
> > 
> > 
> 
> 
> 
> -- 
> 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
> 
> https://www.cse.buffalo.edu/~knepley/



More information about the petsc-dev mailing list