Skip to content

Commit 20c3e2d

Browse files
committed
Add initial ABI generation code and new libraries
Two external MPI libraries are now created: libmpi.la and libmpi_abi.la. Backend code that was originally in libmpi.la has been extracted into libopen-mpi.la to be linked into both libraries. Parts of the Open MPI C interface are now being generated by a python script (abi.py) from modified source files (named with *.in). This script generates files for both the ompi ABI and the standard ABI from the same source file, also including new bigcount interfaces. To compile standard ABI code, there's a new mpicc_abi compiler wrapper. The standard ABI does not yet include all functions or symbols, so more complicated source files will not compile. ROMIO must be disabled for the code to link, since it's relying on the external MPI interface. Signed-off-by: Jake Tronge <jtronge@lanl.gov>
1 parent 2ebdfbb commit 20c3e2d

File tree

103 files changed

+1704
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1704
-393
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ ompi/tools/ompi_info/ompi_info
288288

289289
ompi/tools/wrappers/mpic++-wrapper-data.txt
290290
ompi/tools/wrappers/mpicc-wrapper-data.txt
291+
ompi/tools/wrappers/mpicc_abi-wrapper-data.txt
291292
ompi/tools/wrappers/mpifort-wrapper-data.txt
292293
ompi/tools/wrappers/ompi_wrapper_script
293294
ompi/tools/wrappers/ompi.pc
@@ -534,3 +535,9 @@ docs/_templates
534535
# Common Python virtual environment directory names
535536
venv
536537
py??
538+
539+
# Generated C Bindings
540+
ompi/mpi/c/ompi_*.c
541+
ompi/mpi/c/standard_*.c
542+
ompi/mpi/c/abi.h
543+
ompi/mpi/c/standard_abi

config/ompi_config_files.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
5252
ompi/tools/ompi_info/Makefile
5353
ompi/tools/wrappers/Makefile
5454
ompi/tools/wrappers/mpicc-wrapper-data.txt
55+
ompi/tools/wrappers/mpicc_abi-wrapper-data.txt
5556
ompi/tools/wrappers/mpic++-wrapper-data.txt
5657
ompi/tools/wrappers/mpifort-wrapper-data.txt
5758
ompi/tools/wrappers/ompi.pc

config/ompi_configure_options.m4

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,5 +244,24 @@ else
244244
fi
245245
AM_CONDITIONAL(OMPI_OMPIO_SUPPORT, test "$ompi_want_ompio" = "1")
246246

247+
#
248+
# Is this a developer copy?
249+
#
250+
251+
if test -d .git; then
252+
OMPI_DEVEL=1
253+
else
254+
OMPI_DEVEL=0
255+
fi
256+
257+
AC_MSG_CHECKING([if want to generate ABI bindings])
258+
AC_ARG_ENABLE([abi-generation],
259+
[AS_HELP_STRING([--enable-abi-generation],
260+
[generate ABI bindings (requires Python >=3.8)])])
261+
AS_IF([test "$enable_abi_generation" = "yes" || test "$OMPI_DEVEL" = "1"],
262+
[AM_PATH_PYTHON([3.8],,[AC_MSG_ERROR([Open MPI required Python >=3.8. Aborting])])])
263+
# abi-generation is enabled by default in developer copies
264+
AM_CONDITIONAL(OMPI_ENABLE_ABI_GENERATION, [test "$enable_abi_generation" = "yes" || test "$OMPI_DEVEL" = "1"])
265+
247266
])dnl
248267

ompi/Makefile.am

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,36 +126,45 @@ DIST_SUBDIRS = \
126126
$(MCA_ompi_FRAMEWORKS_SUBDIRS) \
127127
$(MCA_ompi_FRAMEWORK_COMPONENT_ALL_SUBDIRS)
128128

129-
# Build the main MPI library
129+
noinst_LTLIBRARIES = libopen-mpi.la
130+
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@.la libmpi_abi.la
130131

