[petsc-users] help for beginner :-)

robert robert.bodner at unil.ch
Sat Nov 5 13:28:14 CDT 2011


Hello, 

I am using petsc indirectely by including it in some finite-element
program (libmesh). When starting the calculation I can specify petsc
solvers and preconditioners via the command line. 

Briefly some words about my calculation: I am carrying out
heat-diffusion calculations around a granitic intrusion in Patagonia.
These intrusions happen rapidly - so the initial conditions are an
unsteady function: about 1000° for the intrusion, about 200° around it.
The area is quite large and I am going to have equation systems with
about 50 000 000 - 100 000 000 unknowns (but I have access to a
BlueGEne/P computer).

Since I am a geologist and not very familiar with linear solvers I am
having some trouble. I have tried the solvers which I found in the
manual and combined them with different preconditioners. However, I
could not find out how to check the convergence - it says something
about a 'reason' - variable. 

question 1: 
-----------
How can I get an output of the reason value to the console via a command
line option - in the manual only the petsc-function/method for it is
given???

question 2: 
----------
I have tried the option -ksp_monitor_true_residual but I don't know how
to interpret the output.

Let me give some examples: 

**************************** EX1
 0 KSP preconditioned resid norm 4.638186593787e+13 true resid norm
9.794488229448e+17 ||Ae||/||Ax|| 9.424443120337e-03
  1 KSP preconditioned resid norm 6.549961009128e+12 true resid norm
9.794488254182e+17 ||Ae||/||Ax|| 9.424443144136e-03
  2 KSP preconditioned resid norm 3.500402917464e+12 true resid norm
9.794488256825e+17 ||Ae||/||Ax|| 9.424443146680e-03
  3 KSP preconditioned resid norm 1.924775486173e+12 true resid norm
9.794488258218e+17 ||Ae||/||Ax|| 9.424443148020e-03
  4 KSP preconditioned resid norm 8.761952242321e+11 true resid norm
9.794488303770e+17 ||Ae||/||Ax|| 9.424443191851e-03
  5 KSP preconditioned resid norm 5.566943322481e+11 true resid norm
9.794488372989e+17 ||Ae||/||Ax|| 9.424443258455e-03
  6 KSP preconditioned resid norm 5.352020682919e+11 true resid norm
9.794488438566e+17 ||Ae||/||Ax|| 9.424443321554e-03
  7 KSP preconditioned resid norm 5.337589084246e+11 true resid norm
9.794488438151e+17 ||Ae||/||Ax|| 9.424443321154e-03
  8 KSP preconditioned resid norm 5.282047128925e+11 true resid norm
9.794488438157e+17 ||Ae||/||Ax|| 9.424443321160e-03
  9 KSP preconditioned resid norm 8.645625099558e+11 true resid norm
9.794488437876e+17 ||Ae||/||Ax|| 9.424443320891e-03


**************************** EX2

0 KSP preconditioned resid norm 0.000000000000e+00 true resid norm
9.794488229448e+17 ||Ae||/||Ax|| 9.424443120337e-03


**************************** EX3

0 KSP preconditioned resid norm 9.794488229448e+17 true resid norm
9.794488229448e+17 ||Ae||/||Ax|| 9.424443120337e-03
  1 KSP preconditioned resid norm 9.794488116621e+17 true resid norm
9.794488116621e+17 ||Ae||/||Ax|| 9.424443011772e-03
  2 KSP preconditioned resid norm 9.776352381553e+17 true resid norm
9.776352381553e+17 ||Ae||/||Ax|| 9.406992462076e-03
  3 KSP preconditioned resid norm 9.776352045742e+17 true resid norm
9.776352045742e+17 ||Ae||/||Ax|| 9.406992138953e-03

*****************************
*****************************




Did I get it right that the resid norm and true resid norm should be
more or less the same value?
||Ae||/||Ax||: Ax is clear, but what does the e in Ae stand for? How do
I interpret this value? Is this a comparison beteen the 'real' solution
and the calculated solution. I recognized that the iterations stopped
when this value got smaller than 1e-12.



question 3:
-----------
I am sure that there are many people out there who have a lot of
experience with my kind of systems - I mean diffusional heat tranfer is
a standard problem in many different fields.
Which solution algorithm (solver, preconditioner) would you suggest for
solving in parallel? Which ones do I have to avoid (e.g. not stable)???



I have tried to play around with the different possibilities for some
days - but some ideas would help me a lot. 

Thank you very much, 
Robert




More information about the petsc-users mailing list