UniMainzGeo / LaMEM

LaMEM (Lithosphere and Mantle Evolution Model) - a 3D parallel code to simulate geodynamic and geomechanical processes
MIT License
50 stars 16 forks source link

PETSc stages #8

Closed IskanderI closed 10 months ago

IskanderI commented 10 months ago

Added 4 stages:

  1. Thermal solver
  2. SNES Solve
  3. Advect markers
  4. Saving output

I am not sure about Thermal solver since it usually solves very fast. We should maybe discuss what is the best place to put stages.

Here is a short snippet on run with -log_view now. image

boriskaus commented 10 months ago

Thanks a lot, this is great!

Does the thermal solver also take this little time in the Diffusion solver benchmark?

IskanderI commented 10 months ago

Thanks a lot, this is great!

Does the thermal solver also take this little time in the Diffusion solver benchmark?

No it does not show up there.

I put profiler for thermal diffusion in timestep look already. I put it at ierr = JacResInitTemp(&lm->jr); CHKERRQ(ierr);

But to measure thermal diffuion in Diffusion solver benchmark I will need to put it in Initial guess part of the code. Probably this function. ierr = LaMEMLibDiffuseTemp(lm); CHKERRQ(ierr);

boriskaus commented 10 months ago

Also note that the adjoint tests fail with this:

[0]PETSC ERROR: Duplicate stage name given: Thermal solver

this requires fixing.

boriskaus commented 10 months ago

ok, now this works and I'm in principle happy to merge it. For consistency it would be good if you can increment the version of LaMEM such that we release a new version (easier when doing benchmarking later). Can you please add that (also in the documentation)?

boriskaus commented 10 months ago

Thanks - you also need to change it in the LaMEM.h file (I believe) as the version number of LaMEM is printed at the beginning of the simulation.