【问题标题】:mpiexec fails as MPI init abortsmpiexec 失败,因为 MPI init 中止
【发布时间】:2011-10-24 02:25:55
【问题描述】:

我正在尝试在运行 Ubuntu 11.04 (Natty Narwhal) 的 64 位机器上安装 MPICH 2。我用过

sudo apt-get install mpich2

首先我很惊讶没有安装 mpd。在 Google 上查找时,我看到 Hydra 是新的默认包管理器。 所以我尝试运行我的 MPI 代码。我收到以下错误。

> -------------------------------------------------------------------------------------------
> [ip-10-99-75-58:02212] [[INVALID],INVALID] ORTE_ERROR_LOG: A
> system-required executable either could not be found or was not
> executable by this user in file
> ../../../../../../orte/mca/ess/singleton/ess_singleton_module.c at
> line 357 [ip-10-99-75-58:02212] [[INVALID],INVALID] ORTE_ERROR_LOG: A
> system-required executable either could not be found or was not
> executable by this user in file
> ../../../../../../orte/mca/ess/singleton/ess_singleton_module.c at
> line 230 [ip-10-99-75-58:02212] [[INVALID],INVALID] ORTE_ERROR_LOG: A
> system-required executable either could not be found or was not
> executable by this user in file ../../../orte/runtime/orte_init.c at
> line 132
> --------------------------------------------------------------------------
> 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_set_name failed   --> Returned value A system-required
> executable either could not be found or was not executable by this
> user (-127) 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: orte_init failed   --> Returned "A system-required
> executable either could not be found or was not executable by this
> user" (-127) instead of "Success" (0)
> --------------------------------------------------------------------------
> *** The MPI_Init() function was called before MPI_INIT was invoked.
> *** This is disallowed by the MPI standard.
> *** Your MPI job will now abort.
> -------------------------------------------------------------------------------------------

首先,在我看来这是一个Open MPI 错误。但我安装的是 MPICH 2 而不是 Open MPI。

其次,我正在修复如何处理此问题,因为所有帮助似乎都针对 Open MPI 用户。我错过了什么吗?

【问题讨论】:

    标签: mpich


    【解决方案1】:

    我在 Ubuntu 12.04 上遇到了同样的问题。我发现我的问题是因为我的电脑上有 open-mpi 和 mpich2。当我使用 mpicc 编译我的程序时,它将链接到 open-mpi 而不是 mpich2。要解决此问题,您可以使用“mpicc.mpich2”编译您的程序,然后使用“mpiexec.mpich2”执行您的代码。

    【讨论】:

    • 为我修复。另外,您有一个错字,应该是:mpiexec.mpich2。谢谢!
    • 我用mpiexec.mpich运行代码。mpicc.mpich2 hello.c -o hmpiexec.mpich -np <num> ./h
    【解决方案2】:

    确实,这些错误消息都是 Open MPI 错误。出于某种原因,您似乎还在某处安装了 Open MPI 的(配置错误?)副本。您可以通过运行which mpiexec 来检查您在键入mpiexec 时正在执行的特定文件。我相信您可以将其与以下结果进行比较:

    dpkg --listfiles mpich2

    (或类似的)以确定 MPICH2 软件包的安装位置。

    【讨论】:

    • 嗨,戴夫。感谢您的回复。但是,即使我明确使用通过从源代码编译 mpich2 获得的 mpiexec 可执行文件,我也会得到相同的错误。 mpich 是否在内部使用了一些 openmpi 库?。
    • 不,MPICH2 不使用任何 Open MPI 库或可执行文件。确保在构建应用程序时还使用了 MPICH2 附带的 mpicc(或类似的)包装脚本。您看到的消息表明您使用 Open MPI 的 mpicc 构建了您的应用程序。
    【解决方案3】:

    我遇到过这种情况,我发现了问题。启动期间系统上的某个位置 LD_PRELOAD 被设置为指向 OpenMPI 中的 libmpi.so。

    例子:

    export LD_PRELOAD=<some_directory>/openmpi/1.4.4/lib/libmpi.so
    

    结果是 MPICH2 失败。只需在运行 MPICH2 之前执行“取消设置 LD_PRELOAD”,问题就会消失。

    请注意,有时实际上需要将 LD_PRELOAD 设置为 OpenMPI 的 libmpi.so 才能使 OpenMPI 正常工作,因此取消设置可能会破坏 OpenMPI。如果您需要使用 OpenMPI,请记住重置它。

    【讨论】:

      猜你喜欢
      • 2019-11-26
      • 2020-10-14
      • 1970-01-01
      • 2019-11-29
      • 2019-05-23
      • 1970-01-01
      • 2014-09-10
      • 2014-06-07
      • 1970-01-01
      相关资源
      最近更新 更多