[petsc-dev] Broken MatMatMult_MPIAIJ_MPIDense

Jose E. Roman jroman at dsic.upv.es
Mon Sep 23 09:09:21 CDT 2019



> El 22 sept 2019, a las 19:11, Smith, Barry F. <bsmith at mcs.anl.gov> escribió:
> 
>   Jose,
> 
>     Thanks for the pointer. 
> 
>     Will this change dramatically affect the organization of SLEPc? As noted in my previous email eventually we need to switch to a new API where the REUSE with a different matrix is even more problematic.
> 
>      If you folks have use cases that fundamentally require reusing a previous matrix instead of destroying and getting a new one created we will need to think about additional features in the API that would allow this reusing of an array. But it seems to me that destroying the old matrix and using the initial call to create the matrix should be ok and just require relatively minor changes to your codes?
> 
>  Barry

We use MatDensePlaceArray() to plug an array into matrix C before MatMatMult(). If we cannot do this, we will have to copy from the internal array of the result C to our array.

Would the following sequence work?
MatMatMultSymbolic()
MatDensePlaceArray()
MatMatMultNumeric()

Jose



More information about the petsc-dev mailing list