我正在尝试使用 Boost MPI 运行程序,但问题是我没有 .lib。所以我尝试按照http://www.boost.org/doc/libs/1_43_0/doc/html/mpi/getting_started.html#mpi.config上的说明创建一个
指令说“对于许多使用 LAM/MPI、MPICH 或 OpenMPI 的用户,配置几乎是自动的”,我在 C:\ 中得到了自己的 OpenMPI,但我没有用它做更多的事情。我们需要对它做些什么吗?我还在 Program Files 中找到了自己的 MPICH2,也没有对它做任何事情。在指令的这一点上,我非常不确定我们到底要做什么。
除此之外,指令中的另一条语句:“如果您的主目录中还没有文件 user-config.jam,请将 tools/build/v2/user-config.jam 复制到那里。” 好吧,我只是按照它说的去做。我在 C:\boost_1_43_0> 中找到了自己的“user-config.jam”以及“使用 mpi;” 到文件中。
接下来,这就是我所做的: bjam --with-mpi
C:\boost_1_43_0>bjam --with-mpi
WARNING: No python installation configured and autoconfiguration
failed. See http://www.boost.org/libs/python/doc/building.html
for configuration instructions or pass --without-python to
suppress this message and silently skip all Boost.Python targets
Building the Boost C++ Libraries.
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
warning: Unable to construct ./stage-unversioned
warning: Unable to construct ./stage-unversioned
Component configuration:
- date_time : not building
- filesystem : not building
- graph : not building
- graph_parallel : not building
- iostreams : not building
- math : not building
- mpi : building
- program_options : not building
- python : not building
- random : not building
- regex : not building
- serialization : not building
- signals : not building
- system : not building
- test : not building
- thread : not building
- wave : not building
...found 1 target...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\boost_1_43_0
The following directory should be added to linker library paths:
C:\boost_1_43_0\stage\lib
C:\boost_1_43_0>
我看到 C:\boost_1_43_0\stage\lib 中有很多库,但我根本看不到 libboost_mpi-vc100-mt-1_43.lib 或 libboost_mpi-vc100-mt-gd-1_43.lib 的痕迹。这些是在 mpi 应用程序中链接所需的库。
没有构建库时可能会出现什么问题?