Skip to content

Commit 2a904d8

Browse files
committed
Provide mechanism for disabling legacy tool names
Current PRRTE tool names can conflict with those from other packages (e.g., "pterm" with Putty). While this can be resolved through use of PATH, we can try to be a bit more friendly and revise the tool names. However, we have to also be considerate of those who already use PRRTE tools, so let's create a compromise. Rename the tools of concern in a "standardized" manner so people can easily discern the new variations: "pterm" moves to "prte-term" "prun" moves to "prte-submit" "prte_info" moves to "prte-info" We leave "prte", "prterun", and "prted" alone. This provides a consistent naming scheme. We also add a new configure option ("--enable-legacy-tools") that causes the original tool names to be symlinked to the corresponding new name. Thus, "pterm" is retained in that situation. For now, we default the new configure option to be "yes" so that the old names are present. If someone wants to build without the old names, then they will need to "--disable-legacy-tools". Signed-off-by: Ralph Castain <[email protected]>
1 parent e5e3d6c commit 2a904d8

File tree

5 files changed

+106
-56
lines changed

5 files changed

+106
-56
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,15 @@ src/mca/rmaps/rank_file/rmaps_rank_file_lex.c
157157
src/mca/rmaps/rank_file/rankfile_lex.c
158158

159159
src/tools/prun/prun
160+
src/tools/prun/prte-submit
160161
src/tools/prte_info/prte_info
162+
src/tools/prte_info/prte-info
161163
src/tools/prted/prted
162164
src/tools/prte/prte
163165
src/tools/pcc/pcc
164166
src/tools/pcc/pcc-wrapper-data.txt
165167
src/tools/pterm/pterm
168+
src/tools/pterm/prte-term
166169

167170
src/util/hostfile/hostfile_lex.c
168171
src/util/keyval/keyval_lex.c

config/prte_configure_options.m4

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,4 +384,21 @@ fi
384384
AC_DEFINE_UNQUOTED([PRTE_ENABLE_GETPWUID], [$prte_want_getpwuid],
385385
[Disable getpwuid support (default: enabled)])
386386

387+
# some people don't want the legacy tools
388+
AC_MSG_CHECKING([if want legacy tools installed])
389+
AC_ARG_ENABLE([legacy-tools],
390+
[AS_HELP_STRING([--disable-legacy-tools],
391+
[Do not install the legacy tools (default: enabled)])])
392+
if test "$enable_legacy_tools" = "no"; then
393+
AC_MSG_RESULT([no])
394+
prte_legacy_tools=no
395+
PRTE_WANT_LEGACY_TOOLS=0
396+
else
397+
AC_MSG_RESULT([yes])
398+
prte_legacy_tools=yes
399+
PRTE_WANT_LEGACY_TOOLS=1
400+
fi
401+
AM_CONDITIONAL(PRTE_WANT_LEGACY_TOOLS, test "$PRTE_WANT_LEGACY_TOOLS" = 1)
402+
PRTE_SUMMARY_ADD([Miscellaneous], [Install legacy tools], [], [$prte_legacy_tools])
403+
387404
])dnl

src/tools/prte_info/Makefile.am

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Copyright (c) 2016-2020 Intel, Inc. All rights reserved.
1515
# Copyright (c) 2017 Research Organization for Information Science
1616
# and Technology (RIST). All rights reserved.
17-
# Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
17+
# Copyright (c) 2021-2024 Nanook Consulting All rights reserved.
1818
# $COPYRIGHT$
1919
#
2020
# Additional copyrights may follow
@@ -23,35 +23,45 @@
2323
#
2424

