diff --git a/python/dune/perftool/pdelab/localoperator.py b/python/dune/perftool/pdelab/localoperator.py index 28c46c33a4de53c07d04fc00461991d324902554..bbd7daf44eb84af3abaeeec0ef6d19a3d33acb59 100644 --- a/python/dune/perftool/pdelab/localoperator.py +++ b/python/dune/perftool/pdelab/localoperator.py @@ -204,6 +204,13 @@ def generate_kernel(integrals): kernel = preprocess_kernel(kernel) + # see whether we need iname duplication to make this thing schedulable! + # TODO: Use a clever strategy here, instead of random transformation until the problem is resolved + from loopy import needs_iname_duplication, get_iname_duplication_options, duplicate_inames + while needs_iname_duplication(kernel): + inames, within = next(get_iname_duplication_options(kernel)) + kernel = duplicate_inames(kernel, inames, within) + # Loopy might have introduced some temporary variables during preprocessing. As I want to have my own # temporary declaration code right now, I call the declaration preamble manually. for added_tv in set(kernel.temporary_variables.keys()) - set(temporaries.keys()):