使用 CMake 编译后无法从 mpich2 使用 mpirun
Posted
技术标签:
【中文标题】使用 CMake 编译后无法从 mpich2 使用 mpirun【英文标题】:Trouble using mpirun from mpich2 after compiling using CMake 【发布时间】:2013-08-18 05:53:59 【问题描述】:我在尝试运行 MPI 时遇到问题。我安装了 mpich2-1.4.1p1,当我使用 mpirun 运行 mpi 程序时,我得到:
[starsky:27711] [[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
[starsky:27711] [[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
[starsky:27711] [[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
--------------------------------------------------------------------------
[starsky:27719] [[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
--------------------------------------------------------------------------
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)
以及其他非常相似的错误消息。
这与 mpiexec fails as MPI init aborts 中的问题非常相似,因为我似乎同时拥有 Open MPI 和 mpich2 。但是,我是用cmake编译的,当我按照建议的mpicc-vt.mpich2(mpicc-vt因为我用的是vampir trace)编译,然后mpirun.mpich2运行时,出现如下错误:
To run 'mpirun.mpich2' please ask your administrator to install the package 'mpich2'
我已经安装了 mpich2。有没有我想安装 mpich2 的配置?当我在配置中查看this manual 时,似乎没有一个符合我的需要。
谢谢
【问题讨论】:
【参考方案1】:真的很难说出这里发生了什么,因为您的系统上安装了两个处于不同完成状态的 MPI 库。我认为此时最好的做法是卸载 Open MPI 和 MPICH,然后转到您正在使用的任何包管理器并重新安装。这是让一切正常工作的最简单方法。
如果您想要最新版本(这通常是一件好事),您必须直接访问源代码,因此请查看与您下载的 tarball 捆绑在一起的自述文件。一般来说,对于这两个软件包,您都使用安装 Unix 软件的标准方法。
./configure --prefix=<path for installation>
make
make install
如果您执行./configure --help
并阅读自述文件,您可以阅读 MPICH 和 Open MPI 的许多自定义选项,但通常不需要这些选项,除非您有特殊系统。
【讨论】:
以上是关于使用 CMake 编译后无法从 mpich2 使用 mpirun的主要内容,如果未能解决你的问题,请参考以下文章
从 Cmake 创建 Xcode 项目包含不需要的编译器标志
为啥 cl.exe(Visual Studio 编译器)无法使用 CMake(错误报告)编译项目?