FEniCS / dolfinx

Next generation FEniCS problem solving environment
https://fenicsproject.org
GNU Lesser General Public License v3.0
734 stars 178 forks source link

[BUG]: `test_assemble_domains` segfaults on 6 processes #3117

Closed jpdean closed 5 months ago

jpdean commented 5 months ago

Summarize the issue

test_assemble_domains fails with segfault on 6 processes

How to reproduce the bug

mpirun -n 6 python3 -m pytest test_assemble_domains.py

Minimal Example (Python)

No response

Output (Python)

No response

Version

main branch

DOLFINx git commit

No response

Installation

No response

Additional information

No response

jorgensd commented 5 months ago

Traceback is:

test_assemble_domains.py::test_assembly_dx_domains[meshtags-none] python3: /usr/local/dolfinx-real64/include/dolfinx/fem/DirichletBC.h:593: void dolfinx::fem::DirichletBC<T, U>::mark_dofs(std::span<signed char>) const [with T = double; U = double]: Assertion `_dofs0[i] < (std::int32_t)markers.size()' failed.
Fatal Python error: Aborted
jorgensd commented 5 months ago

This makes sense, as the test uses:

    bc = dirichletbc(Function(V), np.arange(30))

which I guess is out of range on 6 processes. How about using np.arange(V.dofmap.index_map.size_local // 2, dtype=np.int32)?