Hello,
I try to use using FEniCS in an MPI environment. the following code gives me errors:
import dolfin as dl
from mpi4py import MPI
mesh = dl.UnitSquareMesh(MPI.COMM_SELF, 127, 127)
and the error is
File "/zhome/93/8/155259/Paper-PAT-RTO/applications/pat_2D/MAP_estimate.py", line 38, in run_MAP
mesh = dl.UnitSquareMesh(MPI.COMM_SELF, N_points, N_points)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. dolfin.cpp.generation.UnitSquareMesh(nx: int, ny: int, diagonal: str = 'right')
2. dolfin.cpp.generation.UnitSquareMesh(comm: dolfin.cpp.MPICommWrapper, nx: int, ny: int, diagonal: str = 'right')
I don’t know how to wrap the MPI communicator into a FEniCS format? Any ideas?