From c0d182061a147d245e9605372dc23a3b1c92e619 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Wed, 29 Jun 2016 13:25:07 -0500 Subject: [PATCH] Warnings: print kernel name --- loopy/diagnostic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/diagnostic.py b/loopy/diagnostic.py index c1d0e0363..2fd5d4f83 100644 --- a/loopy/diagnostic.py +++ b/loopy/diagnostic.py @@ -60,7 +60,7 @@ def warn_with_kernel(kernel, id, text, type=LoopyWarning): % id) from warnings import warn - warn(text, type) + warn("in kernel %s: %s" % (kernel.name, text), type, stacklevel=2) warn = MovedFunctionDeprecationWrapper(warn_with_kernel) -- GitLab