[petsc-dev] Broken MatMatMult_MPIAIJ_MPIDense

Smith, Barry F. bsmith at mcs.anl.gov
Mon Sep 23 10:14:33 CDT 2019


   Hong,

    As a hack for this release could you have the Numeric portion of the multiply routines check if the symbolic data is there and if not just call the symbolic an attach the needed data? You might need to have a utility function that does all the symbolic part except the allocation of the matrix and then call this from the numeric part as well as the real symbolic part.

  Barry



> On Sep 23, 2019, at 9:59 AM, Zhang, Hong <hzhang at mcs.anl.gov> wrote:
> 
> 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



More information about the petsc-dev mailing list