尝试构建 Boost MPI,但未创建 lib 文件。发生了什么事?

发布于 2024-09-02 19:46:22 字数 2623 浏览 1 评论 0原文

我正在尝试使用 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,但我没有用它做任何其他事情。我们需要用它做些什么吗?我还在程序文件中找到了自己的 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 应用程序中链接所需的库。

如果不构建库,可能会出现什么问题?

I am trying to run a program with Boost MPI, but the thing is I don't have the .lib. So I try to create one by following the instruction at http://www.boost.org/doc/libs/1_43_0/doc/html/mpi/getting_started.html#mpi.config

The instruction says "For many users using LAM/MPI, MPICH, or OpenMPI, configuration is almost automatic", I got myself OpenMPI in C:\, but I didn't do anything more with it. Do we need to do anything with it? I also got myself MPICH2 in Program Files, and didn't do anything more with it as well. At this point of the instruction is where I am quite unsure about what exactly do we have to do.

Beside that, another statement from the instruction: "If you don't already have a file user-config.jam in your home directory, copy tools/build/v2/user-config.jam there." Well, I simply do what it says. I got myself "user-config.jam" in C:\boost_1_43_0> along with "using mpi ;" into the file.

Next, this is what I've done: 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>

I see that there are many libs in C:\boost_1_43_0\stage\lib, but I see no trace of libboost_mpi-vc100-mt-1_43.lib or libboost_mpi-vc100-mt-gd-1_43.lib at all. These are the libraries required for linking in mpi applications.

What could possibly gone wrong when libraries are not being built?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请远离我 2024-09-09 19:46:22

我怀疑它只是没有读取您的 user-config.jam...当构建引用并搜索 user-config.jam 时,它会在 %HOME% 位置执行此操作。不在 Boost 源的根目录中,也不在当前目录中。但您可以通过以下选项使其使用特定的 user-config.jam 文件:bjam --user-config=user-config.jam ...。它只会在当前目录中查找它。或者您也可以指定文件的完整路径。您应该阅读 mpi.jam 工具文件中的注释 (mpi.jam),它解释了在什么条件下它将自动设置 mpi 工具。特别是关于路径中包含 mpic++ 的注释。

I suspect it's just not reading your user-config.jam... When the build refers to, and searches for, the user-config.jam it does so in the %HOME% location. Not in the root directory of the Boost sources, nor in the current dir. But you can make it use a specific user-config.jam file with an option: bjam --user-config=user-config.jam .... Which will look for it only in the current dir. Or you could also specify a full path to the file. You should read the comments in the mpi.jam tool file (mpi.jam) as it explains under which conditions it will automatically set up the mpi tools. Specifically the note about having mpic++ in your path.

一身软味 2024-09-09 19:46:22

我使用 mpi 使用以下命令构建了 boost 1.55:
./bjam link=shared --prefix=/software/boost_1.55 安装

vim tools/build/v2/user-config.jam

-->>在 user-config.jam 末尾“使用 mpi ;” (不带引号)

./b2 link=shared --prefix=/software/boost_1.55 install

如果我提供 --with-mpi 我遇到了同样的问题,因此我就是这样构建的。

I built boost 1.55 with mpi with the following commands:
./bjam link=shared --prefix=/software/boost_1.55 install

vim tools/build/v2/user-config.jam

-->> at the end of user-config.jam "using mpi ;" (without quotes)

./b2 link=shared --prefix=/software/boost_1.55 install

If I provide --with-mpi I got the same problem, therefore I've built it that way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文