Hello everyone, I hope everyone is OK. can you anyone help me to fix a problem.
I am using the Fenics project on ubuntu.
I try to run " import fenics "
I got the following error :
RuntimeWarning: mpi4py.MPI.File size changed, may indicate binary incompatibility. Expected 32 from C header, got 40 from PyObject
def compile_class(cpp_data, mpi_comm=MPI.comm_world):
thank you for your consideration
Perhaps it’s an MPI compatibility issue if you installed mpi4py
yourself without compiling against your system MPI. If this is the case, you could try:
pip3 install mpi4py --no-binary mpi4py --user --force --no-cache-dir
and hopefully it compiles against your system MPI and reinstalls mpi4py
.
Other than this, it’s very difficult to debug without knowing in which environment you’re working, and how you installed FEniCS / MPI etc.
Thank you very much for your help, I try with it, but unfortunately, I got some error.
I solve it by installing the old version mpi4py=3.0.3
I am encountering similar problem, but “expected 40, got 32”
ValueError: mpi4py.MPI.Datatype size changed, may indicate binary incompatibility. Expected 40 from C header, got 32 from PyObject
Does anyone know which version of mpi4py can work? Thank you.
Please give us more details on your installation (e.g. operating system, MPI vendor, mpi4py version, dolfin or dolfinx version), otherwise it’s impossible for anyone to help.
Thank you. I’ve changed the version of mpi4py. 3.1.1 can solve the issue.