Note that this is a one time cost if the nonzero structure of the matrix stays the same. It will not happen in future MatAssemblies.
> On Jun 20, 2019, at 3:16 PM, Zhang, Junchao via petsc-users > <[email protected]> wrote: > > 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 > <[email protected]> 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 >
