<div dir="ltr">Thanks, Matthew! I will look at numerical stability more carefully.<div><br></div><div>Khai</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 8, 2016 at 6:25 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</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"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Dec 8, 2016 at 5:10 PM, Khai Pham <span dir="ltr"><<a href="mailto:khaipham@utexas.edu" target="_blank">khaipham@utexas.edu</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 Hong, <div><br></div><div>I more concern about the difference between A1 and A2 is in the order of O(1.e-8) as I run the same code twice. Should it be in the order of machine epsilon? </div></div></blockquote><div><br></div></span><div>If you have 17 orders of magnitude difference between elements, then its easy to cancellation when doing subtraction and have</div><div>differences on that order due to permuted operations.</div><div><br></div><div>  Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Khai</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 8, 2016 at 4:54 PM, Hong <span dir="ltr"><<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Khai :<span class="m_404251182450224857m_-229083738509915199gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">Thanks for your response. The output is not the solution. They are the component of the matrix in matlab format. I would expect the difference in the order of machine precesion. The difference in solutions in two runs is in the order of 1e-5.</div></div></blockquote><div> </div></span><div>If your matrices A1 and A2 have difference of O(1.e-8), then the computed solution may differ by</div><div>Condition_number(A) * machine_epsion. Do you know cond(A)?</div><div><br></div><div>Please alway send your request to petsc-maint.</div><span class="m_404251182450224857m_-229083738509915199gmail-HOEnZb"><font color="#888888"><div><br></div><div>Hong</div></font></span><span class="m_404251182450224857m_-229083738509915199gmail-"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><div><div class="m_404251182450224857m_-229083738509915199gmail-m_6424556333072853459h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 8, 2016 4:01 PM, "Hong" <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>> wrote:<br type="attribution"><blockquote class="m_404251182450224857m_-229083738509915199gmail-m_6424556333072853459m_2399410924950848854quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Khai :</div><div class="gmail_quote">Your solution components have values ranging from 1.e+9 to 1.e-8, and the values only differ in the order of 1.e-8, which are within computational error tolerance.</div><div class="gmail_quote">I would consider all solutions same within the approximation tolerance.</div><font color="#888888"><div class="gmail_quote"><br></div><div class="gmail_quote">Hong</div></font><div class="m_404251182450224857m_-229083738509915199gmail-m_6424556333072853459m_2399410924950848854elided-text"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I have problem with matrix assembly for linear solver KSP. I run the the same problem with 4 processors multiple time. Using flag -mat_view ::ascii_matlab to view the matrix. The matrix outputs are not the same during each run. Please see the attached file for the comparison between two runs. I checked all the input for each processor as it calls to MatSetValues ( indices of the matrix and values ) and it's consistent all the time. I also checked the allocation information (with flag -info) and it looks fine. Could you give me an advice how to deal with this issue? Thanks !</div><div><br></div><div>Best,</div><div>Khai</div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>
</blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_404251182450224857gmail_signature" data-smartmail="gmail_signature">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>
</font></span></div></div>
</blockquote></div><br></div>