Skip to content

Commit a4680dc

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 a4680dc

File tree

8 files changed

+96
-55
lines changed

8 files changed

+96
-55
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$(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: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -28,46 +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-
}
7135

7236
static void append_prefixes(char ***out, const char *in)
7337
{
@@ -115,6 +79,35 @@ static void setup_mca_prefixes(void)
11579
opal_argv_free(tmp);
11680
}
11781

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
{
@@ -154,23 +147,33 @@ int main(int argc, char *argv[])
154147
#endif
155148
}
156149

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-
163150
/*
164151
* set environment variable for our install location
165152
* used within the OMPI prrte schizo component
166153
*/
167-
168154
setenv("OMPI_LIBDIR_LOC", opal_install_dirs.libdir, 1);
169155

170156
// Set environment variable to tell PRTE what MCA prefixes belong
171157
// to Open MPI.
172158
setup_mca_prefixes();
173159

160+
#if OMPI_HAVE_PRTE_LAUNCH
161+
162+
ret = prte_launch(argc, argv);
163+
if (OMPI_SUCCESS != ret) {
164+
opal_show_help("help-mpirun.txt", "prte-launch-failed", 1, strerror(errno));
165+
exit(1);
166+
}
167+
168+
return 0;
169+
#else
170+
171+
full_prterun_path = find_prterun();
172+
if (NULL == full_prterun_path) {
173+
opal_show_help("help-mpirun.txt", "no-prterun-found", 1);
174+
exit(1);
175+
}
176+
174177
/* calling mpirun (and now prterun) with a full path has a special
175178
* meaning in terms of -prefix behavior, so copy that behavior
176179
* into prterun */
@@ -188,10 +191,10 @@ int main(int argc, char *argv[])
188191
ret = execv(full_prterun_path, prterun_args);
189192
opal_show_help("help-mpirun.txt", "prterun-exec-failed",
190193
1, full_prterun_path, strerror(errno));
191-
exit(1);
192-
}
193-
194-
/*
194+
exit(1);
195+
#endif /* OMPI_HAVE_PRTE_LAUNCH*/
196+
}
197+
/*
195198
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
196199
* University Research and Technology
197200
* Corporation. All rights reserved.
@@ -206,9 +209,9 @@ int main(int argc, char *argv[])
206209
* Copyright (c) 2020-2022 Cisco Systems, Inc. All rights reserved
207210
* Copyright (c) 2021 Nanook Consulting. All rights reserved.
208211
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates. All Rights reserved.
209-
* Copyright (c) 2022 Triad National Security, LLC. All rights
212+
* Copyright (c) 2022-2025 Triad National Security, LLC. All rights
210213
* reserved.
211-
214+
212215
* $COPYRIGHT$
213216
*
214217
* Additional copyrights may follow

0 commit comments

Comments
 (0)