131-
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@.la
132-
lib@OMPI_LIBMPI_NAME@_la_SOURCES =
133-
lib@OMPI_LIBMPI_NAME@_la_LIBADD = \
132+
# Build the Open MPI internal library
133+
libopen_mpi_la_SOURCES =
134+
libopen_mpi_la_LIBADD = \
134135
datatype/libdatatype.la \
135136
debuggers/libdebuggers.la \
137+
$(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_NAME@.la \
138+
$(MCA_ompi_FRAMEWORK_LIBS) \
139+
$(OMPI_LIBMPI_EXTRA_LIBS)
140+
libopen_mpi_la_DEPENDENCIES = $(libopen_mpi_la_LIBADD)
141+
142+
# Build the main MPI library
143+
lib@OMPI_LIBMPI_NAME@_la_SOURCES =
144+
lib@OMPI_LIBMPI_NAME@_la_LIBADD = \
145+
libopen-mpi.la \
136146
mpi/c/libmpi_c.la \
137147
mpi/tool/libmpi_mpit.la \
138148
$(c_mpi_lib) \
139149
$(c_pmpi_lib) \
140-
$(mpi_fortran_base_lib) \
141-
$(MCA_ompi_FRAMEWORK_LIBS) \
142150
$(OMPI_MPIEXT_C_LIBS) \
143-
$(OMPI_LIBMPI_EXTRA_LIBS)
144-
151+
$(mpi_fortran_base_lib)
145152

146-
lib@OMPI_LIBMPI_NAME@_la_LIBADD += \
147-
$(OMPI_TOP_BUILDDIR)/opal/lib@OPAL_LIB_NAME@.la
148-
lib@OMPI_LIBMPI_NAME@_la_DEPENDENCIES = $(lib@OMPI_LIBMPI_NAME@_la_LIBADD)
149153
lib@OMPI_LIBMPI_NAME@_la_LDFLAGS = \
150154
-version-info $(libmpi_so_version) \
151155
$(OMPI_LIBMPI_EXTRA_LDFLAGS)
152156

157+
# Build the MPI Standard ABI library
158+
libmpi_abi_la_SOURCES =
159+
libmpi_abi_la_LIBADD = \
160+
libopen-mpi.la \
161+
mpi/c/libmpi_c_abi.la
162+
153163
# included subdirectory Makefile.am's and appended-to variables
154164
headers =
155-
noinst_LTLIBRARIES =
156165
include_HEADERS =
157166
dist_ompidata_DATA =
158-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += $(headers)
167+
libopen_mpi_la_SOURCES += $(headers)
159168

160169
# Conditionally install the header files
161170

ompi/attribute/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
headers += \
2323
attribute/attribute.h
2424

25-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
25+
libopen_mpi_la_SOURCES += \
2626
attribute/attribute.c \
2727
attribute/attribute_predefined.c

ompi/class/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
headers += \
2424
class/ompi_seq_tracker.h
2525

26-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
26+
libopen_mpi_la_SOURCES += \
2727
class/ompi_seq_tracker.c
28-

ompi/communicator/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ headers += \
2828
communicator/communicator.h \
2929
communicator/comm_request.h
3030

31-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
31+
libopen_mpi_la_SOURCES += \
3232
communicator/comm_init.c \
3333
communicator/comm.c \
3434
communicator/comm_cid.c \
3535
communicator/comm_request.c
3636

3737
if WANT_FT_MPI
38-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
38+
libopen_mpi_la_SOURCES += \
3939
communicator/ft/comm_ft.c communicator/ft/comm_ft_reliable_bcast.c communicator/ft/comm_ft_propagator.c communicator/ft/comm_ft_detector.c communicator/ft/comm_ft_revoke.c
4040
endif # WANT_FT_MPI
4141

ompi/dpm/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ dist_ompidata_DATA += dpm/help-dpm.txt
1616
headers += \
1717
dpm/dpm.h
1818

19-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
19+
libopen_mpi_la_SOURCES += \
2020
dpm/dpm.c
2121

ompi/errhandler/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ headers += \
2929
errhandler/errhandler.h \
3030
errhandler/errhandler_predefined.h
3131

32-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
32+
libopen_mpi_la_SOURCES += \
3333
errhandler/errhandler.c \
3434
errhandler/errhandler_invoke.c \
3535
errhandler/errhandler_predefined.c \

ompi/file/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
headers += \
2323
file/file.h
2424

25-
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
25+
libopen_mpi_la_SOURCES += \
2626
file/file.c

0 commit comments

Comments
 (0)