On 18/07/16 14:53, Lawrence Mitchell wrote: ...
Please wrap the different bits of your code: mesh/functionspace creation and then solver creation/solve in timed_stage context managers:
from pyop2.profiling import timed_stage
with timed_stage("Make spaces"): mesh = ... V = FunctionSpace(...)
... with timed_stage("Solve"): solve(Lh == 0, H, ...)
And send the output of
python script.py -log_view
For the different mesh sizes.
I did this for n=50 on an identical xeon chip. I quibble with your statement that the solve takes loads of time. Here's what I get: Summary of Stages: ----- Time ------ ----- Flops ----- --- Messages --- -- Message Lengths -- -- Reductions -- Avg %Total Avg %Total counts %Total Avg %Total counts %Total 0: Main Stage: 5.5219e-01 0.1% 0.0000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% 1: Make mesh: 7.2269e+02 96.2% 0.0000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% 2: Solve problem: 2.8219e+01 3.8% 5.8936e+10 100.0% 0.000e+00 0.0% 0.000e+00 0.0% 0.000e+00 0.0% So you can see it took a little over 12 minutes to build the mesh, and 30s to solve the problem. AFAICT almost all of that time is in ctetgen meshing the cube (it does fully unstructured triangulation, so this may explain things). We would welcome patches that made the creation of these structured cube meshes faster by not calling general mesh software. Digging down into the solve, it takes 5 seconds to evaluate the jacobian twice, 1 second for three residual evaluations and about 20 seconds for the two solves. Lawrence