Importing mpi4py crashes Python (2.7)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mpi4py (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
To reproduce, install the mpi4py package from Ubuntu. Enter
$ python
and then run:
>>> from mpi4py import MPI
An error message like the following is printed, and python exits:
*******
[compy:04228] mca: base: component_find: unable to open /usr/lib/
[compy:04228] mca: base: component_find: unable to open /usr/lib/
[compy:04228] mca: base: component_find: unable to open /usr/lib/
-------
It looks like opal_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during opal_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
opal_
--> Returned value -1 instead of OPAL_SUCCESS
-------
-------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
opal_init failed
--> Returned value Error (-1) instead of ORTE_SUCCESS
-------
-------
It looks like MPI_INIT failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during MPI_INIT; some of which are due to configuration or environment
problems. This failure appears to be an internal failure; here's some
additional information (which may only be relevant to an Open MPI
developer):
ompi_mpi_init: ompi_rte_init failed
--> Returned "Error" (-1) instead of "Success" (0)
-------
*** An error occurred in MPI_Init_thread
*** on a NULL communicator
*** MPI_ERRORS_
*** and potentially your MPI job)
[compy:4228] Local abort before MPI_INIT completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed!
*******
It appears to have something to do with how the mpi4py package was built. The following is a work-around which involves removing the Ubuntu package. First, remove it:
$ sudo apt-get remove mpi4py
Then install the Open MPI headers (the next step involves building mpi4py) and pip:
$ sudo apt-get install libopenmpi-dev python-pip
Finally install mpi4py:
$ sudo pip install mpi4py
If you try the python command above, it should now work fine.
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.