[petsc-dev] MatDestroy call in MatMerge

Vaclav Hapla vaclav.hapla at vsb.cz
Sun Feb 26 16:22:56 CST 2012


Dear PETSc folks,
I feel that it is quite incorrect that MatMerge calls MatDestroy(&inmat) 
since this corrupts "garbage collection" - inmat is destroyed but only 
nullified in MatMerge. It remains unchanged outside so subsequent 
MatDestroy call fails. I think that there is no reason for this destroy, 
if am right, MatMerge does not corrupt the inmat so it can be reused and 
then destroyed manually.

The second question is - what is the principal difference between 
MatMerge and MatMerge_SeqsToMPI - I am confused a bit.

And I have finally one note about MatMerge_SeqsToMPI manual page: there 
is instead a synopsis of MatMerge_SeqsToMPINumeric because this comment 
is located above the MatMerge_SeqsToMPINumeric function in source.

Thank you in advance for answer.
Regards,
Vaclav Hapla



More information about the petsc-dev mailing list