[petsc-dev] Viewing MPI matrices

Barry Smith bsmith at mcs.anl.gov
Wed Jun 6 18:59:21 CDT 2012


On Jun 6, 2012, at 5:18 PM, Dmitry Karpeev wrote:

> 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?

  I don't like "making MatView_SeqAIJ() for ASCII all complicated and knowing about parallel matrices" as the solution to the "problem."

   A better solution is to fix the parallel views for ASCII to print things properly with the right number of processes etc directly rather than calling the sequential views.

   Barry

> 
> Dmitry.
> 




More information about the petsc-dev mailing list