We cannot see the error message. Use CHKERRXX Matt On Jan 3, 2013 1:11 PM, "Hesameddin Ilatikhameneh" <hilatikh at purdue.edu> wrote:
> The point is the problem occurs when I'm assembling the matrix and since > it is unsuccessful MatView gives error. > I assemble the matrix: > > this->Petsc_Error = > MatAssemblyBegin(*(this->Petsc_Mat),MAT_FINAL_ASSEMBLY); > this->Check_Petsc_Error(); > this->Petsc_Error = > MatAssemblyEnd(*(this->Petsc_Mat),MAT_FINAL_ASSEMBLY); > this->Check_Petsc_Error(); > > Thanks > Hesam > ----- Original Message ----- > From: "Jed Brown" <jedbrown at mcs.anl.gov> > To: "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov > > > Cc: "petsc-maint" <petsc-maint at mcs.anl.gov> > Sent: Thursday, January 3, 2013 2:07:40 PM > Subject: Re: [petsc-dev] Problem Assembling MatCreateAIJ (Parallel Sparse > Matrix) > > > > You have to assemble the matrix, just like the error message says. > On Jan 3, 2013 1:00 PM, "Hesameddin Ilatikhameneh" < hilatikh at purdue.edu> > wrote: > > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130103/8b4282a1/attachment-0001.html>
