How to get more information about mallocs during MatSetValues()
Thomas Witkowski
thomas.witkowski at tu-dresden.de
Thu Sep 24 02:26:04 CDT 2009
Hi,
in my FEM code I can determine the number of non zeros per row before
starting petsc's matrix assembling. So, if everything is done correctly,
there should be no mallocs within MatSetValues(). I've created the
matrix using:
MatCreateMPIAIJ(PETSC_COMM_WORLD, nRankRows, nRankRows,
nOverallRows, nOverallRows,
0, d_nnz, 0, o_nnz, &petscMatrix);
But I get the following info output (here just as an example for the
last of the four processes):
[3] MatAssemblyBegin_MPIAIJ(): Stash has 0 entries, uses 0 mallocs.
[3] MatAssemblyEnd_SeqAIJ(): Matrix size: 25119 X 25119; storage space:
420 unneeded,1333557 used
[3] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 72
[3] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 231
[3] Mat_CheckInode(): Found 25119 nodes out of 25119 rows. Not using
Inode routines
[3] PetscCommDuplicate(): Using internal PETSc communicator 14631424
31909600
[3] PetscCommDuplicate(): returning tag 2147483645
[3] PetscCommDuplicate(): returning tag 2147483628
[3] PetscCommDuplicate(): Using internal PETSc communicator 14631424
31909600
[3] PetscCommDuplicate(): returning tag 2147483644
[3] PetscCommDuplicate(): returning tag 2147483627
[3] PetscCommDuplicate(): returning tag 2147483622
[3] MatAssemblyEnd_SeqAIJ(): Matrix size: 25119 X 3510; storage space:
47 unneeded,22453 used
[3] MatAssemblyEnd_SeqAIJ(): Number of mallocs during MatSetValues() is 0
[3] MatAssemblyEnd_SeqAIJ(): Maximum nonzeros in any row is 161
Is there an easy way to find out, why Petsc must do some mallocs?
Thomas
More information about the petsc-users
mailing list