<div class="gmail_quote">On Wed, Feb 15, 2012 at 05:12, Bibrak Qamar <span dir="ltr"><<a href="mailto:bibrakc@gmail.com">bibrakc@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">"• PETSc should not be used to attempt to provide a “parallel linear solver” in an otherwise sequential<br>
code. Certainly all parts of a previously sequential code need not be parallelized but the matrix<br>generation portion must be parallelized to expect any kind of reasonable performance. Do not expect<br>to generate your matrix sequentially and then “use PETSc” to solve the linear system in parallel.<br>
"<br>Please help me understand what is meant by it. What if I read the matrix from a file (sequential) and distribute it to other processes and then call any linear solver, how is it going to affect the performance of the code? because reading or generating the matrix is a one time cost for one timestep, or may be that CAUTION is for multiple timesteps?</div>
</blockquote></div><br><div>You should work on the assumption that reading the matrix from a file is at least 100 times more expensive than solving a linear system (more if you're running on thousands of processors).</div>
<div><br></div><div>If you are going to solve with the same matrix enough times, then it's okay.</div><div><br></div><div>Note that if you save the matrix in binary format, you can read in parallel using MatLoad().</div>