From 43e5bcd411230685b2e70015b52c30b07abe7c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20He=C3=9F?= <rene.hess@iwr.uni-heidelberg.de> Date: Mon, 18 Feb 2019 16:27:25 +0100 Subject: [PATCH] [Fix] Turn off opcountar again --- python/dune/codegen/sumfact/autotune.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/dune/codegen/sumfact/autotune.py b/python/dune/codegen/sumfact/autotune.py index e7a31f13..f5a259d7 100644 --- a/python/dune/codegen/sumfact/autotune.py +++ b/python/dune/codegen/sumfact/autotune.py @@ -176,6 +176,10 @@ def write_setup_code(sf, filename, define_thetas=True): def generate_standalone_code_google_benchmark(sf, filename): delete_cache_items("kernel_default") + # Turn off opcounting + opcounting = get_option("opcounter") + set_option("opcounter", False) + # Extract sum factorization kernel from dune.codegen.pdelab.localoperator import extract_kernel_from_cache knl = realize_sumfact_kernel_function(sf) @@ -185,10 +189,6 @@ def generate_standalone_code_google_benchmark(sf, filename): first_line = knl.member.lines[0] arguments = first_line[first_line.find("(") + 1:first_line.find(")")] - # Turn off opcounting - opcounting = get_option("opcounter") - set_option("opcounter", False) - with open(filename, "w") as f: f.writelines(["// {}".format(first_line), "\n", @@ -241,15 +241,15 @@ def generate_standalone_code_google_benchmark(sf, filename): def generate_standalone_code(sf, filename): delete_cache_items("kernel_default") + # Turn off opcounting + opcounting = get_option("opcounter") + set_option("opcounter", False) + # Extract sum factorization kernel from dune.codegen.pdelab.localoperator import extract_kernel_from_cache knl = realize_sumfact_kernel_function(sf) first_line = knl.member.lines[0] - # Turn off opcounting - opcounting = get_option("opcounter") - set_option("opcounter", False) - with open(filename, "w") as f: f.writelines(["// {}".format(first_line), "\n", -- GitLab