From dd8f535f0bc84de7293796b0a6637a834807f5b8 Mon Sep 17 00:00:00 2001 From: "Michael T. Campbell" Date: Wed, 21 Aug 2024 20:25:49 -0700 Subject: [PATCH] Allow bigger partition discrepancies, include missing import --- bin/meshdist.py | 3 ++- mirgecom/simutil.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/meshdist.py b/bin/meshdist.py index 70150c0fd..d4b3b4214 100755 --- a/bin/meshdist.py +++ b/bin/meshdist.py @@ -195,7 +195,8 @@ def get_mesh_data(): def my_partitioner(mesh, tag_to_elements, num_ranks): from mirgecom.simutil import geometric_mesh_partitioner return geometric_mesh_partitioner( - mesh, num_ranks, auto_balance=True, debug=False) + mesh, num_ranks, auto_balance=True, debug=True, + imbalance_tolerance=.2) part_func = my_partitioner if use_1d_part else None diff --git a/mirgecom/simutil.py b/mirgecom/simutil.py index f3062362a..56414af51 100644 --- a/mirgecom/simutil.py +++ b/mirgecom/simutil.py @@ -94,7 +94,10 @@ DiscretizationDOFAxisTag ) from arraycontext import flatten, map_array_container -from grudge.discretization import DiscretizationCollection +from grudge.discretization import ( + DiscretizationCollection, + PartID +) from grudge.dof_desc import DD_VOLUME_ALL from meshmode.dof_array import DOFArray from collections import defaultdict