2525
AM_CFLAGS = \
26-
-DPRTE_CONFIGURE_USER="\"@PRTE_CONFIGURE_USER@\"" \
27-
-DPRTE_CONFIGURE_HOST="\"@PRTE_CONFIGURE_HOST@\"" \
28-
-DPRTE_CONFIGURE_DATE="\"@PRTE_CONFIGURE_DATE@\"" \
29-
-DPRTE_BUILD_USER="\"$$USER\"" \
30-
-DPRTE_BUILD_HOST="\"$${HOSTNAME:-`(hostname || uname -n) | sed 1q`}\"" \
31-
-DPRTE_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
32-
-DPRTE_BUILD_CFLAGS="\"@CFLAGS@\"" \
33-
-DPRTE_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
34-
-DPRTE_BUILD_LDFLAGS="\"@LDFLAGS@\"" \
35-
-DPRTE_BUILD_LIBS="\"@LIBS@\"" \
36-
-DPRTE_CC_ABSOLUTE="\"@PRTE_CC_ABSOLUTE@\"" \
37-
-DPRTE_GREEK_VERSION="\"@PRTE_GREEK_VERSION@\"" \
38-
-DPRTE_REPO_REV="\"@PRTE_REPO_REV@\"" \
39-
-DPMIX_RELEASE_DATE="\"@PMIX_RELEASE_DATE@\""
26+
-DPRTE_CONFIGURE_USER="\"@PRTE_CONFIGURE_USER@\"" \
27+
-DPRTE_CONFIGURE_HOST="\"@PRTE_CONFIGURE_HOST@\"" \
28+
-DPRTE_CONFIGURE_DATE="\"@PRTE_CONFIGURE_DATE@\"" \
29+
-DPRTE_BUILD_USER="\"$$USER\"" \
30+
-DPRTE_BUILD_HOST="\"$${HOSTNAME:-`(hostname || uname -n) | sed 1q`}\"" \
31+
-DPRTE_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
32+
-DPRTE_BUILD_CFLAGS="\"@CFLAGS@\"" \
33+
-DPRTE_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
34+
-DPRTE_BUILD_LDFLAGS="\"@LDFLAGS@\"" \
35+
-DPRTE_BUILD_LIBS="\"@LIBS@\"" \
36+
-DPRTE_CC_ABSOLUTE="\"@PRTE_CC_ABSOLUTE@\"" \
37+
-DPRTE_GREEK_VERSION="\"@PRTE_GREEK_VERSION@\"" \
38+
-DPRTE_REPO_REV="\"@PRTE_REPO_REV@\"" \
39+
-DPMIX_RELEASE_DATE="\"@PMIX_RELEASE_DATE@\""
4040

4141
AM_LDFLAGS = $(prte_hwloc_LDFLAGS) $(prte_libevent_LDFLAGS) $(prte_pmix_LDFLAGS)
4242

43-
bin_PROGRAMS = prte_info
43+
bin_PROGRAMS = prte-info
4444

4545
prte_info_SOURCES = \
46-
pinfo.h \
47-
prte_info.c \
48-
output.c \
49-
param.c \
50-
components.c \
51-
version.c
46+
pinfo.h \
47+
prte_info.c \
48+
output.c \
49+
param.c \
50+
components.c \
51+
version.c
5252

5353
prte_info_LDADD = \
54-
$(prte_libevent_LIBS) \
55-
$(prte_hwloc_LIBS) \
56-
$(prte_pmix_LIBS) \
54+
$(prte_libevent_LIBS) \
55+
$(prte_hwloc_LIBS) \
56+
$(prte_pmix_LIBS) \
5757
$(top_builddir)/src/libprrte.la
58+
59+
if PRTE_WANT_LEGACY_TOOLS
60+
61+
install-exec-hook:
62+
(cd $(DESTDIR)$(bindir); rm -f prte_info$(EXEEXT); $(LN_S) prte-info$(EXEEXT) prte_info$(EXEEXT))
63+
64+
uninstall-local:
65+
rm -f $(DESTDIR)$(bindir)/prte_info$(EXEEXT)
66+
67+
endif

src/tools/prun/Makefile.am

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Copyright (c) 2015-2020 Intel, Inc. All rights reserved.
1515
# Copyright (c) 2019 Research Organization for Information Science
1616
# and Technology (RIST). All rights reserved.
17-
# Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
17+
# Copyright (c) 2021-2024 Nanook Consulting All rights reserved.
1818
# $COPYRIGHT$
1919
#
2020
# Additional copyrights may follow
@@ -24,30 +24,40 @@
2424

