From 5c9ab9a8a0554e22cdb493453da7aa86259ba461 Mon Sep 17 00:00:00 2001 From: Julian Hammer <julian.hammer@fau.de> Date: Thu, 4 Apr 2019 19:42:53 +0200 Subject: [PATCH] fixed marker handling --- pystencils/kerncraft_coupling/generate_benchmark.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pystencils/kerncraft_coupling/generate_benchmark.py b/pystencils/kerncraft_coupling/generate_benchmark.py index 9da5c4bd2..339e1bb30 100644 --- a/pystencils/kerncraft_coupling/generate_benchmark.py +++ b/pystencils/kerncraft_coupling/generate_benchmark.py @@ -55,21 +55,22 @@ int main(int argc, char **argv) {%- endfor %} - {%- if likwid %} - {%- if openmp %} + {%- if likwid and openmp %} #pragma omp parallel { likwid_markerRegisterRegion("loop"); #pragma omp barrier - {%- endif %} - likwid_markerStartRegion("loop"); + {%- elif likwid %} + likwid_markerRegisterRegion("loop"); {%- endif %} for(int warmup = 1; warmup >= 0; --warmup) { int repeat = 2; if(warmup == 0) { repeat = atoi(argv[1]); + {%- if likwid %} likwid_markerStartRegion("loop"); + {%- endif %} } for (; repeat > 0; --repeat) -- GitLab