在 msvc 2010 中构建 boost MPI 时出错
我已将 openmpi 安装在 C:\Program Files\OpenMPI_v1.5.4-win32\ 中,并希望编译 boost 以生成图形并行库。但出现以下错误:
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
MPI auto-detection failed: unknown wrapper compiler C:/Program Files/OpenMPI_v1.
5.4-win32/bin/mpic++.exe
Please report this error to the Boost mailing list: http://www.boost.org
You will need to manually configure MPI support.
MPI launcher: mpirun -np
当我在 Visual Studio 2010 命令提示符中运行时:
b2 --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=32 stage --debug-configuration
我在 boost_1_48_0\tools\build\v2\user-config.jam 中添加了 MPI 配置,如下所示:
using mpi : "C:/Program Files/OpenMPI_v1.5.4-win32/bin/mpic++.exe" ;
我相信之前已经问过类似的问题,但得到了没有答案:
如何构建 boost::使用 Visual Studio 2010 在 Windows 上使用 Open MPI 的 mpi 库
I have installed openmpi in C:\Program Files\OpenMPI_v1.5.4-win32\ and want to compile boost to produce graph-parallel library. But got the following error:
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
MPI auto-detection failed: unknown wrapper compiler C:/Program Files/OpenMPI_v1.
5.4-win32/bin/mpic++.exe
Please report this error to the Boost mailing list: http://www.boost.org
You will need to manually configure MPI support.
MPI launcher: mpirun -np
when I ran in a Visual Studio 2010 command prompt:
b2 --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=32 stage --debug-configuration
I added the MPI config in boost_1_48_0\tools\build\v2\user-config.jam as below:
using mpi : "C:/Program Files/OpenMPI_v1.5.4-win32/bin/mpic++.exe" ;
I believe this similar question has been asked before but got no answer:
How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您不介意,可以使用 MS MPI v6,从此处下载 https://www.microsoft.com/en-us/download/details.aspx?id=47259
然后你需要对 mpi.jam 文件进行一些调整。对于旧版本的boost,mpi.jam位于文件夹tools/build/v2/tools/中,对于新版本的boost,它位于tools/build/src/tools/中。
在第248行左右,需要进行如下调整。由于 MS 将 API 与 HPC 分开。
If you don't mind, you could use the MS MPI v6, downdload from here https://www.microsoft.com/en-us/download/details.aspx?id=47259
Then you need to make some adjustment to the mpi.jam file. For older version of boost, the mpi.jam is in folder tools/build/v2/tools/, and for new version of boost, it is in tools/build/src/tools/.
Around line 248, you need to make the following adjustment. Due to MS separate the API with the HPC.
我也遇到了同样的问题,用Microsoft MPI解决了。我使用 boost 1.61.0 和 Microsoft MPI v7.1(可在 获取https://www.microsoft.com/en-us/download/details.aspx?id=52981)。下载并安装 SDK 和 MsMpi 安装程序。
我对位于 tools/build/src/tools 中的 mpi.jam 文件进行了与 William 提议的相同的更改。
我将该
命令添加到 user-config.jam 中,该文件应位于您的用户目录中。否则,请转至 tools/build/src 并将其中的 user-config.jam 文件移至您的用户目录中。添加
会导致多个错误。首先,.jam 文件中不允许有空格,其次,如果我在没有空格的路径中找到该文件,则会
导致错误报告:mpi.jam 文件已被另一个进程使用。在路径中添加引号也没有帮助。但它可以与
using mpi;
语句一起使用,无需任何添加。确保 MPI SDK Include、Lib 和 MPI Bin 目录列在路径环境变量中。
下一步是构建 boost.MPI。在 boost 根目录中打开命令提示符,并使用所需的参数和 --with-mpi 调用 bjam。请小心指定variant=debug 或variant=release 标志,否则您将收到名称冲突错误。 (有关详细信息,请参阅此处 http://lists.boost.org/boost- build/2009/12/22854.php)。
这就是为我解决的。
I encountered the same problem and solved it with Microsoft MPI. I use boost 1.61.0 and Microsoft MPI v7.1 (available at https://www.microsoft.com/en-us/download/details.aspx?id=52981). Download and install the SDK and MsMpi Setup.
I made the same changes as William proposed to the mpi.jam file which is located in tools/build/src/tools.
I added the
command to the user-config.jam, which should be located in your user directory. Otherwise go to tools/build/src and move the user-config.jam file located there into your user directory. Adding
leads to multiple errors. First of all, whitespaces are not allowed in the .jam files and second, if i locate the file in a path without whitespaces, like
leads to the error report that the mpi.jam file is already in use by another process. Adding qotation marks to the path does not help either. But it worked with the
using mpi;
statement, without any additions.Make sure the MPI SDK Include, Lib and the MPI Bin directory are listed in your path environment variable.
The next step is to build boost.MPI. Open up a command prompt in the boost root directory and invoke bjam with your desired parameters and --with-mpi. Be careful to specify the variant=debug or variant=release flag, since you will get a nameclash error otherwise. (See here for details http://lists.boost.org/boost-build/2009/12/22854.php).
That's what solved it for me.