13.1. 前提条件

13.1.1. 编译器

虽然这可能是默认要求,但你需要一个支持C99标准的C编译器。

如果您希望构建Fortran MPI绑定(Fortran编译器版本越新越好),还需要一个Fortran编译器;如果要构建(非官方的)Java MPI绑定,则还需要一个Java编译器。

13.1.2. GNU 自动工具集

从代码仓库源码构建Open MPI时,必须安装GNU Autotools工具链(包括GNU AutoconfGNU AutomakeGNU Libtool)。

工具

最低版本

Autoconf

2.69.0

Automake

1.13.4

Libtool

2.4.2

注意

从发行版tarball构建Open MPI时不需要GNU Autotools。Open MPI发行版tarball已经预先配置好,最终用户无需安装GNU Autotools。

通常您可以通过Linux发行版的原生包管理系统,或在MacOS上通过Homebrew或MacPorts来安装GNU Autoconf、Automake和Libtool。这通常"开箱即用"。

如果您在使用GNU Autotools时遇到问题,或需要手动下载/构建它们,请参阅如何构建和安装GNU Autotools部分获取更详细的信息。

13.1.3. Perl

Open MPI 仍在其部分构建脚本中使用 Perl(最显著的是 autogen.pl)。

一般来说,任何较新版本的Perl 5都应该能够正确执行Open MPI的Perl脚本。

13.1.4. Flex

最低支持版本:2.5.4。

Flex 用于开发者在代码检出时的编译过程(不用于构建官方发布的压缩包)。其他版本的lex受支持:考虑到要在所有lex版本间保持解析代码的可移植性与在Open MPI上开展更有意义的工作之间做选择,我们显然更倾向于后者。

请注意,尚未进行测试以确定Open MPI所需的最低Flex版本。我们建议您至少使用v2.5.35版本。

目前,Open MPI允许开发者使用Flex 2.5.4进行构建。这主要是由于RedHat/CentOS 5系统默认搭载的是Flex 2.5.4版本。未来Open MPI开发者版本很可能会要求Flex版本≥2.5.35。

请注意,flex生成的代码在某些平台上会产生一些编译器警告,但这些警告似乎在不同平台、编译器和flex版本上并不一致或统一。因此,我们几乎没有尝试去消除这些警告。

如果您尚未安装Flex且无法通过操作系统的软件包管理系统(包括MacOS上的Homebrew或MacPorts)轻松安装,请参阅Flex Github仓库

13.1.5. Sphinx(以及Python)

Sphinx is a Python-based tool used to generate both the HTML version of the documentation (that you are reading right now) and the nroff man pages.

Official Open MPI distribution tarballs contain pre-built HTML documentation and man pages. This means that — similar to the GNU Autotools — end users do not need to have Sphinx installed, but will still have both the HTML documentation and man pages installed as part of the normal configure / build / install process.

However, the HTML documentation and man pages are not stored in Open MPI’s Git repository; only the ReStructred Text source code of the documentation is in the Git repository. Hence, if you are building Open MPI from a Git clone, you will need Sphinx (and some Python modules) in order to build the HTML documentation and man pages.

重要

大多数系统默认未安装Sphinx和/或所需的Python模块。请参阅安装Sphinx章节了解如何安装Sphinx及所需Python模块的详细信息。

If configure is able to find Sphinx and the required Python modules, it will automatically generate the HTML documentation and man pages during the normal build procedure (i.e., during make all). If configure is not able to find Sphinx and/or the required Python modules, it will simply skip building the documentation.

注意

如果您从Git克隆构建/安装了Open MPI,但意外发现未安装手册页,很可能是因为您没有安装Sphinx和/或所需的Python模块。

查看安装Sphinx部分了解如何安装Sphinx及所需的Python模块。

重要

make dist will fail if configure did not find Sphinx and/or the required Python modules. Specifically: if make dist is not able to generate the most up-to-date HTML documentation and man pages, you cannot build a distribution tarball. This is an intentional design decision.