Greetings,
I am running an application based on the step-40 distributed model.
I would like to perform the operation <v,Au> (vector-matrix-vector
multiplication). At the end of solve () function I have added:
const double
norm=system_matrix.matrix_scalar_product(locally_relevant_solution,locally_relevant_solution);
which works fine if (n_mpi_processes==1).
How can this be done with n_mpi_processes>1?
The (truncated) error message I get is:
[1]PETSC ERROR: --------------------- Error Message
------------------------------------ [0]PETSC ERROR: [1]PETSC ERROR:
Nonconforming object sizes! [1]PETSC ERROR: Mat mat,Vec y: local dim
4160 8450! [1]PETSC ERROR:
------------------------------------------------------------------------
[1]PETSC ERROR: MatMult() line 2083
in /home/tyoung/research.dev/petsc-dev/src/mat/interface/matrix.c
---------------------------------------------------- Exception on
processing: --------------------------------------------------------
An error occurred in line <512> of file
</home/tyoung/research.dev/deal.II/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 The name and call sequence of the exception was:
ExcPETScError(ierr) Additional Information:
An error with error number 60 occurred while calling a PETSc function
--------------------------------------------------------
Confused. I am not sure how to deal with this.
Why is the locally_relevant_solution.size () and
()completely_distributed_solution.size () reported to be twice the size
of the distributed matrix? Are the vectors not distributed?
viz. PETSC ERROR: Mat mat,Vec y: local dim 4160 8450 (on two processes).
Any ideas please?
Best,
Toby
--
Toby D. Young
Assistant Professor Philosophy & Physics
Polish Academy of Sciences
www: http://www.ippt.gov.pl/~tyoung
skype: stenografia
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii