<div class="gmail_quote">On Wed, Nov 23, 2011 at 08:24, jean-frederic thebault <span dir="ltr">&lt;<a href="mailto:jean-frederic@thebault-net.com">jean-frederic@thebault-net.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>I&#39;m wondering what&#39;s wrong in my code. I&#39;m using PETSc to solve a linear system, and willing to use a multi-processor computer. 9 years ago, I used petsc-2.1.3 with success. Few weeks ago, I&#39;ve update petsc with the 3.1-p8 version and made the necessary changes to work with. No problem. And recently, I&#39;ve migrate to petsc-3.2-p5. Compilation is OK. But when I do simulation, now, I have some PETSC-ERROR in the log file, even using only one processor (see the out.log file in this email).</div>
</blockquote><div><br></div><div>You are calling MatSetOption() with the wrong number of arguments. C compilers tell you about this, but Fortran compilers do not.</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div> However, I think I defined MatMPI and VecMPI correctly, according to the doc. The log file tell that something wrong with the nnz which should not be greater than row length (??).</div>
</blockquote><div><br></div><div>The log you sent does not say anything about nnz. Fix the call to MatSetOption().</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div>And also, with the previous version of PETSc I&#39;ve used, the were no problem using -pc_type bjacobi and -sub_pc_type sor, juste to solve linear system doing parallel computations and because SOR is not parallelized. But now, when I use -pc_type bjacobi and -sub_pc_type sor, with 3 rank, I experiment some convergence problem during my simulation.</div>
</blockquote><div><br></div><div>These options should do the same thing they used to do. Make sure you are assembling correctly. If it&#39;s still confusing, run the old and new code with</div><div><br></div><div>-ksp_monitor_true_residual -ksp_converged_reason -ksp_view -pc_type bjacobi -sub_pc_type sor</div>
<div><br></div><div>and send the output of both for us to look at.</div><div><br></div><div>Also note that you can use -pc_type sor even in parallel. There are options for local iterations and full iterations.</div></div>