通过Python在MPI_Init中启动打开MPI时出错 [英] Error when starting Open MPI in MPI_Init via Python

查看:3254
本文介绍了通过Python在MPI_Init中启动打开MPI时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过python访问与OpenMPI共享库,但由于某种原因,我得到以下错误信息:

  [Geo00433:01196] mca:base:component_find:无法打开/ usr / li / openmpi / lib / openmpi / mca_paffinity_hwloc:可能是一个缺少的符号或是为不同版本的Open MPI编译的? (忽略)
[Geo00433:01196] mca:base:component_find:无法打开/ usr / lib / openmpi / lib / openmpi / mca_carto_auto_detect:可能缺少符号或为不同版本的Open MPI编译? (忽略)
[Geo00433:01196] mca:base:component_find:无法打开/ usr / lib / openmpi / lib / openmpi / mca_carto_file:可能缺少符号或为不同版本的Open MPI编译? (忽略)
[Geo00433:01196] mca:base:component_find:无法打开/ usr / lib / openmpi / lib / openmpi / mca_shmem_mmap:可能缺少符号或为不同版本的Open MPI编译? (忽略)
[Geo00433:01196] mca:base:component_find:无法打开/ usr / lib / openmpi / lib / openmpi / mca_shmem_posix:可能缺少符号或为不同版本的Open MPI编译? (忽略)
[Geo00433:01196] mca:base:component_find:无法打开/ usr / lib / openmpi / lib / openmpi / mca_shmem_sysv:可能是一个缺少的符号或者为不同版本的Open MPI编译? (忽略)
------------------------------------------- ------------------------------
看起来像opal_init由于某种原因失败;你的并行过程是
可能中止。有很多原因导致并行进程可能在opal_init期间
失败;其中一些是由于配置或
环境问题。这种故障似乎是内部故障;
这里是一些附加信息(它可能只与
Open MPI开发人员相关):

opal_shmem_base_select failed
- >返回值-1而不是OPAL_SUCCESS
--------------------------------------- -----------------------------------
[Geo00433:01196] [[INVALID],无效] ORTE_ERROR_LOG:在第79行的文件运行时/ orte_init.c中出错
-------------------------------- ------------------------------------------
它看起来像MPI_INIT由于某种原因失败;你的并行过程是
可能中止。有许多原因导致并行进程可能在MPI_INIT期间
失败;其中一些是由于配置或环境
的问题。这种故障似乎是内部故障;这里是一些
的附加信息(它可能只与一个Open MPI
开发者相关):

ompi_mpi_init:orte_init failed
- >返回错误(-1)而不是成功(0)
------------------------------ --------------------------------------------
** * MPI_Init中出现错误
***在NULL通信器上
*** MPI_ERRORS_ARE_FATAL:您的MPI作业现在将中止
[Geo00433:1196]在MPI_INIT成功完成之前本地中止;无法聚合错误消息,并且无法保证所有其他进程被杀死!

任何线索是什么原因?我已经检查了很多网页,但是无法找到我的问题的解决方案。



我安装了Ubuntu 15.10和mpich以及open-mpi。

解决方案

我有同样的问题非常相似与稍微不同的错误消息)在Ubuntu 16.04,即使只安装打开MPI。从我可以知道有一个问题,如何从Ubuntu的mpi4py包建成,但不知道到底是什么。



繁殖: strong>因为这个问题不能完全清楚错误消息是如何产生的(我没有声誉来编辑它),这里是我得到它。首先,安装Ubuntu的mpi4py包,然后进入python环境:

  $ sudo apt-get install mpi 
$ python

在python内,尝试以下操作:

 >>> from mpi4py import MPI 

然后,您应该会收到一条类似OP的错误信息。



解决方案:这是我的工作方式。首先卸载Ubuntu的软件包:

  $ sudo apt-get remove mpi4py 

然后安装Open MPI头(下一步涉及构建mpi4py)和pip:

  $ sudo apt-get install libopenmpi-dev python-pip 



最后安装mpi4py :

  $ sudo pip install mpi4py 

如果你尝试上面的python命令,它现在应该可以正常工作。


I am trying to access a shared library with OpenMPI via python, but for some reason I get the following error message:

[Geo00433:01196] mca: base: component_find: unable to open /usr/li/openmpi/lib/openmpi/mca_paffinity_hwloc: perhaps a missing symbol, or compiled for a different version of Open MPI? (ignored)
[Geo00433:01196] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_carto_auto_detect: perhaps a missing symbol, or compiled for a different version of Open MPI? (ignored)
[Geo00433:01196] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_carto_file: perhaps a missing symbol, or compiled for a different version of Open MPI? (ignored)
[Geo00433:01196] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_shmem_mmap: perhaps a missing symbol, or compiled for a different version of Open MPI? (ignored)
[Geo00433:01196] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_shmem_posix: perhaps a missing symbol, or compiled for a different version of Open MPI? (ignored)
[Geo00433:01196] mca: base: component_find: unable to open /usr/lib/openmpi/lib/openmpi/mca_shmem_sysv: perhaps a missing symbol, or compiled for a different version of Open MPI? (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 is 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
--------------------------------------------------------------------------
[Geo00433:01196] [[INVALID],INVALID] ORTE_ERROR_LOG: Error in file runtime/orte_init.c at line 79
--------------------------------------------------------------------------
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 is some
additional information (which may only be relevant to an Open MPI
developer):

  ompi_mpi_init: orte_init failed
  --> Returned "Error" (-1) instead of "Success" (0)
--------------------------------------------------------------------------
*** An error occurred in MPI_Init
*** on a NULL communicator
*** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
[Geo00433:1196] Local abort before MPI_INIT completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed!

Any clue what's the reason? I checked many webpages already, but somehow couldn't find a solution for my problem yet.

I have Ubuntu 15.10 and mpich as well as open-mpi installed.

Thanks a lot guys!

解决方案

I had the same problem (or very similar with slightly different error message) on Ubuntu 16.04, even with only Open MPI installed. From what I can tell there is a problem with how the mpi4py package from Ubuntu was built, but am not sure what exactly it is.

Reproduction: Since the question doesn't make it entirely clear how the error message was produced (I don't have the reputation to edit it), here's how I got it. First, install Ubuntu's mpi4py package and then enter the python environment:

$ sudo apt-get install mpi
$ python

Inside python, try the following:

>>> from mpi4py import MPI

You should then get an error message like the OP had.

Solution: Here is how I got it working. First uninstall Ubuntu's package:

$ 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.

这篇关于通过Python在MPI_Init中启动打开MPI时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