[petsc-users] no-debug-mode problem

Barry Smith bsmith at mcs.anl.gov
Thu Jun 27 20:42:49 CDT 2013


On Jun 27, 2013, at 2:23 PM, Tabrez Ali <stali at geology.wisc.edu> wrote:

> Fortran can be tricky.
> 
> Try to run the program in valgrind and/or recheck all your arguments. I once forgot MatAssemblyType in the call to MatAssembly and the code still ran fine on one machine but failed on other. It is better to test with at least 2-3 compilers (GNU, Solaris and Open64 Fortran/C compilers are all free on Linux).
> 
> T

   You can also run both versions with -snes_monitor -ksp_monitor and see if they both start out the same way.

   Barry

> 
> 
> On 27.06.2013 14:52, Longxiang Chen wrote:
>> Dear all,
>> 
>> I use ksp_solver to solve Ax=b, where A is from an outer loop of PDE.
>> Under debug mode(default), it solves the problem in about 4000
>> iterations.
>> And the final answer is correct (comparing to another solver).
>> 
>> I use intel compiler.
>> The program is in Fortran (by mpif90), except the solver is in c (by
>> mpicc).
>> 
>> However, when I re-configure with --with-debugging=0 (the only
>> change),
>> the program terminates in about 30 iterations with the wrong final
>> solution.
>> 
>> Thank you.
>> 
>> Best regards,
>> Longxiang Chen
>> 
>> Do something everyday that gets you closer to being done.
> 



More information about the petsc-users mailing list