<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 20 August 2015 at 05:28, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I run my code on 1, 2 and 3 procs. KSP is used to solve the Poisson eqn.<br>
<br>
Using MatView and VecView, I found that my LHS matrix and RHS vec are the same for 1,2 and 3 procs.<br>
<br>
However, my pressure (ans) output is the almost the same (due to truncation err) for 1,2 procs.<br>
<br>
But for 3 procs, the output is the same as for the 1,2 procs for all values except:<br>
<br>
1. the last few values for procs 0<br>
<br>
2. the first and last few values for procs 1 and 2.<br>
<br>
Shouldn't the output be the same when the LHS matrix and RHS vec are the same? How can I debug to find the err?<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>It's a bit hard to say much without knowing exactly what solver configuration you actually ran and without seeing the difference in the solution you are referring too.<br><br></div><div>Some preconditioners have different behaviour in serial and parallel. Thus, the convergence of the solver and the residual history (and thus the answer) can look slightly different. This difference will become smaller as you solve the system more accurately. <br>Do you solve the system accurately? e.g. something like -ksp_rtol 1.0e-10<br> <br></div><div>To avoid the problem mentioned above, try using -pc_type jacobi. This PC is the same in serial and parallel. Thus, if your A and b are identical  on 1,2,3 procs, then the residuals and solution will also be identical on 1,2,3 procs (upto machine precision).<br><br></div><div>Thanks,<br></div><div>  Dave<br></div><div><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Thank you<br>
<br>
Yours sincerely,<br>
<br>
TAY wee-beng<br>
<br>
</font></span></blockquote></div><br></div></div>