<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 20, 2017 at 4:24 PM, Barry Smith <span dir="ltr"><<a target="_blank" href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-"><br>
> On Oct 20, 2017, at 12:17 PM, Kong, Fande <<a href="mailto:fande.kong@inl.gov">fande.kong@inl.gov</a>> wrote:<br>
><br>
> How about to do a global check (MPI_Allreduce)?<br>
<br>
</span> Kill you for large number of processes.<br>
<span class="gmail-"><br>
> If we do not set values at all and the matrix is already assembled, we just return without doing anything?<br>
><br>
> How expensive, in the current implementation, to call MatAssemblyBegin/End if there are no any stashed data? Is it so cheap that we can just ignore it?<br>
<br>
</span> It requires at least one global reduction.<br></blockquote><div><br></div><div>So, this global reduction is cheaper than <span class="gmail-">MPI_Allreduce? Or they are similar.<br><br></span></div><div><br> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<span class="gmail-">><br>
> I am asking because we call MatAssemblyBegin/End so often in MOOSE. I want to make sure this is not going to bring up any performance issue.<br>
<br>
</span> You need to check each use in MOOSE and see WHY it is being called. If no reason then don't call.<br></blockquote><div><br></div><div>Good point.<br><br></div><div>Fande,<br></div><div><br> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<span class="gmail-HOEnZb"><font color="#888888"><br>
Barry<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
><br>
><br>
> Fande,<br>
><br>
> On Fri, Oct 20, 2017 at 11:08 AM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
> One process sets a value in the matrix, the others do not. They all call MatAssemblyBegin(). Some processes will skip the assembly and hence the code will hang.<br>
><br>
><br>
> > On Oct 20, 2017, at 12:03 PM, Kong, Fande <<a href="mailto:fande.kong@inl.gov">fande.kong@inl.gov</a>> wrote:<br>
> ><br>
> > Hi All,<br>
> ><br>
> > In Mat/VecAssemblyBegin/End, why we do not check if or not mat/vec is assembled. If mat/vec is already assembled, should we just return without doing anything?<br>
> ><br>
> > I think we have some particular reasons not to check if the matrix is assembled. I honestly do not know why.<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Fande,<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>