Dear all, 

I am getting a PETSc error when trying to multiply a sparse matrix by a 
vector and am not sure how to get around it. I initialize my 2x284 
PETScWrappers::MPI::SparseMatrix like this: 
      m_myocardial_dof_volume_matrix.reinit(
        i_myocardial_dof_handler.locally_owned_dofs(),
        i_network_dof_handler.locally_owned_dofs(),
        m_dynamic_sparsity_pattern,
        m_comm);
its entries are:
(1,123) 0.00155383
(1,125) 0.000841909
(1,129) 0.00125203

then, I create a vector of ones and try to multiple the matrix by such 
vector:
 PETScWrappers::MPI::Vector ones(
        i_myocardial_dof_handler.locally_owned_dofs(), m_comm);
      ones = 1;
      ones.compress(VectorOperation::insert);
      PETScWrappers::MPI::Vector temp(
        i_network_dof_handler.locally_owned_dofs(), m_comm);
      m_myocardial_dof_volume_matrix.vmult(temp, ones);

This is the error I get:
[0]PETSC ERROR: --------------------- Error Message 
--------------------------------------------------------------
[0]PETSC ERROR: Corrupted Petsc object
[0]PETSC ERROR: Missing Inode Structure
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
[0]PETSC ERROR: ./Coupling1DTo3D on a linux-debug named LAPTOP-B3AHATNL by 
labdala Fri Dec 22 17:51:49 2023
[0]PETSC ERROR: Configure options --with-mpicc=/usr/bin/mpicc 
--with-mpicxx=/usr/bin/mpicxx --with-mpifc=/usr/bin/mpif90 
--with-debugging=1 --download-hypre=1 --download-mumps=1 
--download-scalapack=1 --download-blacs=1 --download-hdf5=1 --with-x=0 
--download-fblaslapack=1
[0]PETSC ERROR: #1 MatMult_SeqAIJ_Inode() line 383 in 
/home/labdala/sfw/petsc/3.13.2/src/mat/impls/aij/seq/inode.c
[0]PETSC ERROR: #2 MatMult() line 2401 in 
/home/labdala/sfw/petsc/3.13.2/src/mat/interface/matrix.c
terminate called after throwing an instance of 
'dealii::LACExceptions::ExcPETScError'
  what():
--------------------------------------------------------
An error occurred in line <526> of file 
</home/labdala/sfw/dealii/dealii-9.5.1/source/lac/petsc_matrix_base.cc> in 
function
    void 
dealii::PETScWrappers::MatrixBase::vmult(dealii::PETScWrappers::VectorBase&, 
const dealii::PETScWrappers::VectorBase&) const
The violated condition was:
    ierr == 0
Additional information:
    deal.II encountered an error while calling a PETSc function.
    The description of the error provided by PETSc is "Corrupted Petsc
    object".
    The numerical value of the original error code is 74.

I think this is related to the fact that the first row of the matrix does 
not have any nonzero entries. Is that it? Either way, any suggestions on 
how to go about this issue would be very helpful. 

Thank you, 
Laryssa

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e029436f-478b-496d-9dca-229321f98d2dn%40googlegroups.com.

Reply via email to