Skip to content

Commit c5d8037

Browse files
committed
build: Move PRRTE to a 3rd-party package
With Open MPI 5.0, the decision was made to stop building 3rd-party packages, such as Libevent, HWLOC, PMIx, and PRRTE as MCA components and instead 1) start relying on external libraries whenever possible and 2) Open MPI builds the 3rd party libraries (if needed) as independent libraries, rather than linked into libopen-pal. This patch moves the prrte submodule from the top-level to the 3rd-party directory, to match the behavior of other 3rd-party packages like Libevent and PMIx. Since Open MPI does not support building with an external PRRTE, that functionality is skipped in this patch. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 8f89d15 commit c5d8037

File tree

8 files changed

+130
-171
lines changed

8 files changed

+130
-171
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[submodule "prrte"]
2-
path = prrte
2+
path = 3rd-party/prrte
33
url = https://github.com/openpmix/prrte
44
branch = master
55
[submodule "openpmix"]

3rd-party/prrte

Submodule prrte added at 545863e

Makefile.am

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,7 @@
2323
#
2424

2525
SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_SUBDIRS) test
26-
if OMPI_WANT_PRRTE
27-
SUBDIRS += prrte
28-
endif
29-
3026
DIST_SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_DIST_SUBDIRS) test
31-
if OMPI_WANT_PRRTE
32-
DIST_SUBDIRS += prrte
33-
endif
3427
EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE autogen.pl README.JAVA.txt AUTHORS
3528

3629
include examples/Makefile.include

