Skip to content

Commit ff7f86e

Browse files
authored
Merge pull request #10371 from awlauria/versions_fun_
Propagate dependency versions to configure and docs.
2 parents eba4e33 + 40088c0 commit ff7f86e

File tree

9 files changed

+171
-51
lines changed

9 files changed

+171
-51
lines changed

VERSION

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
44
# Copyright (c) 2013 Mellanox Technologies, Inc.
55
# All rights reserved.
6-
# Copyright (c) 2016-2021 IBM Corporation. All rights reserved.
6+
# Copyright (c) 2016-2022 IBM Corporation. All rights reserved.
77
# Copyright (c) 2017 Los Alamos National Security, LLC. All rights
88
# reserved.
99

@@ -19,6 +19,17 @@ major=5
1919
minor=1
2020
release=0
2121

22+
# OMPI required dependency versions.
23+
# List in x.y.z format.
24+
pmix_min_version=4.1.2
25+
prte_min_version=2.0.2
26+
hwloc_min_version=1.11.0
27+
event_min_version=2.0.21
28+
automake_min_version=1.13.4
29+
autoconf_min_version=2.69.0
30+
libtool_min_version=2.4.2
31+
flex_min_version=2.5.4
32+
2233
# greek is generally used for alpha or beta release tags. If it is
2334
# non-empty, it will be appended to the version number. It does not
2435
# have to be numeric. Common examples include: a1 (alpha release 1),

autogen.pl

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
my $exclude_list;
6666

6767
# Minimum versions
68-
my $ompi_automake_version = "1.13.4";
69-
my $ompi_autoconf_version = "2.69";
70-
my $ompi_libtool_version = "2.4.2";
68+
my $ompi_automake_version;
69+
my $ompi_autoconf_version;
70+
my $ompi_libtool_version;
7171

7272
# Search paths
7373
my $ompi_autoconf_search = "autoconf";
@@ -1081,6 +1081,60 @@ sub patch_autotools_output {
10811081
unlink("configure.patched");
10821082
}
10831083

