diff --git a/python/dune/perftool/sumfact/autotune.py b/python/dune/perftool/sumfact/autotune.py
index df8ab59073ff2428eeaf84a4a08aff9d8ef68279..771b792af98bb68d8fbdafc8c2ae6a05b61fb7e7 100644
--- a/python/dune/perftool/sumfact/autotune.py
+++ b/python/dune/perftool/sumfact/autotune.py
@@ -74,6 +74,7 @@ def generate_standalone_code(sf, filename, logname):
                       "#include<dune/perftool/sumfact/horizontaladd.hh>\n",
                       "#include<random>\n",
                       "#include<fstream>\n",
+                      "#include<iostream>\n",
                       "\n"
                       ])