我已将 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" ;
我相信以前曾有人问过类似的问题,但没有得到答案:
如何使用 Visual Studio 2010 在 Windows 上使用 Open MPI 构建 boost::mpi 库
如果您不介意,您可以使用 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 分开。
local win_ms_mpi_sdk = "C:\\Program Files (x86)\\Microsoft SDKs\\MPI" ;
local win_ms_mpi = "C:\\Program Files\\Microsoft MPI" ;
#local cluster_pack_path_native = "C:\\Program Files\\Microsoft Compute Cluster Pack" ;
#local cluster_pack_path = [ path.make $(cluster_pack_path_native) ] ;
if [ GLOB $(win_ms_mpi_sdk)\\Include : mpi.h ]
{
if $(.debug-configuration)
{
ECHO "Found Microsoft Compute Cluster Pack: $(cluster_pack_path_native)" ;
}
# Pick up either the 32-bit or 64-bit library, depending on which address
# model the user has selected. Default to 32-bit.
options = <include>$(win_ms_mpi_sdk)/Include
<address-model>64:<library-path>$(win_ms_mpi_sdk)/Lib/x64
<library-path>$(win_ms_mpi_sdk)/Lib/x86
<find-static-library>msmpi
<toolset>msvc:<define>_SECURE_SCL=0
;
# Setup the "mpirun" equivalent (mpiexec)
.mpirun = "\"$(win_ms_mpi)\\Bin\\mpiexec.exe"\" ;
.mpirun_flags = -n ;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)