[petsc-dev] Broken MatMatMult_MPIAIJ_MPIDense

Zhang, Hong hzhang at mcs.anl.gov
Mon Sep 23 09:59:12 CDT 2019


Yes, we should allow users to provide their own matrix array.

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()
This seems a reasonable API, but it is not obvious to users when and where MatDensePlaceArray() should be called.
Currently, most users call  MatMatMult(A,B, reuse,&C) instead of MatMatMultSymbolic/Numeric.

We plan to add
MatMatGetProduct(A,B,&C);
Then,
MatDensePlaceArray(C,array);

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


More information about the petsc-dev mailing list