[petsc-users] Debugging with valgrind
Medane TCHAKOROM
medane.tchakorom at univ-fcomte.fr
Tue Feb 8 12:08:06 CST 2022
Hello ,
I have been debugging my code with valgrind, and found many memory
leakage that i removed so far.
But i keep having the type of lines in my logs
--------------------
==26817== 384 bytes in 1 blocks are still reachable in loss record 1,107
of 1,151
==26817== at 0x483877F: malloc (vg_replace_malloc.c:307)
==26817== by 0x67BC429: MPIR_T_CVAR_REGISTER_impl (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libmpi.so.12.1.8)
==26817== by 0x66D6B41: MPIR_T_cvar_init (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libmpi.so.12.1.8)
==26817== by 0x65D61F2: MPIR_T_cvar_env_init (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libmpi.so.12.1.8)
==26817== by 0x65D62AE: MPIR_T_env_init (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libmpi.so.12.1.8)
==26817== by 0x655D059: PMPI_Init_thread (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libmpi.so.12.1.8)
==26817== by 0x49BB19D: PetscInitialize (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libpetsc.so.3.14.2)
==26817== by 0x10B65E: main (in
/home/mtchakorom/petsc-3.14.2/src/ksp/ksp/tutorials/code_multisplitting_async)
----------
and this
------------------------
65,536 bytes in 1 blocks are definitely lost in loss record 1,149 of 1,151
==26817== at 0x48386AF: malloc (vg_replace_malloc.c:306)
==26817== by 0x483ADE7: realloc (vg_replace_malloc.c:834)
==26817== by 0x87B284F: ???
==26817== by 0x87B9DF3: ???
==26817== by 0x8790778: ???
==26817== by 0x8796B87: ???
==26817== by 0x873C3E7: ???
==26817== by 0x76F66A2: ??? (in
/usr/local/cuda-11.2/targets/x86_64-linux/lib/libOpenCL.so.1.0.0)
==26817== by 0x76F88CB: ??? (in
/usr/local/cuda-11.2/targets/x86_64-linux/lib/libOpenCL.so.1.0.0)
==26817== by 0x72AF34E: __pthread_once_slow (pthread_once.c:116)
==26817== by 0x76F6C70: clGetPlatformIDs (in
/usr/local/cuda-11.2/targets/x86_64-linux/lib/libOpenCL.so.1.0.0)
==26817== by 0x67F4409: hwloc_opencl_discover (in
/home/mtchakorom/petsc-3.14.2/linux-gnu-debug/lib/libmpi.so.12.1.8)
--------
Should i consider this as normal output for valgrind on a petsc program ?
Thanks
More information about the petsc-users
mailing list