autogen.pl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,10 +1179,6 @@ sub in_tarball {
11791179
$no_ompi_arg = 1;
11801180
debug "No ompi subdirectory found - will not build MPI layer\n";
11811181
}
1182-
if (! -e "prrte") {
1183-
$no_prrte_arg = 1;
1184-
debug "No prrte subdirectory found - will not build PRRTE\n";
1185-
}
11861182
if (! -e "oshmem") {
11871183
$no_oshmem_arg = 1;
11881184
debug "No oshmem subdirectory found - will not build OSHMEM\n";
@@ -1415,9 +1411,6 @@ sub in_tarball {
14151411
foreach my $p (@$projects) {
14161412
$m4 .= "m4_define([project_$p->{name}], [1])\n";
14171413
}
1418-
if (!$no_prrte_arg) {
1419-
$m4 .= "m4_define([project_prrte], [1])\n";
1420-
}
14211414

14221415
$m4 .= "\ndnl Project names
14231416
m4_define([project_name_long], [$project_name_long])
@@ -1490,6 +1483,19 @@ sub in_tarball {
14901483
verbose "--- PMIx enabled\n";
14911484
}
14921485

1486+
verbose "=== PRRTE\n";
1487+
if ("prrte" ~~ @disabled_3rdparty_packages) {
1488+
verbose "--- PRRTE disabled\n";
1489+
} else {
1490+
# sanity check prrte files exist
1491+
if (! -f "3rd-party/prrte/configure.ac") {
1492+
my_die("Could not find pmix files\n");
1493+
}
1494+
push(@subdirs, "3rd-party/prrte/");
1495+
$m4 .= "m4_define([package_prrte], [1])\n";
1496+
verbose "--- PRRTE enabled\n";
1497+
}
1498+
14931499
$m4 .= "\n";
14941500

14951501
#---------------------------------------------------------------------------
@@ -1511,10 +1517,6 @@ sub in_tarball {
15111517
++$step;
15121518
verbose "\n$step. Processing autogen.subdirs directories\n";
15131519

1514-
if (!$no_prrte_arg) {
1515-
process_autogen_subdirs(".");
1516-
}
1517-
15181520
if ($#subdirs >= 0) {
15191521
foreach my $d (@subdirs) {
15201522
process_subdir($d);

config/ompi_deprecated_options.m4

Lines changed: 0 additions & 34 deletions
This file was deleted.

config/ompi_setup_prrte.m4

Lines changed: 114 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,99 @@
2525
# $HEADER$
2626
#
2727

28+
# Check for / configure PRRTE package. Unlike the other 3rd party
29+
# packages, prrte is either internal or not used (since prrte is a
30+
# pmix server, we don't need to link against it or such in the
31+
# external case). So we don't have to do some of the complex steps we
32+
# do for pmix or hwloc in terms of external hunting.
33+
#
34+
# This macro will not change the environment.
35+
#
36+
# A Makefile conditional OMPI_WANT_PRRTE will be defined based on the
37+
# results of the build. Unless --disable-internal-rte is specified,
38+
# the top-level configure will abort if the PRRTE configure fails.
2839
AC_DEFUN([OMPI_SETUP_PRRTE],[
29-
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static opal_prrte_extra_libs opal_prrte_extra_ltlibs opal_prrte_extra_ldflags])
40+
OPAL_VAR_SCOPE_PUSH([internal_prrte_build])
41+
42+
internal_prrte_build=0
43+
m4_ifdef([package_prrte],
44+
[OMPI_SETUP_PRRTE_INTERNAL([internal_prrte_build=1], [internal_prrte_build=0])])
45+
46+
AM_CONDITIONAL([OMPI_WANT_PRRTE], [test "$internal_prrte_build" = "1"])
47+
48+
OPAL_VAR_SCOPE_POP
49+
])
50+
51+
AC_DEFUN([OMPI_SETUP_PRRTE_INTERNAL], [
52+
OPAL_VAR_SCOPE_PUSH([internal_prrte_args internal_prrte_extra_libs internal_prrte_happy deprecated_prefix_by_default print_prrte_warning])
3053

31-
opal_prrte_save_CFLAGS=$CFLAGS
32-
opal_prrte_save_CPPFLAGS=$CPPFLAGS
33-
opal_prrte_save_LDFLAGS=$LDFLAGS
34-
opal_prrte_save_LIBS=$LIBS
35-
opal_prrte_save_enable_dlopen=enable_dlopen
36-
opal_prrte_save_enable_mca_dso=enable_mca_dso
37-
opal_prrte_save_enable_mca_static=enable_mca_static
54+
opal_show_subtitle "Configuring PRRTE"
3855

3956
AC_ARG_ENABLE([internal-rte],
4057
[AC_HELP_STRING([--enable-internal-rte],
4158
[Enable internal runtime support and provide mpiexec/mpirun (default: enabled)])])
4259

43-
AC_ARG_WITH([prrte-platform],
44-
[AC_HELP_STRING([--with-prrte-platform],
45-
[Platform file to use when building the internal PRRTE runtime support])])
46-
60+
# This is really a PRTE option that should not be in Open MPI, but
61+
# there is not a great way to support the orterun/mpirun checks
62+
# without this argument.
4763
AC_ARG_ENABLE([prte-prefix-by-default],
4864
[AC_HELP_STRING([--enable-prte-prefix-by-default],
49-
[Make "mpirun ..." behave exactly the same as "mpirun --prefix \$prefix" (where \$prefix is the value given to --prefix in configure) (default:enabled)])])
50-
51-
AC_MSG_CHECKING([if RTE support is enabled])
52-
AS_IF([test "$enable_internal_rte" != "no"],
53-
[AC_MSG_RESULT([yes])
54-
ompi_want_prrte=yes
55-
opal_prrte_extra_libs=
56-
opal_prrte_extra_ltlibs=
57-
58-
AS_IF([test "$opal_libevent_mode" = "internal"],
59-
[opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_libevent_LIBS"
60-
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_libevent_LIBS"
61-
62-
AS_IF([test ! -z "$opal_libevent_header"]
63-
[opal_prrte_libevent_arg="--with-libevent-header=$opal_libevent_header"])],
64-
[opal_prrte_libevent_arg="--with-libevent=$with_libevent"
65-
AS_IF([test ! -z "$with_libevent_libdir"],
66-
[opal_prrte_libevent_arg="$opal_prrte_libevent_arg --with-libevent-libdir=$with_libevent_libdir"])])
67-
68-
AS_IF([test "$opal_hwloc_mode" = "internal"],
69-
[opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_hwloc_LIBS"
70-
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_hwloc_LIBS"
71-
72-
AS_IF([test ! -z "$opal_hwloc_header"],
73-
[opal_prrte_hwloc_arg="--with-hwloc-header=$opal_hwloc_header"])],
74-
[opal_prrte_hwloc_arg="--with-hwloc=$with_hwloc"
75-
AS_IF([test ! -z "$with_hwloc_libdir"],
76-
[opal_prrte_hwloc_arg="$opal_prrte_hwloc_arg --with-hwloc-libdir=$with_hwloc_libdir"])])
77-
78-
AS_IF([test "$opal_pmix_mode" = "internal"],
79-
[opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_pmix_LIBS"
80-
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_pmix_LIBS"
81-
82-
AS_IF([test ! -z "$opal_pmix_header"],
83-
[opal_prrte_pmix_arg="--with-pmix-header=$opal_pmix_header"])],
84-
[OPAL_VAR_SCOPE_PUSH([opal_prrte_CPPFLAGS_save])
85-
opal_prrte_CPPFLAGS_save=$CPPFLAGS
86-
87-
AC_MSG_CHECKING([if external PMIx version is 3.0.0 or greater])
88-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pmix_version.h>]],
65+
[Make "mpirun ..." behave exactly the same as "mpirun --prefix \$prefix", where \$prefix is the value given to --prefix in configure (default:enabled)])])
66+
67+
AC_ARG_ENABLE([orterun-prefix-by-default],
68+
[AC_HELP_STRING([--enable-orterun-prefix-by-default],
69+
[*DEPRECATED* Please use --enable-prte-prefix-by-default in the future.])],
70+
[print_prrte_warning="yes"
71+
deprecated_prefix_by_default=$orterun_prefix_by_default])
72+
73+
AC_ARG_ENABLE([mpirun-prefix-by-default],
74+
[AC_HELP_STRING([--enable-mpirun-prefix-by-default],
75+
[*DEPRECATED* Please use --enable-prte-prefix-by-default in the future.])],
76+
[print_prrte_warning="yes"
77+
deprecated_prefix_by_default=$mpirun_prefix_by_default])
78+
79+
AS_IF([test "$print_prrte_warning" = "yes"], [
80+
AC_MSG_WARN([Open MPI no longer uses the ORTE environment - it has been])
81+
AC_MSG_WARN([replaced by PRRTE. Accordingly, the "--enable-orterun-prefix-by-default"])
82+
AC_MSG_WARN([and "--enable-mpirun-prefix-by-default" options have been replaced])
83+
AC_MSG_WARN([by "--enable-prte-prefix-by-default". We will do the translation for])
84+
AC_MSG_WARN([you now, but these older options are deprecated and will be removed])
85+
AC_MSG_WARN([in a later release, so please update your build scripts.])])
86+
87+
AS_IF([test -n "$prte_prefix_by_default" -a -n "$deprecated_prefix_by_default"],
88+
[AC_MSG_ERROR([--enable-prte-prefix-by-default cannot be used with --enable-mpirun-prefix-by-default or --enable-orterun-prefix-by-default. Please only specify --enable-prte-prefix-by-default.])])
89+
90+
internal_prrte_happy="yes"
91+
AS_IF([test "$enable_internal_rte" = "no"],
92+
[internal_prrte_happy="no"])
93+
94+
internal_prrte_args="--with-proxy-version-string=$OPAL_VERSION --with-proxy-package-name=\"Open MPI\" --with-proxy-bugreport=\"https://www.open-mpi.org/community/help/\""
95+
internal_prrte_libs=
96+
97+
# Set --enable-prte-prefix-by-default to the deprecated options,
98+
# if they were specified. Otherwise, set it to enabled if the
99+
# user did not specify an option. PRTE defaults to not enabling
100+
# prefix-by-default, but open mpi wants that behavior.
101+
AS_IF([test -n "$deprecated_prefix_by_default"],
102+
[internal_prrte_args="internal_prrte_args --enable-prte-prefix-by-default=$deprecated_prefix_by_default"],
103+
[test -z "$enable_prte_prefix_by_default"],
104+
[internal_prrte_args="$internal_prrte_args --enable-prte-prefix-by-default"])
105+
106+
AS_IF([test "$opal_libevent_mode" = "internal"],
107+
[internal_prrte_args="$internal_prrte_args --with-libevent-header=$opal_libevent_header"
108+
internal_prrte_libs="$internal_prrte_libs $opal_libevent_LIBS"])
109+
110+
AS_IF([test "$opal_hwloc_mode" = "internal"],
111+
[internal_prrte_args="$internal_prrte_args --with-hwloc-header=$opal_hwloc_header"
112+
internal_prrte_libs="$internal_prrte_libs $opal_hwloc_LIBS"])
113+
114+
AS_IF([test "$opal_pmix_mode" = "internal"],
115+
[internal_prrte_args="$internal_prrte_args --with-pmix-header=$opal_pmix_header"
116+
internal_prrte_libs="$internal_prrte_libs $opal_pmix_LIBS"])
117+
118+
AS_IF([test "$internal_prrte_happy" = "yes"],
119+
[AC_MSG_CHECKING([if PMIx version is 4.0.0 or greater])
120+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pmix_version.h>]],
89121
[[
90122
#if PMIX_VERSION_MAJOR < 4L
91123
#error "pmix API version is less than 4.0.0"
@@ -99,58 +131,36 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
99131
AC_MSG_WARN([version of PMIx for strictly direct-launch purposes - e.g., using)])
100132
AC_MSG_WARN([Slurm's srun to launch the job - by configuring with the])
101133
AC_MSG_WARN([--disable-internal-rte option.])
102-
AC_MSG_ERROR([Cannot continue])])
103-
104-
CPPFLAGS=$opal_prrte_CPPFLAGS_save
105-
106-
OPAL_VAR_SCOPE_POP
107-
108-
opal_prrte_pmix_arg="--with-pmix=$with_pmix"
109-
AS_IF([test ! -z "$with_pmix_libdir"],
110-
[opal_prrte_pmix_arg="$opal_prrte_pmix_arg --with-pmix-libdir=$with_pmix_libdir"])])
111-
112-
if test -z $enable_prte_prefix_by_default || test "$enable_prte_prefix_by_default" = "yes" ||
113-
test "$enable_orterun_prefix_given" = "yes"; then
114-
opal_prrte_prefix_arg="--enable-prte-prefix-by-default"
115-
else
116-
opal_prrte_prefix_arg=
117-
fi
118-
119-
opal_prrte_args="--prefix=$prefix --with-proxy-version-string=$OPAL_VERSION --with-proxy-package-name=\"Open MPI\" --with-proxy-bugreport=\"https://www.open-mpi.org/community/help/\" $opal_prrte_prefix_arg $opal_prrte_libevent_arg $opal_prrte_hwloc_arg $opal_prrte_pmix_arg"
120-
AS_IF([test "$enable_debug" = "yes"],
121-
[opal_prrte_args="--enable-debug $opal_prrte_args"
122-
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
123-
[opal_prrte_args="--disable-debug $opal_prrte_args"
124-
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"])
125-
AS_IF([test "$with_devel_headers" = "yes"],
126-
[opal_prrte_args="--with-devel-headers $opal_prrte_args"])
127-
if test ! -z $with_prrte_platform && test "$with_prrte_platform" != "yes"; then
128-
opal_prrte_args="$opal_prrte_args --with-platform=$with_prrte_platform"
129-
fi
130-
# add the extra libs
131-
opal_prrte_args="$opal_prrte_args --with-prte-extra-lib=\"$opal_prrte_extra_libs\" --with-prte-extra-ltlib=\"$opal_prrte_extra_ltlibs\""
132-
133-
AC_MSG_CHECKING([final prrte configure args])
134-
AC_MSG_RESULT([$opal_prrte_args])
135-
136-
CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS"
137-
OPAL_CONFIG_SUBDIR([prrte],
138-
[$opal_prrte_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'],
139-
[opal_prrte_happy=1], [opal_prrte_happy=0])
140-
141-
OPAL_SUMMARY_ADD([[Miscellaneous]],[[PRRTE]],[prrte],[yes])],
142-
[OPAL_SUMMARY_ADD([[Miscellaneous]],[[PRRTE]],[prrte],[no (disabled)])
143-
AC_MSG_RESULT([no (disabled)])
144-
ompi_want_prrte=no])
145-
146-
CFLAGS=$opal_prrte_save_CFLAGS
147-
CPPFLAGS=$opal_prrte_save_CPPFLAGS
148-
LDFLAGS=$opal_prrte_save_LDFLAGS
149-
LIBS=$opal_prrte_save_LIBS
150-
enable_dlopen=$opal_prrte_save_enable_dlopen
151-
enable_mca_dso=$opal_prrte_save_enable_mca_dso
152-
enable_mca_static=$opal_prrte_save_enable_mca_static
134+
AC_MSG_ERROR([Cannot continue])])])
153135

154-
OPAL_VAR_SCOPE_POP
136+
dnl AS_IF([test ! -z $with_prrte_platform && test "$with_prrte_platform" != "yes"],
137+
dnl [internal_prrte_args="$internal_prrte_args --with-platform=$with_prrte_platform"])
138+
139+
# add the extra libs
140+
internal_prrte_args="$internal_prrte_args --with-prte-extra-lib=\"$internal_prrte_libs\" --with-prte-extra-ltlib=\"$internal_prrte_libs\""
141+
142+
# Pass all our compiler/linker flags to PRRTE, so that it
143+
# picks up how to build an internal HWLOC, libevent, and PMIx, plus
144+
# picks up any user-specified compiler flags from the master
145+
# configure run.
146+
export CFLAGS CPPFLAGS LDFLAGS
147+
PAC_CONFIG_SUBDIR_ARGS([3rd-party/prrte], [$internal_prrte_args],
148+
[[--with-libevent=internal], [--with-hwloc=internal],
149+
[--with-libevent=external], [--with-hwloc=external],
150+
[--with-pmix=internal], [--with-pmix=external],
151+
[--with-platform=.*]],
152+
[], [internal_prrte_happy="no"])
153+
OPAL_3RDPARTY_DIST_SUBDIRS="$OPAL_3RDPARTY_DIST_SUBDIRS prrte"
155154

155+
AS_IF([test "$internal_prrte_happy" = "no" -a "$enable_internal_rte" != "no"],
156+
[AC_MSG_ERROR([PRRTE configuration failed. Cannot continue.])])
157+
158+
AS_IF([test "$internal_prrte_happy" = "yes"],
159+
[OPAL_3RDPARTY_SUBDIRS="$OPAL_3RDPARTY_SUBDIRS prrte"
160+
$1],
161+
[$2])
162+
163+
OPAL_SUMMARY_ADD([[Miscellaneous]], [[PRRTE]], [prrte], [$internal_prrte_happy])
164+
165+
OPAL_VAR_SCOPE_POP
156166
])

