我在新服务器上设置了mpi4py
,但它并不是很有用。当我导入mpi4py.MPI
时,它会崩溃。但是,如果我在mpiexec
下执行相同的操作,则可行。在我的其他服务器和工作站上,这两种技术都可以正常工作。我在新服务器上缺少什么?
这是新服务器上发生的事情:
$ python -c 'from mpi4py import MPI; print("OK")'
--------------------------------------------------------------------------
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):
PMI2_Job_GetId failed failed
--> Returned value (null) (14) instead of ORTE_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):
orte_ess_init failed
--> Returned value (null) (14) 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 "(null)" (14) 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)
[Octomore:45430] Local abort before MPI_INIT completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed!
如果我使用mpiexec
运行它,那很好。
$ mpiexec -np 1 python -c 'from mpi4py import MPI; print("OK")'
OK
我在CentOS 6.7上运行。我已经将Python 2.7安装为软件集合,并且我已经加载了openmpi/gnu/1.10.2
模块。 MPICH和MPICH2也已安装,因此它们可能与OpenMPI冲突。但是我还没有加载MPICH模块。我在virtualenv中运行Python:
$ pip list
mpi4py (2.0.0)
pip (8.1.2)
setuptools (18.0.1)
wheel (0.24.0)
答案 0 :(得分:0)
事实证明mpi4py
与OpenMPI版本1.10.2不兼容。它适用于1.6.5版本。
$ module load openmpi/gnu/1.6.5
$ python -c 'from mpi4py import MPI; print("OK")'
OK