Dear Lawrence, I actually solve the Benney-Luke equations so my code is very similar to the Benney-Luke demo. I define the same functions, weak formulations, problems and variational solvers. They are defined out of my time loop. Only the domain, mesh and initial conditions are different from the demo. In the time loop, I only call the solvers (e.g. eta.solve() ) and save the data. I solve it on my laptop which is a MacBook Pro with OSX version 10.9.5, and processor 2.5 GHz Intel Core i5. Best wishes, Floriane ________________________________________ De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Envoyé : lundi 14 mars 2016 12:08 À : firedrake@imperial.ac.uk Objet : Re: [firedrake] Debug and Optimised mode 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