<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Mar 6, 2015 at 4:41 PM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dmitry Karpeyev <<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>> writes:<br>
> This is trickier than it might appear: nonzerostate effectively counts the<br>
> global number of nonzeros. The PC will rebuild if its state is stale, but<br>
> it will reuse matrices (e.g., subdomain matrices in PCASM) if nonzerostate<br>
> is up to date.  This works if the sparsity pattern never drops nonzeros,<br>
> but that's no longer true if reset is allowed. I can reset a matrix,<br>
> preallocate and assemble it so that the global number of nonzeros will be<br>
> the same as before the resetting, but local sparsity patterns will change.<br>
> This could happen, for example, when I have moving particles or, less<br>
> exotically, when I have elastic contact and nodes move past each other.<br>
> That will break PCASM.<br>
<br>
On pretty simple and reliable solution would be to take a cryptographic<br>
hash of the row/col arrays.  I assume BG is really atrocious at hashing,<br>
but is it so bad that this is not viable?  (There are several places<br>
where we use kinda fragile state counters or trust the user, but hashes<br>
would make rebuilding more reliable and transparent.)<br></blockquote><div>This sounds interesting. The problem with using this in maint that it is too intrusive, and for master we can have a simpler (and guaranteed) fix of keeping a separate 'reset' counter.  Together with 'nonzerostate' it provides an unambiguous discriminator for the PC to base its rebuild decisions on. </div></div></div>