<div class="gmail_quote">On Thu, Jun 28, 2012 at 9:29 AM, Thomas DE-SOZA <span dir="ltr"><<a href="mailto:thomas.de-soza@edf.fr" target="_blank">thomas.de-soza@edf.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font face="sans-serif">Since 9900 coefficients were uneeded, we had first thought that enough room was preallocated. </font>
<br><font face="sans-serif">From what you're telling us, I understand that we may have given an overall size which is large enough to contain the diagonal block but whose nnz line by line is not correct hence the mallocs. Is that correct ?</font>
<br></blockquote><div><br></div><div>Unlikely, extra space is dynamically allocated in bigger chunks so there is usually some left over when mallocs are needed in MatSetValues. You should be careful to get nnz correct, but that is not the only problem here.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><font face="sans-serif">Or does it mean that in the preallocation we have to take care of the values that come from the stash of another processor even if they are added to preexisting entries on the process ?</font>
<br></blockquote></div><br><div>You only have to allocate the entries once, but there are entries that were not preallocated at all.</div>