Hi, all (1) I am using PETSc to perform, for instance matrix-matrix multiplication. But the numerical values of the matrix are calculated from my integral code. I guess, for matrix-matrix multiplication, it might be better to distribute the rows of matrix uniformly on processors, right?
(2) If yes, I have a problem in my integral code. Since I need dynamic load balancing to calculate the matrix elements and then put them into correct places by using MatSetValues. But I have two questions regarding MatSetValues: (2.1) If one processor calculated a lot of elements belong to another remote processor, will this become a problem for the performance? Should I make all processors calculate as many local elements as possible? (2.2) From the manual, I see MatSetValues only caches the values, but MatAssemblyBegin() and MatAssemblyEnd() assembles the matrix. Therefore, is there any memory limit for MatSetValues, or in other words, will it cost a lot of memory before assembling? Thank you in advance. Cheers Gao -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120502/786b9c56/attachment.htm>
