This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

ImportError: cannot import name mpi_comm_world

0 votes

I am trying to run a fenics application, however it crashes as following :

File "/cluster/home/imranal/Oasis/common/io.py", line 8, in
from dolfin import MPI, Function, XDMFFile, HDF5File, info_red, VectorFunctionSpace, mpi_comm_world
ImportError: cannot import name mpi_comm_world

I tried autocompleting in ipython, and it found only the following with MPI :

from dolfin import mp
MPI
MPICH_IGNORE_CXX_SEEK
MPICommunicator
MPIInfo
MPINonblocking

I have dolfin 1.3.0.

asked May 15, 2014 by imranal FEniCS Novice (240 points)

This was introduced in dolfin after 1.3.0, and Mikael has probably kept Oasis more or less up to date with development version. As with fenicstools, see if you can use Oasis 1.3.0 release.

Thanks for pointing out the similar error I was experiencing at http://fenicsproject.org/qa/3549/instant-recompile-module-compile-with-command-make-verbose . Fixed this one by using git checkout v1.3. Matching my dolfin version.

1 Answer

+1 vote

As Øyvind Evju commented, I had a mismatch between my dolfin version and Oasis.

Using git checkout v1.3 fixed the issue.

Thanks Øyvind Evju.

answered May 15, 2014 by imranal FEniCS Novice (240 points)
...