2016-08-09 21 views
1

私はpython3.5でmpi4pyを使用しようとしています。私はopenMPIをインストールしてから、mpi4pyモジュールをUbuntu 16.04にインストールしました。python3.5でmpi4pyを使用

私がしようとすると、インポートmpi4pyとき、私は次のエラーを取得する:

Python 3.5.2 (default, Jul 5 2016, 12:43:10) 
[GCC 5.4.0 20160609] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> from mpi4py import MPI 
[ubuntu:31733] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_shmem_mmap: /usr/lib/openmpi/lib/openmpi/mca_shmem_mmap.so: undefined symbol: opal_show_help (ignored) 
[ubuntu:31733] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_shmem_posix: /usr/lib/openmpi/lib/openmpi/mca_shmem_posix.so: undefined symbol: opal_shmem_base_framework (ignored) 
[ubuntu:31733] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_shmem_sysv: /usr/lib/openmpi/lib/openmpi/mca_shmem_sysv.so: undefined symbol: opal_show_help (ignored) 
-------------------------------------------------------------------------- 
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_shmem_base_select failed 
    --> 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_ARE_FATAL (processes in this communicator will now abort, 
*** and potentially your MPI job) 
[ubuntu:31733] Local abort before MPI_INIT completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed 

は、どのように私はこの問題を解決することができますか?

答えて

2

私は、次の手順を実行して、これを解決:

既存のインストールを削除します。

sudo apt-get remove openmpi-bin 
sudo apt-get remove python3-mpi4py 

再インストール

sudo apt-get install libopenmpi-dev 
sudo pip3 install mpi4py 
sudo apt install openmpi-bin 
関連する問題