<div dir="ltr"><div><div>thanks, @Matthew<br></div><br></div><div>I was worried about this. is there a way to convert double to PetscScalar? </div><div>incompressible code are double type everywhere else except for PETSc. could this be the problem? <br>it was double type for the entire code  including PETSc before this quadruple test.<br><br></div><div><br></div><div><br><br><br><br><br></div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 9:27 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: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"><span>On Wed, Jun 28, 2017 at 8:22 PM, Hao Zhang <span dir="ltr"><<a href="mailto:hbcbh1999@gmail.com" target="_blank">hbcbh1999@gmail.com</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><div>It's 3d incompressible RT simulation. My pressure between serial and parallel calculation is off by 10^(-14) in relative error. </div></div></div></blockquote><div><br></div></span><div>This could just be reordering of the calculation.</div><span><div> </div><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><div>it eventually build up at later time. I want to rule out the possibilities that PETSc give me bad solution. pressure scale is 10^(-2).<br><br></div>I use PetscScalar. thanks @Jed Brown for confirming that but I have  Segmentation Violation when retrieving x. I allocated memory for the array x (PetscScalar type). if not for quadruple precision, there is no error.<br></div></div></blockquote><div><br></div></span><div>It sounds like maybe you are passing a double where a PetscScalar is expected, or vice versa. Run under valgrind.</div><div><br></div><div>  Matt</div><span><div> </div><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></div>thanks @Satish Balay. I will update code petsc-3.7 later.</div>
</blockquote></span></div><span class="gmail-m_4248448662472630809m_-4942883641207948035m_-3230950619754530543HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_4248448662472630809m_-4942883641207948035m_-3230950619754530543m_9174496485112147066gmail_signature"><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/%7Emk51/" target="_blank">http://www.caam.rice.edu/~mk51<wbr>/</a><br></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail-m_4248448662472630809m_-4942883641207948035m_-3230950619754530543gmail_signature">hao</div>
</div></div></div></div></div>