PETScWrappers::MPI::SparseMatrix vmult error

38 views
Skip to first unread message

Laryssa Abdala

unread,
Dec 22, 2023, 6:11:15 PM12/22/23
to deal.II User Group
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

Wolfgang Bangerth

unread,
Dec 23, 2023, 10:50:09 PM12/23/23
to dea...@googlegroups.com
On 12/22/23 16:11, Laryssa Abdala wrote:
>
>
> I think this is related to the fact that the first row of the matrix does not
> have any nonzero entries. Is that it?

Laryssa:
It's hard to tell. The approach to debugging these sorts of questions is to
create a small program that sets up the matrix the same way you do, performs
the vmult, and does nothing else -- in other words, we need a minimal
reproducing example. We'd be happy to take a look at what's going on if we had
such a small test case.

Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages