Skip to content

Commit 9d8f634

Browse files
hjelmnjsquyres
authored andcommitted
btl/vader: rename vader -> sm
Now that the old sm btl has been gone for some time there was a request to rename vader to sm. This commit does just that (reluctantly). An alias has been generated so specifying vader in the btl selection variable or specifying vader parameters will continue to work. Signed-off-by: Nathan Hjelm <hjelmn@google.com>
1 parent 9fae5bf commit 9d8f634

28 files changed

+1324
-1293
lines changed

README

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ MPI Functionality and Features
594594
- tcp
595595
- ugni
596596
- usnic
597-
- vader (shared memory)
598597

599598
Currently, MPI File operations are not thread safe even if MPI is
600599
initialized for MPI_THREAD_MULTIPLE support.
@@ -675,8 +674,8 @@ Network Support
675674
- SMCUDA
676675
- Cisco usNIC
677676
- uGNI (Cray Gemini, Aries)
678-
- vader (XPMEM, Linux CMA, Linux KNEM, and copy-in/copy-out shared
679-
memory)
677+
- shared memory (XPMEM, Linux CMA, Linux KNEM, and
678+
copy-in/copy-out shared memory)
680679

681680
- "cm" supports a smaller number of networks (and they cannot be
682681
used together), but may provide better overall MPI performance:
@@ -785,16 +784,16 @@ Network Support
785784
v2.6.15 with libibverbs v1.1 or later (first released as part of
786785
OFED v1.2), per restrictions imposed by the OFED network stack.
787786

788-
- Linux "knem" support is used when the "vader" or "sm" (shared
789-
memory) BTLs are compiled with knem support (see the --with-knem
790-
configure option) and the knem Linux module is loaded in the running
791-
kernel. If the knem Linux kernel module is not loaded, the knem
792-
support is (by default) silently deactivated during Open MPI jobs.
787+
- Linux "knem" support is used when the "sm" (shared memory) BTL is
788+
compiled with knem support (see the --with-knem configure option)
789+
and the knem Linux module is loaded in the running kernel. If the
790+
knem Linux kernel module is not loaded, the knem support is (by
791+
default) silently deactivated during Open MPI jobs.
793792

794793
See https://knem.gforge.inria.fr/ for details on Knem.
795794

796-
- Linux Cross-Memory Attach (CMA) or XPMEM is used by the vader
797-
shared-memory BTL when the CMA/XPMEM libraries are installedm,
795+
- Linux Cross-Memory Attach (CMA) or XPMEM is used by the "sm" shared
796+
memory BTL when the CMA/XPMEM libraries are installedm,
798797
respectively. Linux CMA and XPMEM are similar (but different)
799798
mechanisms for Open MPI to utilize single-copy semantics for shared
800799
memory.
@@ -2154,14 +2153,14 @@ comma-delimited list to the "btl" MCA parameter:
21542153

21552154
shell$ mpirun --mca btl tcp,self hello_world_mpi
21562155

2157-
To add shared memory support, add "vader" into the command-delimited
2158-
list (list order does not matter):
2156+
To add shared memory support, add "sm" into the command-delimited list
2157+
(list order does not matter):
21592158

2160-
shell$ mpirun --mca btl tcp,vader,self hello_world_mpi
2159+
shell$ mpirun --mca btl tcp,sm,self hello_world_mpi
21612160

2162-
(there is an "sm" shared memory BTL, too, but "vader" is a newer
2163-
generation of shared memory support; by default, "vader" will be used
2164-
instead of "sm")
2161+
(there used to be a "vader" BTL for shared memory support; it was
2162+
renamed to "sm" in Open MPI v5.0.0, but the alias "vader" still works
2163+
as well)
21652164

21662165
To specifically deactivate a specific component, the comma-delimited
21672166
list can be prepended with a "^" to negate it:

opal/mca/btl/base/btl_base_frame.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2016-2018 Los Alamos National Security, LLC. All rights
1818
* reserved.
19+
* Copyright (c) 2020 Google, LLC. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -30,6 +31,7 @@
3031
#include "opal/mca/mca.h"
3132
#include "opal/util/output.h"
3233
#include "opal/mca/base/base.h"
34+
#include "opal/mca/base/mca_base_alias.h"
3335
#include "opal/mca/btl/btl.h"
3436
#include "opal/mca/btl/base/base.h"
3537

@@ -154,6 +156,29 @@ static int mca_btl_base_register(mca_base_register_flag_t flags)
154156
(void) mca_base_var_enum_register("opal", "btl", "base", "btl_atomic_flags",
155157
&mca_btl_base_atomic_enum);
156158

159+
/* Note that we break abstraction rules here by listing two
160+
specific BTLs here in the base. This is necessary, however,
161+
due to extraordinary circumstances:
162+
163+
1. In Open MPI v5.0.0, we want to rename the "vader" BTL to be
164+
"sm", because the "old" sm BTL is long gone, and the "vader"
165+
name is not very user-friendly.
166+
167+
2. The MCA aliasing mechanism was therefore created for v5.0.0.
168+
Both the component itself and all of its MCA vars are
169+
aliased.
170+
171+
3. However -- at least as currently implemented -- by the time
172+
individual components are registered, it's too late to make
173+
aliases. Hence, if we want to preserve the name "vader" for
174+
some sembalance of backwards compatibility (and we do!), we
175+
have to register "vader" as an "alias for "sm" up here in
176+
the BTL base, before any BTL components are registered.
177+
178+
This is why we tolerate this abstraction break up here in the
179+
BTL component base. */
180+
(void) mca_base_alias_register ("opal", "btl", "sm", "vader", MCA_BASE_ALIAS_FLAG_NONE);
181+
157182
return OPAL_SUCCESS;
158183
}
159184

opal/mca/btl/btl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* Copyright (c) 2015 Research Organization for Information Science
1919
* and Technology (RIST). All rights reserved.
2020
* Copyright (c) 2020 Intel, Inc. All rights reserved.
21+
* Copyright (c) 2020 Google, LLC. All rights reserved.
2122
* $COPYRIGHT$
2223
*
2324
* Additional copyrights may follow
@@ -190,7 +191,7 @@ typedef uint8_t mca_btl_base_tag_t;
190191
#define MCA_BTL_TAG_IB (MCA_BTL_TAG_BTL + 0)
191192
#define MCA_BTL_TAG_UDAPL (MCA_BTL_TAG_BTL + 1)
192193
#define MCA_BTL_TAG_SMCUDA (MCA_BTL_TAG_BTL + 2)
193-
#define MCA_BTL_TAG_VADER (MCA_BTL_TAG_BTL + 3)
194+
#define MCA_BTL_TAG_SM (MCA_BTL_TAG_BTL + 3)
194195

195196
/* prefered protocol */
196197
#define MCA_BTL_FLAGS_SEND 0x0001

opal/mca/btl/vader/Makefile.am renamed to opal/mca/btl/sm/Makefile.am

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,57 +13,58 @@
1313
# Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
1414
# reserved.
1515
# Copyright (c) 2017 IBM Corporation. All rights reserved.
16+
# Copyright (c) 2020 Google, LLC. All rights reserved.
1617
# $COPYRIGHT$
1718
#
1819
# Additional copyrights may follow
1920
#
2021
# $HEADER$
2122
#
2223

23-
AM_CPPFLAGS = $(btl_vader_CPPFLAGS)
24+
AM_CPPFLAGS = $(btl_sm_CPPFLAGS)
2425

25-
dist_opaldata_DATA = help-btl-vader.txt
26+
dist_opaldata_DATA = help-btl-sm.txt
2627

27-
libmca_btl_vader_la_sources = \
28-
btl_vader_module.c \
29-
btl_vader.h \
30-
btl_vader_component.c \
31-
btl_vader_endpoint.h \
32-
btl_vader_fifo.h \
33-
btl_vader_frag.c \
34-
btl_vader_frag.h \
35-
btl_vader_send.c \
36-
btl_vader_sendi.c \
37-
btl_vader_fbox.h \
38-
btl_vader_get.c \
39-
btl_vader_put.c \
40-
btl_vader_xpmem.c \
41-
btl_vader_xpmem.h \
42-
btl_vader_knem.c \
43-
btl_vader_knem.h \
44-
btl_vader_sc_emu.c \
45-
btl_vader_atomic.c
28+
libmca_btl_sm_la_sources = \
29+
btl_sm_module.c \
30+
btl_sm.h \
31+
btl_sm_component.c \
32+
btl_sm_endpoint.h \
33+
btl_sm_fifo.h \
34+
btl_sm_frag.c \
35+
btl_sm_frag.h \
36+
btl_sm_send.c \
37+
btl_sm_sendi.c \
38+
btl_sm_fbox.h \
39+
btl_sm_get.c \
40+
btl_sm_put.c \
41+
btl_sm_xpmem.c \
42+
btl_sm_xpmem.h \
43+
btl_sm_knem.c \
44+
btl_sm_knem.h \
45+
btl_sm_sc_emu.c \
46+
btl_sm_atomic.c
4647

4748
# Make the output library in this directory, and name it either
4849
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
4950
# (for static builds).
5051

51-
if MCA_BUILD_opal_btl_vader_DSO
52+
if MCA_BUILD_opal_btl_sm_DSO
5253
component_noinst =
53-
component_install = mca_btl_vader.la
54+
component_install = mca_btl_sm.la
5455
else
55-
component_noinst = libmca_btl_vader.la
56+
component_noinst = libmca_btl_sm.la
5657
component_install =
5758
endif
5859

5960
mcacomponentdir = $(opallibdir)
6061
mcacomponent_LTLIBRARIES = $(component_install)
61-
mca_btl_vader_la_SOURCES = $(libmca_btl_vader_la_sources)
62-
mca_btl_vader_la_LDFLAGS = -module -avoid-version $(btl_vader_LDFLAGS)
63-
mca_btl_vader_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \
64-
$(btl_vader_LIBS)
62+
mca_btl_sm_la_SOURCES = $(libmca_btl_sm_la_sources)
63+
mca_btl_sm_la_LDFLAGS = -module -avoid-version $(btl_sm_LDFLAGS)
64+
mca_btl_sm_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \
65+
$(btl_sm_LIBS)
6566

6667
noinst_LTLIBRARIES = $(component_noinst)
67-
libmca_btl_vader_la_SOURCES = $(libmca_btl_vader_la_sources)
68-
libmca_btl_vader_la_LIBADD = $(btl_vader_LIBS)
69-
libmca_btl_vader_la_LDFLAGS = -module -avoid-version $(btl_vader_LDFLAGS)
68+
libmca_btl_sm_la_SOURCES = $(libmca_btl_sm_la_sources)
69+
libmca_btl_sm_la_LIBADD = $(btl_sm_LIBS)
70+
libmca_btl_sm_la_LDFLAGS = -module -avoid-version $(btl_sm_LDFLAGS)

0 commit comments

Comments
 (0)