[petsc-dev] bug in MatPtAPNumeric_SeqAIJ_SeqAIJ_SparseAxpy

Stefano Zampini stefano.zampini at gmail.com
Mon Sep 26 02:31:19 CDT 2016


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/4073ccf9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex94.c
Type: text/x-csrc
Size: 16940 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160926/4073ccf9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pmat.info
Type: application/octet-stream
Size: 21 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160926/4073ccf9/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pmat
Type: application/octet-stream
Size: 196 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160926/4073ccf9/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Amat.info
Type: application/octet-stream
Size: 21 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160926/4073ccf9/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Amat
Type: application/octet-stream
Size: 928 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160926/4073ccf9/attachment-0003.obj>


More information about the petsc-dev mailing list