On 14/03/16 11:53, Floriane Gidel [RPG] wrote:
Dear Lawrence,
Thank you for your reply. The output of the command -log_summary is attached. I can also send you my code if that helps. I use a large domain with resolution of about 0.15, which might be the reason why the simulations are slow. I also need to run them for a longer time (T=80s-100s instead of T=1s in the test).
OK, all the time is spent inside evaluating Jacobians (assembling matrices) and evaluating residuals (assembling functions). Along with quite a bit inside the solve calls. I notice that you do exactly the same number of linear solves (KSPSolve) as nonlinear solves (SNESSolve), so I suspect that your problem is linear (or at least, you have linearised "by hand" somehow). Do the operators change at every timestep? If not, you may be able to factor the solver setup (and hence save a lot of the cost) out of the timeloop. For an example of this, you can look at either the Benney-Luke demo (which does this for linear solves) http://firedrakeproject.org/demos/benney_luke.py.html. Or the Camassa-Holm demo (which uses nonlinear solves), http://firedrakeproject.org/demos/camassaholm.py.html. You say you have "high" resolution. We can try and characterise what performance you might expect to get. How many degrees of freedom are you solving for? And what kind of computer are you doing this on? You ought to be able to get some speed up just running in parallel with MPI, assuming that your computer is beefy enough. Cheers, Lawrence