[petsc-users] Communication during MatAssemblyEnd

Zhang, Junchao jczhang at mcs.anl.gov
Thu Jun 20 15:16:54 CDT 2019


Those messages were used to build MatMult communication pattern for the matrix. They were not part of the matrix entries-passing you imagined, but indeed happened in MatAssemblyEnd. If you want to make sure processors do not set remote entries, you can use MatSetOption(A,MAT_NO_OFF_PROC_ENTRIES,PETSC_TRUE), which will generate an error when an off-proc entry is set.


--Junchao Zhang


On Thu, Jun 20, 2019 at 4:13 AM Ale Foggia via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Hello all!

During the conference I showed you a problem happening during MatAssemblyEnd in a particular code that I have. Now, I tried the same with a simple code (a symmetric problem corresponding to the Laplacian operator in 1D, from the SLEPc Hands-On exercises). As I understand (and please, correct me if I'm wrong), in this case the elements of the matrix are computed locally by each process so there should not be any communication during the assembly. However, in the log I get that there are messages being passed. Also, the number of messages changes with the number of processes used and the size of the matrix. Could you please help me understand this?

I attach the code I used and the log I get for a small problem.

Cheers,
Ale

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190620/be86cd3b/attachment.html>


More information about the petsc-users mailing list