[petsc-dev] Problem Assembling MatCreateAIJ (Parallel Sparse Matrix)

Hesameddin Ilatikhameneh hilatikh at purdue.edu
Thu Jan 3 13:00:24 CST 2013


Hello,

When I try to assemble a parallel sparse matrix (MatCreateAIJ) I get the following error. But when I try to set the parallel matrix in dense format I don't get any error. I used PETSC_DECIDE for number of local elements and number of local nonzeros and PETSC_NULL for nonzeros array in MatCreateAIJ.


[0]PETSC ERROR: [1]PETSC ERROR: VecScatterCreateCommon_PtoS() line 2013 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/vec/vec/utils/vpscat.c
[0]PETSC ERROR: VecScatterCreate_PtoS() line 1807 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/vec/vec/utils/vpscat.c
[0]PETSC ERROR: VecScatterCreate() line 1331 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/vec/vec/utils/vscat.c
[0]PETSC ERROR: MatSetUpMultiply_MPIAIJ() line 150 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/impls/aij/mpi/mmaij.c
[0]PETSC ERROR: MatAssemblyEnd_MPIAIJ() line 702 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/impls/aij/mpi/mpiaij.c
[0]PETSC ERROR: MatAssemblyEnd() line 4879 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/interface/matrix.c
[0]PETSC ERROR: User provided function() line 65 in "unknowndirectory/"/home/Codes/trunk/HSim2/Include/Math/PetscMatrix.h
VecScatterCreateCommon_PtoS() line 2003 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/vec/vec/utils/vpscat.c
[1]PETSC ERROR: VecScatterCreate_PtoS() line 1807 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/vec/vec/utils/vpscat.c
[1]PETSC ERROR: VecScatterCreate() line 1331 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/vec/vec/utils/vscat.c
[1]PETSC ERROR: MatSetUpMultiply_MPIAIJ() line 150 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/impls/aij/mpi/mmaij.c
[1]PETSC ERROR: MatAssemblyEnd_MPIAIJ() line 702 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/impls/aij/mpi/mpiaij.c
[1]PETSC ERROR: MatAssemblyEnd() line 4879 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/interface/matrix.c
[1]PETSC ERROR: User provided function() line 65 in "unknowndirectory/"/home/Codes/trunk/HSim2/Include/Math/PetscMatrix.h
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Operation done in wrong order!
[0]PETSC ERROR: Must call MatAssemblyBegin/End() before viewing matrix!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 5, Sat Dec  1 15:10:41 CST 2012 
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: ./bin_Ubuntu/HSim2 on a linux-gnu named hesam2-VirtualBox by hesam2 Thu Jan  3 13:44:28 2013
[0]PETSC ERROR: Libraries linked from /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/linux-gnu-real/lib
[0]PETSC ERROR: Configure run at Fri Dec 21 08:15:55 2012
[0]PETSC ERROR: Configure options PETSC_DIR=/home/Codes/trunk/Libs/Petsc/PETSC_Build_Real PETSC_ARCH=linux-gnu-real --with-shared-libraries --download-f-blas-lapack=1 --with-single-library=0 --with-shared-libraries --with-debugging=1 --with-scalar-type=real
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: MatView() line 740 in /home/Codes/trunk/Libs/Petsc/PETSC_Build_Real/src/mat/interface/matrix.c

================================================================================


Many Thanks
Hesam



More information about the petsc-dev mailing list