Skip to content

Commit f8a6218

Browse files
Gerardo Garciahppritcha
authored andcommitted
uofl: changes to Open MPI and move prrte/pmix shas
This PR adds Univ. of Louisville capstone class mods to Open MPI as well as pointing 3rd-party/prrte to 0f79f3a and moves the 3rd-party/openpmix to be the v6.0.0 release. Signed-off-by: Gerardo Garcia <[email protected]> Signed-off-by: Howard Pritchard <[email protected]>
1 parent a4a7e25 commit f8a6218

File tree

8 files changed

+100
-60
lines changed

8 files changed

+100
-60
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "prrte"]
22
path = 3rd-party/prrte
33
url = ../../open-mpi/prrte
4-
branch = master
4+
branch = ompi_main
55
[submodule "openpmix"]
66
path = 3rd-party/openpmix
77
url = ../../openpmix/openpmix.git

3rd-party/openpmix

Submodule openpmix updated 407 files

3rd-party/prrte

Submodule prrte updated 470 files

config/ompi_setup_prrte.m4

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
2121
dnl Copyright (c) 2021-2022 IBM Corporation. All rights reserved.
2222
dnl Copyright (c) 2023-2024 Jeffrey M. Squyres. All rights reserved.
2323
dnl Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
24+
dnl Copyright (c) 2025 Triad National Security, LLC. All rights
25+
dnl reserved.
2426
dnl $COPYRIGHT$
2527
dnl
2628
dnl Additional copyrights may follow
@@ -118,10 +120,19 @@ OPAL_VAR_SCOPE_PUSH([prrte_setup_internal_happy prrte_setup_external_happy targe
118120
[$OMPI_USING_INTERNAL_PRRTE],
119121
[Whether or not we are using the internal PRRTE])
120122
123+
AM_CONDITIONAL(OMPI_USING_INTERNAL_PRRTE, [test $OMPI_USING_INTERNAL_PRRTE -eq 1])
124+
121125
AC_SUBST(OMPI_PRRTE_RST_CONTENT_DIR)
122126
AC_SUBST(OMPI_SCHIZO_OMPI_RST_CONTENT_DIR)
123127
AM_CONDITIONAL(OMPI_HAVE_PRRTE_RST, [test $OMPI_HAVE_PRRTE_RST -eq 1])
124128
129+
dnl
130+
dnl If using external prrte that supports prte_launch or using internal prtte then
131+
dnl set OMPI_HAVE_PRTE_LAUNCH
132+
dnl
133+
AS_IF([test "$setup_pprte_external_has_prte_launch" = "1" -o "$prrte_setup_internal_happy" = "1"],
134+
[AC_DEFINE_UNQUOTED([OMPI_HAVE_PRTE_LAUNCH], [1], [Whether prte_launch support available])])
135+
125136
OPAL_SUMMARY_ADD([Miscellaneous], [PRRTE], [], [$opal_prrte_mode])
126137
127138
OPAL_VAR_SCOPE_POP
@@ -297,6 +308,11 @@ AC_DEFUN([_OMPI_SETUP_PRRTE_EXTERNAL], [
297308
AS_IF([test "${ompi_setup_prrte_cv_version_happy}" = "no"],
298309
[setup_prrte_external_happy="no"])])
299310
311+
AS_IF([test "${setup_prrte_external_happy}" = "yes"],
312+
[AC_CHECK_DECL([prte_launch],
313+
[setup_prrte_external_has_prte_launch=1], [setup_pprte_external_has_prte_launch=0],
314+
[#include "prte.h"])],[])
315+
300316
CPPFLAGS="$opal_prrte_CPPFLAGS_save"
301317
302318
# If an external build and the user told us where to find PRRTE,

ompi/dpm/dpm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1975,7 +1975,10 @@ static char *find_prte(void)
19751975
#if OMPI_USING_INTERNAL_PRRTE
19761976
/* 2) If using internal PRRTE, use our bindir. Note that this
19771977
* will obey OPAL_PREFIX and OPAL_DESTDIR */
1978-
opal_asprintf(&filename, "%s%sprte", opal_install_dirs.bindir, OPAL_PATH_SEP);
1978+
/*
1979+
* TODO: HPP replace hard-wired prrte prefix with something configurable
1980+
*/
1981+
opal_asprintf(&filename, "%s%sompi-prte", opal_install_dirs.bindir, OPAL_PATH_SEP);
19791982
return filename;
19801983
#else
19811984

ompi/tools/mpirun/Makefile.am

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,28 @@
1414

1515
if OMPI_WANT_PRRTE
1616

17+
#
18+
# to help VPATH'd builds find prrte_version.h
19+
#
20+
AM_CFLAGS = \
21+
-I$(top_srcdir)/3rd-party/prrte/include -I$(includedir)
22+
1723
bin_PROGRAMS = mpirun
1824

1925
EXTRA_DIST = help-mpirun.txt
2026

2127
mpirun_SOURCES = \
2228
main.c
2329

30+
#
31+
# TODO: HPP replace hard-wired prrte prefix with something configurable
32+
#
2433
mpirun_LDADD = \
2534
$(top_builddir)/opal/libopen-pal_core.la
35+
if OMPI_USING_INTERNAL_PRRTE
36+
mpirun_LDADD += \
37+
$(top_builddir)/3rd-party/prrte/src/libompi-prrte.la
38+
endif
2639

2740
mpirun_CPPFLAGS = \
2841
-DMCA_oshmem_FRAMEWORKS="\"$(MCA_oshmem_FRAMEWORKS)\"" \

ompi/tools/mpirun/help-mpirun.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
# This is the US/English help file for Open MPI wrapper compiler error
1111
# messages.
1212
#
13+
[prte-launch-failed]
14+
Open MPI's mpirun command was unable to launch the user's application.
15+
This may indicate an issue with the environment or incorrect configuration.
16+
17+
Error Message: %s
18+
#
1319
[no-prterun-found]
1420
Open MPI's mpirun command was unable to find an underlying prterun
1521
command to execute. Consider setting the OMPI_PRTERUN environment

ompi/tools/mpirun/main.c

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -28,47 +28,10 @@
2828
#include "opal/util/printf.h"
2929
#include "opal/util/show_help.h"
3030
#include "ompi/constants.h"
31-
32-
static char *find_prterun(void)
33-
{
34-
char *filename = NULL;
35-
#if !OMPI_USING_INTERNAL_PRRTE
36-
char *prrte_prefix = NULL;
31+
#if OMPI_HAVE_PRTE_LAUNCH
32+
#include "prte.h"
3733
#endif
3834

39-
/* 1) Did the user tell us exactly where to find prterun? */
40-
filename = getenv("OMPI_PRTERUN");
41-
if (NULL != filename) {
42-
return filename;
43-
}
44-
45-
#if OMPI_USING_INTERNAL_PRRTE
46-
/* 2) If using internal PRRTE, use our bindir. Note that this
47-
* will obey OPAL_PREFIX and OPAL_DESTDIR */
48-
opal_asprintf(&filename, "%s%sprterun", opal_install_dirs.bindir, OPAL_PATH_SEP);
49-
return filename;
50-
#else
51-
52-
/* 3) Look in ${PRTE_PREFIX}/bin */
53-
prrte_prefix = getenv("PRTE_PREFIX");
54-
if (NULL != prrte_prefix) {
55-
opal_asprintf(&filename, "%s%sbin%sprterun", prrte_prefix, OPAL_PATH_SEP, OPAL_PATH_SEP);
56-
return filename;
57-
}
58-
59-
/* 4) See if configure told us where to look, if set */
60-
#if defined(OMPI_PRTERUN_PATH)
61-
return strdup(OMPI_PRTERUN_PATH);
62-
#else
63-
64-
/* 5) Use path search */
65-
filename = opal_find_absolute_path("prterun");
66-
67-
return filename;
68-
#endif
69-
#endif
70-
}
71-
7235
static void append_prefixes(char ***out, const char *in)
7336
{
7437
if (NULL == in) {
@@ -115,14 +78,43 @@ static void setup_mca_prefixes(void)
11578
opal_argv_free(tmp);
11679
}
11780

81+
__opal_attribute_unused__
82+
static char *find_prterun(void)
83+
{
84+
char *filename = NULL;
85+
char *prrte_prefix = NULL;
86+
87+
/* 1) Did the user tell us exactly where to find prterun? */
88+
filename = getenv("OMPI_PRTERUN");
89+
if (NULL != filename) {
90+
return filename;
91+
}
92+
93+
/* 2) Look in ${PRTE_PREFIX}/bin */
94+
prrte_prefix = getenv("PRTE_PREFIX");
95+
if (NULL != prrte_prefix) {
96+
opal_asprintf(&filename, "%s%sbin%sprterun", prrte_prefix, OPAL_PATH_SEP, OPAL_PATH_SEP);
97+
return filename;
98+
}
99+
100+
/* 4) See if configure told us where to look, if set */
101+
#if defined(OMPI_PRTERUN_PATH)
102+
return strdup(OMPI_PRTERUN_PATH);
103+
#else
104+
105+
/* 5) Use path search */
106+
filename = opal_find_absolute_path("prterun");
107+
108+
return filename;
109+
#endif
110+
}
118111

119112
int main(int argc, char *argv[])
120113
{
121114
char *opal_prefix = getenv("OPAL_PREFIX");
122-
char *full_prterun_path = NULL;
123-
char **prterun_args = NULL;
115+
char __opal_attribute_unused__ *full_prterun_path = NULL;
116+
char __opal_attribute_unused__ **prterun_args = NULL;
124117
int ret;
125-
size_t i;
126118

127119
ret = opal_init_util(&argc, &argv);
128120
if (OMPI_SUCCESS != ret) {
@@ -154,23 +146,33 @@ int main(int argc, char *argv[])
154146
#endif
155147
}
156148

157-
full_prterun_path = find_prterun();
158-
if (NULL == full_prterun_path) {
159-
opal_show_help("help-mpirun.txt", "no-prterun-found", 1);
160-
exit(1);
161-
}
162-
163149
/*
164150
* set environment variable for our install location
165151
* used within the OMPI prrte schizo component
166152
*/
167-
168153
setenv("OMPI_LIBDIR_LOC", opal_install_dirs.libdir, 1);
169154

170155
// Set environment variable to tell PRTE what MCA prefixes belong
171156
// to Open MPI.
172157
setup_mca_prefixes();
173158

159+
#if OMPI_HAVE_PRTE_LAUNCH
160+
161+
ret = prte_launch(argc, argv);
162+
if (OMPI_SUCCESS != ret) {
163+
opal_show_help("help-mpirun.txt", "prte-launch-failed", 1, strerror(errno));
164+
exit(1);
165+
}
166+
167+
return 0;
168+
#else
169+
170+
full_prterun_path = find_prterun();
171+
if (NULL == full_prterun_path) {
172+
opal_show_help("help-mpirun.txt", "no-prterun-found", 1);
173+
exit(1);
174+
}
175+
174176
/* calling mpirun (and now prterun) with a full path has a special
175177
* meaning in terms of -prefix behavior, so copy that behavior
176178
* into prterun */
@@ -182,16 +184,16 @@ int main(int argc, char *argv[])
182184

183185
/* Copy all the mpirun arguments to prterun.
184186
* TODO: Need to handle --prefix rationally here. */
185-
for (i = 1; NULL != argv[i]; i++) {
187+
for (size_t i = 1; NULL != argv[i]; i++) {
186188
opal_argv_append_nosize(&prterun_args, argv[i]);
187189
}
188190
ret = execv(full_prterun_path, prterun_args);
189191
opal_show_help("help-mpirun.txt", "prterun-exec-failed",
190192
1, full_prterun_path, strerror(errno));
191-
exit(1);
192-
}
193-
194-
/*
193+
exit(1);
194+
#endif /* OMPI_HAVE_PRTE_LAUNCH*/
195+
}
196+
/*
195197
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
196198
* University Research and Technology
197199
* Corporation. All rights reserved.
@@ -206,9 +208,9 @@ int main(int argc, char *argv[])
206208
* Copyright (c) 2020-2022 Cisco Systems, Inc. All rights reserved
207209
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
208210
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
209-
* Copyright (c) 2022 Triad National Security, LLC. All rights
211+
* Copyright (c) 2022-2025 Triad National Security, LLC. All rights
210212
* reserved.
211-
213+
212214
* $COPYRIGHT$
213215
*
214216
* Additional copyrights may follow

0 commit comments

Comments
 (0)