[petsc-dev] bug in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy

Hong hzhang at mcs.anl.gov
Mon Sep 26 14:59:01 CDT 2016


Stefano:
The bug is fixed on branch hzhang/fix-ptap-seqaij
https://bitbucket.org/petsc/petsc/commits/4bcca364924c81402b2f7ad375877c5546b7966b

Satish,
Can you help merge this branch to next for testing?

Hong

I have found a bug in  MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy.
> Attached is a MWE (using a modified version of mat/examples/tests/ex94.c)
> to reproduce it.
>
> As far as I can tell, the symbolic step computes an rmax for C equal to 4.
> Instead, the numerical step tries to write 1+rmax at apj in that function.
> Don't know what would be the proper fix.
>
>
> [szampini at KW14141 tests]$ ./ex94 -f0 Amat -f1 Amat -Pmat Pmat
> [0]PETSC ERROR: PetscTrFreeDefault() called from
> MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy() line 270 in
> /home/szampini/Sources/petsc/src/mat/impls/aij/seq/matptap.c
> [0]PETSC ERROR: Block [id=0(16)] at address 0x22399e0 is corrupted
> (probably write past end of array)
> [0]PETSC ERROR: Block allocated in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy()
> line 208 in /home/szampini/Sources/petsc/src/mat/impls/aij/seq/matptap.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.2-1249-ga13144f  GIT
> Date: 2016-08-25 12:12:30 +0300
> [0]PETSC ERROR: ./ex94 on a debug named KW14141 by szampini Mon Sep 26
> 10:25:06 2016
> [0]PETSC ERROR: Configure options --download-c2html --download-ctetgen
> --download-exodusii --download-hdf5 --download-hypre --download-metis
> --download-ml --download-mumps --download-netcdf --download-p4est
> --download-parmetis --download-pastix --download-ptscotch
> --download-scalapack --download-suitesparse --download-triangle
> --with-debugging=1 PETSC_ARCH=debug
> [0]PETSC ERROR: #1 PetscTrFreeDefault() line 298 in
> /home/szampini/Sources/petsc/src/sys/memory/mtr.c
> [0]PETSC ERROR: #2 MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy() line 270 in
> /home/szampini/Sources/petsc/src/mat/impls/aij/seq/matptap.c
> [0]PETSC ERROR: #3 MatPtAP_SeqAIJ_SeqAIJ() line 42 in
> /home/szampini/Sources/petsc/src/mat/impls/aij/seq/matptap.c
> [0]PETSC ERROR: #4 MatPtAP() line 9257 in /home/szampini/Sources/petsc/
> src/mat/interface/matrix.c
> [0]PETSC ERROR: #5 main() line 259 in /home/szampini/Sources/petsc/
> src/mat/examples/tests/ex94.c
> [0]PETSC ERROR: PETSc Option Table entries:
> [0]PETSC ERROR: -f0 Amat
> [0]PETSC ERROR: -f1 Amat
> [0]PETSC ERROR: -matload_block_size 1
> [0]PETSC ERROR: -Pmat Pmat
> [0]PETSC ERROR: ----------------End of Error Message -------send entire
> error message to petsc-maint at mcs.anl.gov----------
> application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
>
>
>
>
> --
> Stefano
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160926/7be46b15/attachment.html>


More information about the petsc-dev mailing list