From 14afcbdc7fc3789d7b7d4385429491a436f65ea0 Mon Sep 17 00:00:00 2001 From: Navjot Kukreja Date: Thu, 15 Jun 2017 18:59:31 +0200 Subject: [PATCH] Fix summary printing in DSE/DLE --- devito/dle/backends/common.py | 3 ++- devito/dse/symbolics.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/devito/dle/backends/common.py b/devito/dle/backends/common.py index c6e41a776a..1cdff58971 100644 --- a/devito/dle/backends/common.py +++ b/devito/dle/backends/common.py @@ -223,7 +223,8 @@ def _summary(self): """ row = "%s [elapsed: %.2f]" - out = " >>\n ".join(row % (filter(lambda c: not c.isdigit(), k[1:]), v) + out = " >>\n ".join(row % ("".join(filter(lambda c: not c.isdigit(), k[1:])), + v) for k, v in self.timings.items()) elapsed = sum(self.timings.values()) dle("%s\n [Total elapsed: %.2f s]" % (out, elapsed)) diff --git a/devito/dse/symbolics.py b/devito/dse/symbolics.py index 1a0b073989..511e61ce4a 100644 --- a/devito/dse/symbolics.py +++ b/devito/dse/symbolics.py @@ -363,7 +363,8 @@ def _summary(self): if self.profile: row = "%s [flops: %s, elapsed: %.2f]" - summary = " >>\n ".join(row % (filter(lambda c: not c.isdigit(), k[1:]), + summary = " >>\n ".join(row % ("".join(filter(lambda c: not c.isdigit(), + k[1:])), str(self.ops.get(k, "?")), v) for k, v in self.timings.items()) elapsed = sum(self.timings.values())