2525
AM_LDFLAGS = $(prte_hwloc_LDFLAGS) $(prte_libevent_LDFLAGS) $(prte_pmix_LDFLAGS)
2626
AM_CFLAGS = \
27-
-DPRTE_CONFIGURE_USER="\"@PRTE_CONFIGURE_USER@\"" \
28-
-DPRTE_CONFIGURE_HOST="\"@PRTE_CONFIGURE_HOST@\"" \
29-
-DPRTE_CONFIGURE_DATE="\"@PRTE_CONFIGURE_DATE@\"" \
30-
-DPRTE_BUILD_USER="\"$$USER\"" \
31-
-DPRTE_BUILD_HOST="\"$${HOSTNAME:-`(hostname || uname -n) | sed 1q`}\"" \
32-
-DPRTE_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
33-
-DPRTE_BUILD_CFLAGS="\"@CFLAGS@\"" \
34-
-DPRTE_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
35-
-DPRTE_BUILD_LDFLAGS="\"@LDFLAGS@\"" \
36-
-DPRTE_BUILD_LIBS="\"@LIBS@\"" \
37-
-DPRTE_CC_ABSOLUTE="\"@PRTE_CC_ABSOLUTE@\"" \
38-
-DPRTE_GREEK_VERSION="\"@PRTE_GREEK_VERSION@\"" \
39-
-DPRTE_REPO_REV="\"@PRTE_REPO_REV@\"" \
40-
-DPMIX_RELEASE_DATE="\"@PMIX_RELEASE_DATE@\""
41-
42-
bin_PROGRAMS = prun
43-
44-
prun_SOURCES = \
45-
main.c \
46-
prun.c \
47-
prun.h
48-
49-
prun_LDADD = \
50-
$(prte_libevent_LIBS) \
51-
$(prte_hwloc_LIBS) \
52-
$(prte_pmix_LIBS) \
27+
-DPRTE_CONFIGURE_USER="\"@PRTE_CONFIGURE_USER@\"" \
28+
-DPRTE_CONFIGURE_HOST="\"@PRTE_CONFIGURE_HOST@\"" \
29+
-DPRTE_CONFIGURE_DATE="\"@PRTE_CONFIGURE_DATE@\"" \
30+
-DPRTE_BUILD_USER="\"$$USER\"" \
31+
-DPRTE_BUILD_HOST="\"$${HOSTNAME:-`(hostname || uname -n) | sed 1q`}\"" \
32+
-DPRTE_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \
33+
-DPRTE_BUILD_CFLAGS="\"@CFLAGS@\"" \
34+
-DPRTE_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
35+
-DPRTE_BUILD_LDFLAGS="\"@LDFLAGS@\"" \
36+
-DPRTE_BUILD_LIBS="\"@LIBS@\"" \
37+
-DPRTE_CC_ABSOLUTE="\"@PRTE_CC_ABSOLUTE@\"" \
38+
-DPRTE_GREEK_VERSION="\"@PRTE_GREEK_VERSION@\"" \
39+
-DPRTE_REPO_REV="\"@PRTE_REPO_REV@\"" \
40+
-DPMIX_RELEASE_DATE="\"@PMIX_RELEASE_DATE@\""
41+
42+
bin_PROGRAMS = prte-submit
43+
44+
prte_submit_SOURCES = \
45+
main.c \
46+
prun.c \
47+
prun.h
48+
49+
prte_submit_LDADD = \
50+
$(prte_libevent_LIBS) \
51+
$(prte_hwloc_LIBS) \
52+
$(prte_pmix_LIBS) \
5353
$(top_builddir)/src/libprrte.la
54+
55+
if PRTE_WANT_LEGACY_TOOLS
56+
57+
install-exec-hook:
58+
(cd $(DESTDIR)$(bindir); rm -f prun$(EXEEXT); $(LN_S) prte-submit$(EXEEXT) prun$(EXEEXT))
59+
60+
uninstall-local:
61+
rm -f $(DESTDIR)$(bindir)/prun$(EXEEXT)
62+
63+
endif

src/tools/pterm/Makefile.am

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Copyright (c) 2015-2020 Intel, Inc. All rights reserved.
1515
# Copyright (c) 2019 Research Organization for Information Science
1616
# and Technology (RIST). All rights reserved.
17-
# Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
17+
# Copyright (c) 2021-2024 Nanook Consulting All rights reserved.
1818
# $COPYRIGHT$
1919
#
2020
# Additional copyrights may follow
@@ -24,13 +24,23 @@
2424

2525
AM_LDFLAGS = $(prte_hwloc_LDFLAGS) $(prte_libevent_LDFLAGS) $(prte_pmix_LDFLAGS)
2626

27-
bin_PROGRAMS = pterm
27+
bin_PROGRAMS = prte-term
2828

29-
pterm_SOURCES = \
29+
prte_term_SOURCES = \
3030
pterm.c
3131

32-
pterm_LDADD = \
32+
prte_term_LDADD = \
3333
$(prte_libevent_LIBS) \
3434
$(prte_hwloc_LIBS) \
3535
$(prte_pmix_LIBS) \
3636
$(top_builddir)/src/libprrte.la
37+
38+
if PRTE_WANT_LEGACY_TOOLS
39+
40+
install-exec-hook:
41+
(cd $(DESTDIR)$(bindir); rm -f pterm$(EXEEXT); $(LN_S) prte-term$(EXEEXT) pterm$(EXEEXT))
42+
43+
uninstall-local:
44+
rm -f $(DESTDIR)$(bindir)/pterm$(EXEEXT)
45+
46+
endif

0 commit comments

Comments
 (0)