[petsc-dev] Viewing MPI matrices

Dmitry Karpeev karpeev at mcs.anl.gov
Wed Jun 6 17:18:42 CDT 2012


When viewing a MATMPIAIJ on a communicator of size>1, one can see something
like this (in an ASCII viewer):
Matrix Object: 1 MPI processes
  type: mpiaij
row 0: (0, -8.32667e-17 + 0.4 i) (1, -1)  (2, -1)
row 1: (0, -1)  (1, -8.32667e-17 + 0.4 i) (3, -1)  (8, -1)
row 2: (0, -1)  (2, -8.32667e-17 + 0.4 i) (3, -1)  (4, -1)

That may be a bit confusing, since the matrix one is trying to view has
more than 1 ranks.
This is, of course, the result of the way MatView is implemented: pull the
distributed matrix into an MPIAIJ
that lives on a communicator of size 1 containing the rank 0 of the
original comm, then view that auxiliary matrix.
Should we try to print the original comm size here, instead of "1 MPI
processes"?  That can be easily done by
composing the original matrix with the auxiliary one and extracting it to
check the comm size in MatView_SeqXXX.
Alternatively, we could attach just the original comm size to the auxiliary
Mat.
Or am I the only one bothered by this?

Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120606/f778b671/attachment.html>


More information about the petsc-dev mailing list