Well, actually, when I call MatSetFromOption, with the right arguments, the whole simulation is running, but there are some PETSC-ERROR about nnz, and when I comment the calling of MatSetFromOption, the simulation (program) stop at the first calculation. This time, I'm putting in this email the log-file with calling of MatSetFromOption (then with PETSC-ERROR on nnz)...<br>
<br>
<div class="gmail_quote">Le 23 novembre 2011 17:17, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>></span> a écrit :<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Since you get a SEGV - I would suggest running the code in the<br>debugger - to check where its crashing.<br>
<br>Also run with valgrind to see where problems start.. Mostlikely the<br>issues would be change in prototypes for PETSc functions - between<br>releases.<br><font color="#888888"><br>Satish<br></font>
<div>
<div></div>
<div class="h5"><br>On Wed, 23 Nov 2011, jean-frederic thebault wrote:<br><br>> Thanks for your response.<br>><br>> Sorry about that, to reduce the size of the log file, unfortunetly, I did<br>> took out the bad lines... In the out.log I've put in this email, I've make<br>
> sure there are...<br>><br>> Actually, I don't use MatSetOption, but MatSetFromOption instead. However,<br>> when I called MatSetFromOption, the PETSC_COMM_WORLD was missing. But now,<br>> it's getting worse !! (as you could see in the out.log included in this<br>
> email).<br>><br>> Le 23 novembre 2011 15:55, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> a écrit :<br>><br>> > On Wed, Nov 23, 2011 at 08:24, jean-frederic thebault <<br>
> > <a href="mailto:jean-frederic@thebault-net.com">jean-frederic@thebault-net.com</a>> wrote:<br>> ><br>> >> I'm wondering what's wrong in my code. I'm using PETSc to solve a linear<br>
> >> system, and willing to use a multi-processor computer. 9 years ago, I used<br>> >> petsc-2.1.3 with success. Few weeks ago, I've update petsc with the 3.1-p8<br>> >> version and made the necessary changes to work with. No problem. And<br>
> >> recently, I've migrate to petsc-3.2-p5. Compilation is OK. But when I do<br>> >> simulation, now, I have some PETSC-ERROR in the log file, even using only<br>> >> one processor (see the out.log file in this email).<br>
> >><br>> ><br>> > You are calling MatSetOption() with the wrong number of arguments. C<br>> > compilers tell you about this, but Fortran compilers do not.<br>> ><br>> ><br>> > <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html</a><br>
> ><br>> ><br>> >> However, I think I defined MatMPI and VecMPI correctly, according to the<br>> >> doc. The log file tell that something wrong with the nnz which should not<br>> >> be greater than row length (??).<br>
> >><br>> ><br>> > The log you sent does not say anything about nnz. Fix the call to<br>> > MatSetOption().<br>> ><br>> > And also, with the previous version of PETSc I've used, the were no<br>
> >> problem using -pc_type bjacobi and -sub_pc_type sor, juste to solve linear<br>> >> system doing parallel computations and because SOR is not parallelized. But<br>> >> now, when I use -pc_type bjacobi and -sub_pc_type sor, with 3 rank, I<br>
> >> experiment some convergence problem during my simulation.<br>> >><br>> ><br>> > These options should do the same thing they used to do. Make sure you are<br>> > assembling correctly. If it's still confusing, run the old and new code with<br>
> ><br>> > -ksp_monitor_true_residual -ksp_converged_reason -ksp_view -pc_type<br>> > bjacobi -sub_pc_type sor<br>> ><br>> > and send the output of both for us to look at.<br>> ><br>> > Also note that you can use -pc_type sor even in parallel. There are<br>
> > options for local iterations and full iterations.<br>> ><br>><br></div></div></blockquote></div><br>