From 03d91a4de174aa8645852752802155d644d93744 Mon Sep 17 00:00:00 2001 From: Edward Caunt Date: Tue, 17 Sep 2024 14:06:24 +0100 Subject: [PATCH] misc: Add more helpful error for time bounds edge case --- devito/types/dimension.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/devito/types/dimension.py b/devito/types/dimension.py index 69e9633092..48a7536314 100644 --- a/devito/types/dimension.py +++ b/devito/types/dimension.py @@ -347,6 +347,10 @@ def _arg_check(self, args, size, interval): # Autopadding causes non-integer upper limit from devito.symbolics import normalize_args upper = interval.upper.subs(normalize_args(args)) + + if args[self.max_name] is None: + raise ValueError("Argument %s not found. Do you need to supply it to the" + " operator at runtime?" % self.max_name) if args[self.max_name] + upper >= size: raise InvalidArgument("OOB detected due to %s=%d" % (self.max_name, args[self.max_name]))