diff --git a/grudge/array_context.py b/grudge/array_context.py index 541c83b34..0b935fd58 100644 --- a/grudge/array_context.py +++ b/grudge/array_context.py @@ -239,7 +239,16 @@ def _dag_to_compiled_func(self, dict_of_named_arrays, self.actx._compile_trace_callback(self.f, "pre_find_distributed_partition", dict_of_named_arrays) - distributed_partition = pt.find_distributed_partition(dict_of_named_arrays) + # FIXME: Remove after https://github.com/inducer/pytato/pull/393 goes in + try: + distributed_partition = pt.find_distributed_partition( + self.actx.mpi_communicator, dict_of_named_arrays) + except TypeError as e: + if "find_distributed_partition() takes 1 positional" in str(e): + distributed_partition = pt.find_distributed_partition( + dict_of_named_arrays) + else: + raise if __debug__: # pylint-ignore-reason: