<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 25, 2017 at 11:39 AM, Kong, Fande <span dir="ltr"><<a href="mailto:fande.kong@inl.gov" target="_blank">fande.kong@inl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>A matrix is created with the right preallocation, and then MatAssembly is called. The preallocation info will be removed. We insert any values then, and will encounter an malloc error.</div><div><br></div><div>My question is that we was intending to design like this way? Attached simple example demonstrates what I am talking about. </div></div></blockquote><div><br></div><div>Yes, this is the intent. Why are you assembling? Could you use MAT_ASSEMBLY_FLUSH?</div><div><br></div><div>  Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class="HOEnZb"><font color="#888888"><div><br></div><div>Fande,</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>