1084+
sub export_version {
1085+
my ($name,$version) = @_;
1086+
$version =~ s/[^a-zA-Z0-9,.]//g;
1087+
my @version_splits = split(/\./,$version);
1088+
my $hex = sprintf("0x%04x%02x%02x", $version_splits[0], $version_splits[1], $version_splits[2]);
1089+
$m4 .= "m4_define([OMPI_${name}_MIN_VERSION], [$version])\n";
1090+
$m4 .= "m4_define([OMPI_${name}_NUMERIC_MIN_VERSION], [$hex])\n";
1091+
}
1092+
1093+
sub get_and_define_min_versions() {
1094+
1095+
open(IN, "VERSION") || my_die "Can't open VERSION";
1096+
while (<IN>) {
1097+
my $line = $_;
1098+
my @fields = split(/=/,$line);
1099+
if ($fields[0] eq "automake_min_version") {
1100+
if ($fields[1] ne "\n") {
1101+
$ompi_automake_version = $fields[1];
1102+
}
1103+
}
1104+
elsif($fields[0] eq "autoconf_min_version") {
1105+
if ($fields[1] ne "\n") {
1106+
$ompi_autoconf_version = $fields[1];
1107+
}
1108+
}
1109+
elsif($fields[0] eq "libtool_min_version") {
1110+
if ($fields[1] ne "\n") {
1111+
$ompi_libtool_version = $fields[1];
1112+
}
1113+
}
1114+
elsif($fields[0] eq "pmix_min_version") {
1115+
if ($fields[1] ne "\n") {
1116+
export_version("PMIX", $fields[1]);
1117+
}
1118+
}
1119+
elsif($fields[0] eq "prte_min_version") {
1120+
if ($fields[1] ne "\n") {
1121+
export_version("PRTE", $fields[1]);
1122+
}
1123+
}
1124+
elsif($fields[0] eq "hwloc_min_version") {
1125+
if ($fields[1] ne "\n") {
1126+
export_version("HWLOC", $fields[1]);
1127+
}
1128+
}
1129+
elsif($fields[0] eq "event_min_version") {
1130+
if ($fields[1] ne "\n") {
1131+
export_version("EVENT", $fields[1]);
1132+
}
1133+
}
1134+
}
1135+
close(IN);
1136+
}
1137+
10841138
sub in_tarball {
10851139
my $tarball = 0;
10861140
open(IN, "VERSION") || my_die "Can't open VERSION";
@@ -1311,6 +1365,8 @@ sub replace_config_sub_guess {
13111365
13121366
$step. Checking tool versions\n\n";
13131367

1368+
get_and_define_min_versions();
1369+
13141370
# Check the autotools revision levels
13151371
&find_and_check("autoconf", $ompi_autoconf_search, $ompi_autoconf_version);
13161372
&find_and_check("libtool", $ompi_libtoolize_search, $ompi_libtool_version);

config/ompi_setup_prrte.m4

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
1818
dnl Copyright (c) 2019-2020 Intel, Inc. All rights reserved.
1919
dnl Copyright (c) 2020-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
2020
dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
21-
dnl Copyright (c) 2021 IBM Corporation. All rights reserved.
21+
dnl Copyright (c) 2021-2022 IBM Corporation. All rights reserved.
2222
dnl $COPYRIGHT$
2323
dnl
2424
dnl Additional copyrights may follow
@@ -240,7 +240,7 @@ dnl _OMPI_SETUP_PRRTE_EXTERNAL([action if success], [action if not success])
240240
dnl
241241
dnl Try to find an external prrte with sufficient version.
242242
AC_DEFUN([_OMPI_SETUP_PRRTE_EXTERNAL], [
243-
OPAL_VAR_SCOPE_PUSH([setup_prrte_external_happy opal_prrte_CPPFLAGS_save])
243+
OPAL_VAR_SCOPE_PUSH([ompi_prte_min_version ompi_prte_min_num_version setup_prrte_external_happy opal_prrte_CPPFLAGS_save])
244244
245245
opal_prrte_CPPFLAGS_save=$CPPFLAGS
246246
@@ -250,13 +250,15 @@ AC_DEFUN([_OMPI_SETUP_PRRTE_EXTERNAL], [
250250
AC_CHECK_HEADER([prte.h], [setup_prrte_external_happy=yes],
251251
[setup_prrte_external_happy=no])
252252
253+
ompi_prte_min_version=OMPI_PRTE_MIN_VERSION
254+
ompi_prte_min_num_version=OMPI_PRTE_NUMERIC_MIN_VERSION
253255
AS_IF([test "${setup_prrte_external_happy}" = "yes"],
254-
[AC_CACHE_CHECK([if external PRRTE version is 2.0.0 or greater],
256+
[AC_CACHE_CHECK([if external PRRTE version is OMPI_PRTE_MIN_VERSION or greater],
255257
[ompi_setup_prrte_cv_version_happy],
256258
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <prte_version.h>
257259
]], [[
258-
#if PRTE_NUMERIC_VERSION < 0x00020000
259-
#error "prrte API version is less than 2.0.0"
260+
#if PRTE_NUMERIC_VERSION < $ompi_prte_min_num_version
261+
#error "prrte API version is less than $ompi_prte_min_version"
260262
#endif
261263
]])],
262264
[ompi_setup_prrte_cv_version_happy="yes"],

config/opal_config_hwloc.m4

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dnl Copyright (c) 2014-2018 Research Organization for Information Science
55
dnl and Technology (RIST). All rights reserved.
66
dnl Copyright (c) 2020-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
77
dnl Copyright (c) 2020 Intel, Inc. All rights reserved.
8+
dnl Copyright (c) 2022 IBM Corporation. All rights reserved.
89
dnl $COPYRIGHT$
910
dnl
1011
dnl Additional copyrights may follow
@@ -95,7 +96,7 @@ dnl
9596
dnl only safe to call from OPAL_CONFIG_HWLOC, assumes variables from
9697
dnl there are set.
9798
AC_DEFUN([_OPAL_CONFIG_HWLOC_EXTERNAL], [
98-
OPAL_VAR_SCOPE_PUSH([opal_hwloc_CPPFLAGS_save opal_hwloc_LDFLAGS_save opal_hwloc_LIBS_save opal_hwloc_external_support])
99+
OPAL_VAR_SCOPE_PUSH([opal_hwloc_min_num_version opal_hwloc_min_version opal_hwloc_CPPFLAGS_save opal_hwloc_LDFLAGS_save opal_hwloc_LIBS_save opal_hwloc_external_support])
99100
100101
OAC_CHECK_PACKAGE([hwloc],
101102
[opal_hwloc],
@@ -114,17 +115,19 @@ AC_DEFUN([_OPAL_CONFIG_HWLOC_EXTERNAL], [
114115
OPAL_FLAGS_APPEND_UNIQ([LDFLAGS], [$opal_hwloc_LDFLAGS])
115116
OPAL_FLAGS_APPEND_UNIQ([LIBS], [$opal_hwloc_LIBS])
116117
118+
opal_hwloc_min_num_version=OMPI_HWLOC_NUMERIC_MIN_VERSION
119+
opal_hwloc_min_version=OMPI_HWLOC_NUMERIC_MIN_VERSION
117120
AS_IF([test "$opal_hwloc_external_support" = "yes"],
118-
[AC_MSG_CHECKING([if external hwloc version is 1.11.0 or greater])
121+
[AC_MSG_CHECKING([if external hwloc version is OMPI_HWLOC_MIN_VERSION or greater])
119122
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <hwloc.h>
120123
]], [[
121-
#if HWLOC_API_VERSION < 0x00010500
122-
#error "hwloc API version is less than 0x00011100"
124+
#if HWLOC_API_VERSION < $opal_hwloc_min_num_version
125+
#error "hwloc API version is less than $opal_hwloc_min_version"
123126
#endif
124127
]])],
125128
[AC_MSG_RESULT([yes])],
126129
[AC_MSG_RESULT([no])
127-
AC_MSG_WARN([external hwloc version is too old (1.11.0 or later required)])
130+
AC_MSG_WARN([external hwloc version is too old (OMPI_HWLOC_MIN_VERSION or later required)])
128131
opal_hwloc_external_support="no"])])
129132
130133
AS_IF([test "$opal_hwloc_external_support" = "yes"],

config/opal_config_libevent.m4

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dnl Copyright (c) 2013 Los Alamos National Security, LLC. All rights reser
55
dnl Copyright (c) 2015-2018 Research Organization for Information Science
66
dnl and Technology (RIST). All rights reserved.
77
dnl Copyright (c) 2020-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
8+
dnl Copyright (c) 2022 IBM Corporation. All rights reserved.
89
dnl $COPYRIGHT$
910
dnl
1011
dnl Additional copyrights may follow
@@ -98,7 +99,7 @@ dnl
9899
dnl only safe to call from OPAL_CONFIG_LIBEVENT, assumes variables
99100
dnl from there are set.
100101
AC_DEFUN([_OPAL_CONFIG_LIBEVENT_EXTERNAL], [
101-
OPAL_VAR_SCOPE_PUSH([opal_libevent_CPPFLAGS_save opal_libevent_LDFLAGS_save opal_libevent_LIBS_save opal_libevent_external_support])
102+
OPAL_VAR_SCOPE_PUSH([opal_event_min_version opal_event_min_num_version opal_libevent_CPPFLAGS_save opal_libevent_LDFLAGS_save opal_libevent_LIBS_save opal_libevent_external_support])
102103
103104
dnl Look at libevent_core, not libevent_pthread, because
104105
dnl trying to avoid picking up libevent.so. The wrappers and
@@ -160,22 +161,24 @@ AC_DEFUN([_OPAL_CONFIG_LIBEVENT_EXTERNAL], [
160161
# isn't what we want, because we really want to prefer external
161162
# versions. Pin the "oldest supported" external version to
162163
# 2.0.21, which we know works from testing on RHEL7.
164+
opal_event_min_num_version=OMPI_EVENT_NUMERIC_MIN_VERSION
165+
opal_event_min_version=OMPI_EVENT_MIN_VERSION
163166
AS_IF([test "$opal_libevent_external_support" = "yes"],
164-
[AC_CACHE_CHECK([if external libevent version is 2.0.21 or greater],
167+
[AC_CACHE_CHECK([if external libevent version is OMPI_EVENT_MIN_VERSION or greater],
165168
[opal_libevent_cv_version_check],
166169
[AC_COMPILE_IFELSE(
167170
[AC_LANG_PROGRAM([[#include <event2/event.h>]],
168171
[[
169-
#if defined(_EVENT_NUMERIC_VERSION) && _EVENT_NUMERIC_VERSION < 0x02001500
170-
#error "libevent API version is less than 0x02001500"
171-
#elif defined(EVENT__NUMERIC_VERSION) && EVENT__NUMERIC_VERSION < 0x02001500
172-
#error "libevent API version is less than 0x02001500"
172+
#if defined(_EVENT_NUMERIC_VERSION) && _EVENT_NUMERIC_VERSION < $opal_event_min_num_version
173+
#error "libevent API version is less than $opal_event_min_version"
174+
#elif defined(EVENT__NUMERIC_VERSION) && EVENT__NUMERIC_VERSION < $opal_event_min_num_version
175+
#error "libevent API version is less than $opal_event_min_version"
173176
#endif
174177
]])],
175178
[opal_libevent_cv_version_check="yes"],
176179
[opal_libevent_cv_version_check="no"])])
177180
AS_IF([test "${opal_libevent_cv_version_check}" = "no"],
178-
[AC_MSG_WARN([external libevent version is too old (2.0.21 or later required)])
181+
[AC_MSG_WARN([external libevent version is too old (OMPI_EVENT_MIN_VERSION or later required)])
179182
opal_libevent_external_support=no])])
180183
181184
CPPFLAGS="$opal_libevent_CPPFLAGS_save"

config/opal_config_pmix.m4

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dnl reserved.
1616
dnl Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
1717
dnl Copyright (c) 2014-2021 Research Organization for Information Science
1818
dnl and Technology (RIST). All rights reserved.
19-
dnl Copyright (c) 2016-2021 IBM Corporation. All rights reserved.
19+
dnl Copyright (c) 2016-2022 IBM Corporation. All rights reserved.
2020
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
2121
dnl reserved.
2222
dnl Copyright (c) 2020-2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
@@ -163,7 +163,7 @@ dnl
163163
dnl only safe to call from OPAL_CONFIG_PMIX, assumes variables from
164164
dnl there are set.
165165
AC_DEFUN([_OPAL_CONFIG_PMIX_EXTERNAL], [
166-
OPAL_VAR_SCOPE_PUSH([opal_pmix_CPPFLAGS_save opal_pmix_LDFLAGS_save opal_pmix_LIBS_save opal_pmix_external_support])
166+
OPAL_VAR_SCOPE_PUSH([opal_pmix_min_version opal_pmix_min_num_version opal_pmix_CPPFLAGS_save opal_pmix_LDFLAGS_save opal_pmix_LIBS_save opal_pmix_external_support])
167167
168168
opal_pmix_external_support="yes"
169169
@@ -191,12 +191,14 @@ AC_DEFUN([_OPAL_CONFIG_PMIX_EXTERNAL], [
191191
LDFLAGS="$opal_pmix_LDFLAGS_save $opal_pmix_LDFLAGS"
192192
LIBS="$opal_pmix_LIBS_save $opal_pmix_LIBS"
193193
194+
opal_pmix_min_num_version=OMPI_PMIX_NUMERIC_MIN_VERSION
195+
opal_pmix_min_version=OMPI_PMIX_MIN_VERSION
194196
AS_IF([test "$opal_pmix_external_support" = "yes"],
195-
[AC_MSG_CHECKING([if external PMIx version is 3.1.5 or greater])
197+
[AC_MSG_CHECKING([if external PMIx version is OMPI_PMIX_MIN_VERSION or greater])
196198
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pmix_version.h>
197199
]], [[
198-
#if PMIX_NUMERIC_VERSION < 0x00030105
199-
#error "pmix API version is less than 3.1.5"
200+
#if PMIX_NUMERIC_VERSION < $opal_pmix_min_num_version
201+
#error "pmix API version is less than $opal_pmix_min_version"
200202
#endif
201203
]])],
202204
[AC_MSG_RESULT([yes])],

docs/conf.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@
4444
ompi_series = f"v{ompi_data['major']}.{ompi_data['minor']}.x"
4545
ompi_ver = f"v{ompi_data['major']}.{ompi_data['minor']}.{ompi_data['release']}{ompi_data['greek']}"
4646

47+
pmix_min_version = f"{ompi_data['pmix_min_version']}"
48+
prte_min_version = f"{ompi_data['prte_min_version']}"
49+
hwloc_min_version = f"{ompi_data['hwloc_min_version']}"
50+
event_min_version = f"{ompi_data['event_min_version']}"
51+
automake_min_version = f"{ompi_data['automake_min_version']}"
52+
autoconf_min_version = f"{ompi_data['autoconf_min_version']}"
53+
libtool_min_version = f"{ompi_data['libtool_min_version']}"
54+
flex_min_version = f"{ompi_data['flex_min_version']}"
55+
4756
# "release" is a sphinx config variable: assign it to the computed
4857
# Open MPI version number. The ompi_ver string begins with a "v"; the
4958
# Sphinx release variable should not include this prefix "v".
@@ -179,4 +188,12 @@ def _doit(topdir):
179188
.. |year| replace:: {year}
180189
.. |ompi_ver| replace:: {ompi_ver}
181190
.. |ompi_series| replace:: {ompi_series}
191+
.. |pmix_min_version| replace:: {pmix_min_version}
192+
.. |prte_min_version| replace:: {prte_min_version}
193+
.. |hwloc_min_version| replace:: {hwloc_min_version}
194+
.. |event_min_version| replace:: {event_min_version}
195+
.. |automake_min_version| replace:: {automake_min_version}
196+
.. |autoconf_min_version| replace:: {autoconf_min_version}
197+
.. |libtool_min_version| replace:: {libtool_min_version}
198+
.. |flex_min_version| replace:: {flex_min_version}
182199
"""

docs/developers/prerequisites.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ must be installed (i.e., `GNU Autoconf
2020
<https://www.gnu.org/software/automake/>`_, and `GNU Libtool
2121
<https://www.gnu.org/software/libtool/>`_).
2222

23+
.. list-table::
24+
:header-rows: 1
25+
:widths: 10 10
26+
27+
* - Tool
28+
- Minimum version
29+
* - Autoconf
30+
- |autoconf_min_version|
31+
* - Automake
32+
- |automake_min_version|
33+
* - Libtool
34+
- |libtool_min_version|
35+
2336
.. note:: The GNU Autotools are *not* required when building Open MPI
2437
from distribution tarballs. Open MPI distribution tarballs
2538
are bootstrapped such that end-users do not need to have the
@@ -38,6 +51,8 @@ more detail.
3851
Flex
3952
----
4053

54+
Minimum supported version: |flex_min_version|.
55+
4156
`Flex <https://github.com/westes/flex>`_ is used during the
4257
compilation of a developer's checkout (it is not used to build
4358
official distribution tarballs). Other flavors of lex are *not*
@@ -49,7 +64,7 @@ Note that no testing has been performed to see what the minimum
4964
version of Flex is required by Open MPI. We suggest that you use
5065
v2.5.35 at the earliest.
5166

52-
For now, Open MPI will allow developer builds with Flex 2.5.4. This
67+
For now, Open MPI will allow developer builds with Flex |flex_min_version|. This
5368
is primarily motivated by the fact that RedHat/CentOS 5 ships with
5469
Flex 2.5.4. It is likely that someday Open MPI developer builds will
5570
require Flex version >=2.5.35.

0 commit comments

Comments
 (0)