[petsc-users] MatMatMult densemat

Smith, Barry F. bsmith at mcs.anl.gov
Tue Mar 5 18:58:29 CST 2019


  Marius,

     The reason this is happening is because the routine MatMatMultSymbolic_MPIDense_MPIDense() works by converting the matrix to elemental format, doing the product and then converting back. Elemental format has some block cyclic storage format and so the row ownership knowledge is lost along the way.

     I do not have any suggestions, though others might.

   Barry


> On Mar 5, 2019, at 6:19 PM, Marius Buerkle via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hi,
> 
>  
> I have a question regarding MatMatMult for MPIDENSE matrices. I have two dense matrices A and B for which I set the number up the number of local rows each processor owns manually (same for A and B) when creating them with MatCreateDense (which is different from what PETSC_DECIDE what do). When I calculate A*B=C using MatMatMult with MAT_INITIAL_MATRIX the resulting matrix C has a different distribution of the rows among the processes. Is this normal? I would have expected that C inherits the local row structure from A and B. Later on, I want to multiply C let’s say with A which gives then accordingly an error that the local size is not conform.
> 
> If on the other hand A is MATMPIAIJ then C has the same local row structure.
> 
>  
> Best,
> 
> Marius
> 



More information about the petsc-users mailing list