[petsc-dev] using valgrind with new test harness

Barry Smith bsmith at mcs.anl.gov
Tue Feb 7 17:42:20 CST 2017


> On Feb 7, 2017, at 5:34 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> We cannot override stuff via env variables in the new test harness. For nightlybuilds
> I added support to check if PETSC_ARCH has 'valgrind' string in it - and if so - use
> valgrind.
> 
> 26646c0bcc29652ef239540b066d00d1c8fc99c7
> 
> Perhaps we can force this to use valgrind with:
> 
> ./config/gmakegentest.py --valgrind=1

  I can't decide at the time I run the tests, but need to decide when I do the gmakegentest.py
> 
> Ok - perhaps the attached patch.

   That is one heck of a patch, talk about code duplication resulting in endless bugs.

> But then - sometimes gmakefile runs ./config/gmakegentest.py directly [without valgrind]

  Fix it properly somehow; currently it is impossible and that is insanely horrible.

> 
> Satish
> 
> -------
> 
> 
> On Tue, 7 Feb 2017, Barry Smith wrote:
> 
>> 
>> Both 
>> 
>> make -f gmakefile test MPIEXEC="/sandbox/bsmith/petsc/bin/petscmpiexec -valgrind " 
>> 
>> and
>> 
>> MPIEXEC="/sandbox/bsmith/petsc/bin/petscmpiexec -valgrind " make -f gmakefile test 
>> 
>> do not appear to use valgrind in the test harness (the old system did).
>> 
>> How do I run all tests under valgrind automatically?
>> 
>> 
>> 
>> 
>> not ok dm_impls_plex_tests-ex18_1
>> #       [0]PETSC ERROR: PetscTrFreeDefault() called from VecDestroy_MPI() line 18 in /sandbox/bsmith/petsc/src/vec\
>> /vec/impls/mpi/pdvec.c
>> #       [0]PETSC ERROR: Block [id=0(32)] at address 0xb54240 is corrupted (probably write past end of array)
>> #       [0]PETSC ERROR: Block allocated in VecCreate_MPI_Private() line 497 in /sandbox/bsmith/petsc/src/vec/vec/i\
>> mpls/mpi/pbvec.c
>> #       [0]PETSC ERROR: --------------------- Error Message ------------------------------------------------------\
>> --------
>> #       [0]PETSC ERROR: Memory corruption: http://www.mcs.anl.gov/petsc/documentation/installation.html#valgrind
>> #       [0]PETSC ERROR: Corrupted memory
>> #       [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
>> #       [0]PETSC ERROR: Petsc Development GIT revision: v3.7.5-3057-g2d11e0f  GIT Date: 2017-02-07 15:39:04 -0600
>> #       [0]PETSC ERROR: ../ex18 on a arch-single named es by bsmith Tue Feb  7 15:46:25 2017
>> #       [0]PETSC ERROR: Configure options --download-ctetgen --download-exodusii --download-hdf5 --download-mpich \
>> --download-netcdf PETSC_ARCH=arch-single --with-precision=single
>> #       [0]PETSC ERROR: #1 PetscTrFreeDefault() line 287 in /sandbox/bsmith/petsc/src/sys/memory/mtr.c
>> #       [0]PETSC ERROR: #2 VecDestroy_MPI() line 18 in /sandbox/bsmith/petsc/src/vec/vec/impls/mpi/pdvec.c
>> #       [0]PETSC ERROR: #3 VecDestroy() line 406 in /sandbox/bsmith/petsc/src/vec/vec/interface/vector.c
>> #       [0]PETSC ERROR: #4 DMDestroy() line 681 in /sandbox/bsmith/petsc/src/dm/interface/dm.c
>> #       [0]PETSC ERROR: #5 main() line 473 in /sandbox/bsmith/petsc/src/dm/impls/plex/examples/tests/ex18.c
>> #       [0]PETSC ERROR: PETSc Option Table entries:
>> #       [0]PETSC ERROR: -dm_view ascii::ascii_info_detail
>> #       [0]PETSC ERROR: -interpolate
>> 
>> 
>> 
> <val.patch>




More information about the petsc-dev mailing list