diff --git a/devito/operator/profiling.py b/devito/operator/profiling.py index e4befb7484..b7fc3329c2 100644 --- a/devito/operator/profiling.py +++ b/devito/operator/profiling.py @@ -420,7 +420,7 @@ def add(self, name, rank, time, k = PerfKey(name, rank) - if not ops or any(np.isnan(i) for i in [ops, points, traffic]): + if not ops or any(not np.isfinite(i) for i in [ops, points, traffic]): self[k] = PerfEntry(time, 0.0, 0.0, 0.0, 0, []) else: gflops = float(ops)/10**9