configure.ac

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ fi
198198

199199
# Check for deprecated/deleted options
200200
OMPI_CHECK_DELETED_OPTIONS
201-
OMPI_CHECK_DEPRECATED_OPTIONS
202201

203202
# Setup the top of the opal/include/opal_config.h file
204203

@@ -1111,6 +1110,7 @@ OPAL_3RDPARY_DISTCLEAN_DIRS=
11111110
OPAL_CONFIG_LIBEVENT
11121111
OPAL_CONFIG_HWLOC
11131112
OPAL_CONFIG_PMIX
1113+
OMPI_SETUP_PRRTE
11141114

11151115
AC_SUBST(OPAL_3RDPARTY_SUBDIRS)
11161116
AC_SUBST(OPAL_3RDPARTY_DIST_SUBDIRS)
@@ -1269,18 +1269,6 @@ AC_SUBST(OPAL_DYN_LIB_SUFFIX)
12691269
# Need the libtool executable before the rpathify stuff
12701270
LT_OUTPUT
12711271

1272-
##################################
1273-
# PRRTE support
1274-
##################################
1275-
1276-
opal_show_title "Setup PRRTE support"
1277-
1278-
m4_ifdef([project_prrte],
1279-
[OMPI_SETUP_PRRTE],
1280-
[OPAL_SUMMARY_ADD([[Miscellaneous]],[[PRRTE]],[prrte],[no (disabled)])
1281-
ompi_want_prrte=no])
1282-
AM_CONDITIONAL(OMPI_WANT_PRRTE, test "$ompi_want_prrte" = "yes")
1283-
12841272
############################################################################
12851273
# final compiler config
12861274
############################################################################

prrte

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)