(dg) bash-4.2$ srun -n 29 python -m mpi4py example.py
Traceback (most recent call last):
File "<removed>/.miniconda3/envs/dg/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "<removed>/.miniconda3/envs/dg/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "<removed>/.miniconda3/envs/dg/lib/python3.8/site-packages/mpi4py/__main__.py", line 7, in <module>
main()
File "<removed>/.miniconda3/envs/dg/lib/python3.8/site-packages/mpi4py/run.py", line 196, in main
run_command_line(args)
File "<removed>/.miniconda3/envs/dg/lib/python3.8/site-packages/mpi4py/run.py", line 47, in run_command_line
run_path(sys.argv[0], run_name='__main__')
File "<removed>/.miniconda3/envs/dg/lib/python3.8/runpy.py", line 263, in run_path
return _run_module_code(code, init_globals, run_name,
File "<removed>/.miniconda3/envs/dg/lib/python3.8/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "<removed>/.miniconda3/envs/dg/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "example.py", line 21, in <module>
local_mesh = mesh_dist.send_mesh_parts(mesh, part_per_element, num_parts)
File "<removed>/code/meshmode/meshmode/distributed.py", line 85, in send_mesh_parts
parts = [partition_mesh(mesh, part_per_element, i)[0]
File "<removed>/code/meshmode/meshmode/distributed.py", line 85, in <listcomp>
parts = [partition_mesh(mesh, part_per_element, i)[0]
File "<removed>/code/meshmode/meshmode/mesh/processing.py", line 163, in partition_mesh
part_mesh = Mesh(
File "<removed>/code/meshmode/meshmode/mesh/__init__.py", line 718, in __init__
raise ValueError("too few bits in element_id_dtype to represent all "
ValueError: too few bits in element_id_dtype to represent all boundary tags
Below is a simplified version of the code that can be used to reproduce the error:
from mpi4py import MPI
comm = MPI.COMM_WORLD
num_parts = comm.Get_size()
from meshmode.distributed import MPIMeshDistributor, get_partition_by_pymetis
mesh_dist = MPIMeshDistributor(comm)
dim = 2
if mesh_dist.is_mananger_rank():
from meshmode.mesh.generation import generate_regular_rect_mesh
mesh = generate_regular_rect_mesh(a=(-0.5,)*dim,
b=(0.5,)*dim,
n=(32,)*dim)
part_per_element = get_partition_by_pymetis(mesh, num_parts)
local_mesh = mesh_dist.send_mesh_parts(mesh, part_per_element, num_parts)
else:
local_mesh = mesh_dist.receive_mesh_part()