Skip to content

Commit b2c26c5

Browse files
authored
Merge pull request #10748 from awlauria/minor_version_cleanup
Export MPI_VERSION to docs.
2 parents f3a8543 + abe62d2 commit b2c26c5

File tree

7 files changed

+33
-38
lines changed

7 files changed

+33
-38
lines changed

autogen.pl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,12 @@ sub export_version {
10901090
$m4 .= "m4_define([OMPI_${name}_NUMERIC_MIN_VERSION], [$hex])\n";
10911091
}
10921092

1093+
sub export_mpi_version {
1094+
my ($name,$version) = @_;
1095+
$version =~ s/[^a-zA-Z0-9,.]//g;
1096+
$m4 .= "m4_define([$name], [$version])\n";
1097+
}
1098+
10931099
sub get_and_define_min_versions() {
10941100

10951101
open(IN, "VERSION") || my_die "Can't open VERSION";
@@ -1131,6 +1137,16 @@ ()
11311137
export_version("EVENT", $fields[1]);
11321138
}
11331139
}
1140+
elsif($fields[0] eq "mpi_standard_version") {
1141+
if ($fields[1] ne "\n") {
1142+
export_mpi_version("MPI_VERSION_NUM", $fields[1]);
1143+
}
1144+
}
1145+
elsif($fields[0] eq "mpi_standard_subversion") {
1146+
if ($fields[1] ne "\n") {
1147+
export_mpi_version("MPI_SUBVERSION_NUM", $fields[1]);
1148+
}
1149+
}
11341150
}
11351151
close(IN);
11361152
}

config/opal_get_version.m4

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -100,27 +100,3 @@ m4_define([OPAL_GET_VERSION],[
100100
[AC_MSG_RESULT([$$2_REPO_REV])])
101101
fi
102102
])
103-
104-
# OPAL_GET_MPI_STANDARD_VERSION(version_file)
105-
# -----------------------------------------------
106-
# parse version_file for MPI Standard version information, setting
107-
# the following shell variables:
108-
#
109-
# MPI_VERSION
110-
# MPI_SUBVERSION
111-
m4_define([OPAL_GET_MPI_STANDARD_VERSION],[
112-
dnl quote eval to suppress macro expansion with non-GNU m4
113-
if test -f "$1"; then
114-
srcdir=`dirname $1`
115-
mpi_standard_vers=`sed -n "
116-
t clear
117-
: clear
118-
s/^mpi_standard_version/MPI_VERSION/
119-
s/^mpi_standard_subversion/MPI_SUBVERSION/
120-
t print
121-
b
122-
: print
123-
p" < "$1"`
124-
[eval] "$mpi_standard_vers"
125-
fi
126-
])

config/opal_save_version.m4

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,17 @@ AC_DEFUN([OPAL_SAVE_VERSION], [
6666

6767
# OPAL_SAVE_MPI_STANDARD_VERSION(version_file)
6868
# ----------------------------------------------
69-
# creates version information for project from version_file, using
70-
# OPAL_GET_MPI_STANDARD_VERSION().
69+
# Export MPI versions.
7170
AC_DEFUN([OPAL_SAVE_MPI_STANDARD_VERSION], [
72-
OPAL_GET_MPI_STANDARD_VERSION([$1])
73-
74-
AC_SUBST([MPI_VERSION])
75-
AC_SUBST([MPI_SUBVERSION])
7671

77-
AC_DEFINE_UNQUOTED([MPI_VERSION], [$MPI_VERSION],
72+
AC_DEFINE_UNQUOTED([MPI_VERSION], [MPI_VERSION_NUM],
7873
[MPI Standard Major version number])
79-
AC_DEFINE_UNQUOTED([MPI_SUBVERSION], [$MPI_SUBVERSION],
74+
AC_DEFINE_UNQUOTED([MPI_SUBVERSION], [MPI_SUBVERSION_NUM],
8075
[MPI Standard Minor version number])
8176

77+
AC_SUBST([MPI_VERSION])
78+
AC_SUBST([MPI_SUBVERSION])
79+
8280
AC_MSG_CHECKING([MPI Standard version])
83-
AC_MSG_RESULT([$MPI_VERSION.$MPI_SUBVERSION])
81+
AC_MSG_RESULT([MPI_VERSION_NUM.MPI_SUBVERSION_NUM])
8482
])dnl

docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
autoconf_min_version = f"{ompi_data['autoconf_min_version']}"
5353
libtool_min_version = f"{ompi_data['libtool_min_version']}"
5454
flex_min_version = f"{ompi_data['flex_min_version']}"
55+
mpi_standard_version = f"{ompi_data['mpi_standard_version']}"
56+
mpi_standard_subversion = f"{ompi_data['mpi_standard_subversion']}"
5557

5658
# "release" is a sphinx config variable: assign it to the computed
5759
# Open MPI version number. The ompi_ver string begins with a "v"; the
@@ -196,4 +198,7 @@ def _doit(topdir):
196198
.. |autoconf_min_version| replace:: {autoconf_min_version}
197199
.. |libtool_min_version| replace:: {libtool_min_version}
198200
.. |flex_min_version| replace:: {flex_min_version}
201+
.. |mpi_standard_version| replace:: {mpi_standard_version}
202+
.. |mpi_standard_subversion| replace:: {mpi_standard_subversion}
203+
199204
"""

docs/man-openmpi/man3/MPI_Get_version.3.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Output Parameters
5454
Description
5555
-----------
5656

57-
Since Open MPI is MPI 3.1 compliant, this function will return a
58-
``version`` value of 3 and a subversion value of 1 for this release.
57+
Since Open MPI is MPI-|mpi_standard_version|.|mpi_standard_subversion| compliant, this function will return a
58+
``version`` value of |mpi_standard_version| and a subversion value of |mpi_standard_subversion| for this release.
5959

6060
Note
6161
----

docs/man-openmpi/man5/Open-MPI.5.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ message-passing programs that would be efficient, flexible, and
2323
portable.
2424

2525
The outcome, known as the MPI Standard, was first published in 1993; its
26-
most recent version (MPI-3.1) was published in June 2015. Open MPI
27-
includes all MPI 3.1-compliant routines.
26+
most recent version (MPI-4.0) was published in June 2021. Open MPI
27+
includes all MPI |mpi_standard_version|.|mpi_standard_subversion|-compliant routines.
2828

2929
For more information about Open MPI, see https://www.open-mpi.org.
3030

docs/release-notes/mpi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MPI Functionality and Features
44
MPI Standard conformance
55
------------------------
66

7-
In the Open MPI |ompi_series| series, all MPI-3.1 functionality is
7+
In the Open MPI |ompi_series| series, all MPI-|mpi_standard_version|.|mpi_standard_subversion| functionality is
88
supported. Some MPI-4.0 functionality is supported, but not all of
99
it.
1010

0 commit comments

Comments
 (0)