I created a mesh for a circle domain using Gmsh (GUI version), and save it as .msh
file.
Then I’d like to read the
.msh
file using dolfinx.io.gmshio.read_from_msh()
and save it as .xdmf
file. The reading code is as following:
import dolfinx
from mpi4py import MPI
path = "../data/mesh/"
domain = dolfinx.io.gmshio.read_from_msh(path + "circle.msh", MPI.COMM_WORLD)[0]
dolfinx.io.XDMFFile(MPI.COMM_WORLD, path + "circle.xdmf", "w").write_mesh(domain)
Howerver, some errors output:
Info : Reading '../data/mesh/circle.msh'...
Info : 4 entities
Info : 8133 nodes
Info : 8227 elements
Info : Done reading '../data/mesh/circle.msh'
MPI_ERR_RANK: invalid rank
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI COMMUNICATOR 8 DUP FROM 4
with errorcode 6.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
Process finished with exit code 6