diff --git a/python/dune/codegen/pdelab/driver/timings.py b/python/dune/codegen/pdelab/driver/timings.py index a617b64ba9c767750050152e0eba3e167bd5fb30..dd879cc48c64c90d1f09466d679f55c183e7a4b2 100644 --- a/python/dune/codegen/pdelab/driver/timings.py +++ b/python/dune/codegen/pdelab/driver/timings.py @@ -119,6 +119,20 @@ def finalize_likwid(): return ["LIKWID_MARKER_CLOSE;"] +@cached +def driver_likwid(): + @preamble(section="init") + def start_driver_likwid(): + return ["LIKWID_MARKER_START(\"driver\");"] + + @preamble(section="end") + def stop_driver_likwid(): + return ["LIKWID_MARKER_STOP(\"driver\");"] + + start_driver_likwid() + stop_driver_likwid() + + @cached def setup_timer(): # TODO check that we are using YASP? @@ -126,6 +140,7 @@ def setup_timer(): pre_include("#define LIKWID_PERFMON", filetag="driver") include_file("likwid.h", filetag="driver") init_likwid() + driver_likwid() finalize_likwid() else: from dune.codegen.loopy.target import type_floatingpoint