11

我正在尝试在运行 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 用户的。我错过了什么吗?

4

3 回答 3

13

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

于 2012-11-02T14:44:01.553 回答
2

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

dpkg --listfiles mpich2

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

于 2011-08-10T16:26:27.607 回答
0

我遇到过这种情况,我发现了问题。启动期间系统上的某个位置 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,请记住将其重置。

于 2012-08-09T15:36:52.523 回答