Do you have a test example? --Junchao Zhang On Tue, Jan 14, 2020 at 4:44 AM Y. Shidi <ys...@cam.ac.uk<mailto:ys...@cam.ac.uk>> wrote: Dear developers,
I have a 2x2 nested matrix and the corresponding nested vector. When I running the code with field splitting, it gets the following errors: [0]PETSC ERROR: PetscTrFreeDefault() called from VecRestoreArray_Nest() line 678 in /home/ys453/Sources/petsc/src/vec/vec/impls/nest/vecnest.c [0]PETSC ERROR: Block at address 0x3f95f60 is corrupted; cannot free; may be block not allocated with PetscMalloc() [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Memory corruption: http://www.mcs.anl.gov/petsc/documentation/installation.html#valgrind [0]PETSC ERROR: Bad location or corrupted memory [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.9.3, unknown [0]PETSC ERROR: 2DPetscSpuriousTest on a arch-linux2-c-debug named merlin by ys453 Tue Jan 14 10:36:53 2020 [0]PETSC ERROR: Configure options --download-scalapack --download-mumps --download-parmetis --download-metis --download-ptscotch --download-superlu_dist --download-hypre [0]PETSC ERROR: #1 PetscTrFreeDefault() line 269 in /home/ys453/Sources/petsc/src/sys/memory/mtr.c [0]PETSC ERROR: #2 VecRestoreArray_Nest() line 678 in /home/ys453/Sources/petsc/src/vec/vec/impls/nest/vecnest.c [0]PETSC ERROR: #3 VecRestoreArrayRead() line 1835 in /home/ys453/Sources/petsc/src/vec/vec/interface/rvector.c [0]PETSC ERROR: #4 VecRestoreArrayPair() line 511 in /home/ys453/Sources/petsc/include/petscvec.h [0]PETSC ERROR: #5 VecScatterBegin_SSToSS() line 671 in /home/ys453/Sources/petsc/src/vec/vscat/impls/vscat.c [0]PETSC ERROR: #6 VecScatterBegin() line 1779 in /home/ys453/Sources/petsc/src/vec/vscat/impls/vscat.c [0]PETSC ERROR: #7 PCApply_FieldSplit() line 1010 in /home/ys453/Sources/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c [0]PETSC ERROR: #8 PCApply() line 457 in /home/ys453/Sources/petsc/src/ksp/pc/interface/precon.c [0]PETSC ERROR: #9 KSP_PCApply() line 276 in /home/ys453/Sources/petsc/include/petsc/private/kspimpl.h [0]PETSC ERROR: #10 KSPFGMRESCycle() line 166 in /home/ys453/Sources/petsc/src/ksp/ksp/impls/gmres/fgmres/fgmres.c [0]PETSC ERROR: #11 KSPSolve_FGMRES() line 291 in /home/ys453/Sources/petsc/src/ksp/ksp/impls/gmres/fgmres/fgmres.c [0]PETSC ERROR: #12 KSPSolve() line 669 in /home/ys453/Sources/petsc/src/ksp/ksp/interface/itfunc.c I am not sure why it happens. Thank you for your time. Kind Regards, Shidi