[petsc-dev] array ownership of MatCreateMPIAIJWithSplitArrays and MatCreateSeqAIJWithArrays

Stefano Zampini stefano.zampini at gmail.com
Sat Jul 23 14:36:31 CDT 2016


I’m interfacing a FEM library with PETSc.

They already use Hypre and so they have a valid distributed CSR format (except for the diagonal entry of the diagonal block :-))

For efficiency reasons, I was thinking of using MatCreateMPIAIJWithSplitArrays and MatCreateSeqAIJWithArrays;
However, If using these functions as they are now I will need to keep track of the allocated arrays, even with referencing objects, and this could be annoying and cumbersome.

A trivial fix would be to add an extra PetscCopyMode parameter to these routines, so that PETSc can take ownership of the arrays.
Thoughts? Any objection?




More information about the petsc-dev mailing list