I encountered a weird error trying to generate a 3D mesh in parallel. For instance,
from dolfin import *
parameters["ghost_mode"]="shared_facet" # doing calculations with CR/DG later in the code
com = MPI.comm_world
msh = UnitCubeMesh.create(com, [2,2,2], CellType.Type.tetrahedron) # UnitCubeMesh(2,2,2) also fails
fails when run in parallel. The following are the warnings and error messages
...
...
Process 24: *** Warning: Mesh is empty, unable to create entities of dimension 2.
Process 24: *** Warning: Mesh is empty, unable to create connectivity 2 --> 3.
...
...
msh = UnitCubeMesh.create(comm,[2,2,2], CellType.Type.tetrahedron)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error: Unable to create mesh entity.
*** Reason: Mesh entity index 0 out of range [0, 0] for entity of dimension 2.
*** Where: This error was encountered inside MeshEntity.cpp.
*** Process: 108
***
*** DOLFIN version: 2019.1.0
*** Git changeset: 74d7efe1e84d65e9433fd96c50f1d278fa3e3f3f
*** -------------------------------------------------------------------------
It seems to run without any issues in serial. Any pointers as to what could be going wrong ?