Skip to content

Optional timing diagnostics for monodomain, ODE, and PETSc solver profiling #58

@hrehmaan

Description

@hrehmaan

Hi @finsberg ,

I have been profiling monodomain simulations in fenicsx-beat while comparing different PETSc solver/preconditioner options.

I added optional timing diagnostics in my fork. The diagnostics are disabled by default and can be enabled with log_timings=True.

The added information includes:

  • Monodomain splitting timing:

    • ODE step
    • ODE to DOLFINx transfer
    • ODE to PDE transfer
    • PDE step
    • PDE to ODE transfer
    • total step time
  • ODE marker timing:

    • marker-wise ODE step time
    • number of ODE points per marker
    • number of states per marker
    • average time per ODE point
    • average time per ODE DOF
  • PDE/PETSc timing:

    • RHS update time
    • matrix update time
    • linear solve time
    • scatter time
    • total PDE step time
  • PETSc/KSP diagnostics:

    • ksp_total_iterations
    • ksp_average_iterations
    • ksp_max_iterations
    • ksp_last_residual_norm
    • ksp_last_converged_reason

This helped show that for small slab tests, runtime is dominated by the ODE/cell-model update, while PDE solver differences become more visible for finer meshes.

Would you be interested in me opening a PR for this?

Best,
Habib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions