[petsc-users] [petsc-dev] How to compute RARt with A and R as distributed (MPI) matrices ?

Franck Houssen franck.houssen at inria.fr
Thu Jun 22 03:35:16 CDT 2017


Thanks, I wouldn't have expected so much !

I have to say I am too far from the code to get all the details "behind" this (I understand these details may be numerous and tricky - no problem).
If I got it well, in a near future, MatRARt could support both sequential and distributed matrices, and, MatPtAP will support only distributed ones, correct ? But, the web pages are still identical and the manual.pdf does not mention these functions. So most (rookies, not so experienced) users may still be lost, right ?

A user can understand there are several methods available for different reasons, but, he needs to know why. I just expected adding a 1-line note in the doc (pdf or html) for MatRARt and/or MatPtAP of this kind "this method is meant to support this stuffs but not that stuffs" and/or "if you look for performance, prefer to use this method, not that one" if relevant (?).  

Franck

----- Mail original -----
> De: "Jed Brown" <jed at jedbrown.org>
> À: "Hong" <hzhang at mcs.anl.gov>
> Cc: "petsc-dev" <petsc-dev at mcs.anl.gov>, "PETSc users list" <petsc-users at mcs.anl.gov>
> Envoyé: Jeudi 22 Juin 2017 05:26:57
> Objet: Re: [petsc-users] [petsc-dev] How to compute RARt with A and R as	distributed (MPI) matrices ?
> 
> Hong <hzhang at mcs.anl.gov> writes:
> 
> > Jed :
> >
> >>
> >> Is it better this way or as a fallback when !A->ops->rart?  MatPtAP
> >> handles other combinations like MAIJ.
> >>
> >
> > Do you mean
> > if ( !A->ops->rart) {
> >     Mat Rt;
> >     ierr = MatTranspose(R,MAT_INITIAL_MATRIX,&Rt);CHKERRQ(ierr);
> >     ierr = MatMatMatMult(R,A,Rt,scall,fill,C);CHKERRQ(ierr);
> >     ierr = MatDestroy(&Rt);CHKERRQ(ierr);
> > }
> > This does NOT work for most matrix formats because we do not have fallbacks
> > for MatTranspose() and MatMatMult().
> 
> That's fine; they'll trigger an error and we'll be able to see from the
> stack that it can be made to work by either implementing the appropriate
> MatRARt or MatTranspose and MatMatMatMult.
> 


More information about the petsc-users mailing list