Hello Professor,
I have created a test case to show this wierd behaviour (bug ? ). Running with 3 or more processors give this error.
I have used some techniques that I actually learned from you and the other group members to come with a small working example and demonstrate this error.
I created a mesh which is of 64 elements with 4 elements in each X, Y, and Z direction.
Then, I just apply the constraints that every dof on the +z face is constrained to a unique dof on the +z face. No other constraints are applied.
I just try to assemble the system using a random cell_matrix and cell_rhs.
The code gives the error below.
Dofs number correspond to running code with 4 processors.
I think this is a bug because, for this mesh, dof number 225 is coupled to a dof on +z face which in turn is constrained to the unique_dof (374). This means that there is actually a coupling between dofs 225 and 374. But the sparsity pattern object does not allocate space for this new coupling (374, 225).
I am attaching the small working example showing this behavior. Kindly let me know if there is something wrong
that I am doing.
[2]PETSC ERROR: Argument out of range
[2]PETSC ERROR: Inserting a new nonzero at global row/column (374, 225) into matrix
[2]PETSC ERROR: Petsc Release Version 3.6.4, Apr, 12, 2016
[2]PETSC ERROR: ./fdm on a arch-linux2-c-debug named rajat by rajat Mon Apr 17 16:26:23 2017
[2]PETSC ERROR: Configure options --with-shared-libraries=1 --with-x=0 --with-mpi=1 --download-hypre=1 --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-f2cblaslapack --download-mpich --download-mumps --download-scalapack --download-parmetis --download-metis
[2]PETSC ERROR: #1 MatSetValues_MPIAIJ() line 613 in /home/rajat/Documents/Code-Libraries/petsc/petsc-3.6.4/src/mat/impls/aij/mpi/mpiaij.c
[2]PETSC ERROR: #2 MatAssemblyEnd_MPIAIJ() line 731 in /home/rajat/Documents/Code-Libraries/petsc/petsc-3.6.4/src/mat/impls/aij/mpi/mpiaij.c
[2]PETSC ERROR: #3 MatAssemblyEnd() line 5110 in /home/rajat/Documents/Code-Libraries/petsc/petsc-3.6.4/src/mat/interface/matrix.c
terminate called after throwing an instance of 'dealii::PETScWrappers::MatrixBase::ExcPETScError'
what():
--------------------------------------------------------
An error occurred in line <263> of file </home/rajat/Documents/Code-Libraries/deal/dealii8.3/dealii-8.3.0/source/lac/petsc_matrix_base.cc> in function
void dealii::PETScWrappers::MatrixBase::compress(dealii::VectorOperation::values)
The violated condition was:
ierr == 0
The name and call sequence of the exception was:
ExcPETScError(ierr)
Additional Information:
An error with error number 63 occurred while calling a PETSc function
--------------------------------------------------------