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
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.