From d9b6b5af0c68c5c9d888f5044266c41d8b0b5a73 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 23 Feb 2010 22:20:01 +0000 Subject: [PATCH] This commit converts us to the "one big libmpi" scheme that has been discussed extensively. See https://svn.open-mpi.org/trac/ompi/ticket/2092 and the RFC thread http://www.open-mpi.org/community/lists/devel/2010/02/7447.php. Specifically: * Create LT convenience libraries for OPAL and ORTE if the layer above them is being created (use the already-defined AM_CONDITIONALs to know if the project above us is being built). * ORTE slurps in the LT convenience library for OPAL; OMPI slurps in the LT convenience library for ORTE. * Wrapper compilers now only -l one library (e.g., ortecc only does -lopen-ret, and mpicc only does -lmpi). This commit was SVN r22691. --- ompi/Makefile.am | 4 ++-- ompi/tools/wrappers/mpic++-wrapper-data.txt.in | 2 +- ompi/tools/wrappers/mpicc-wrapper-data.txt.in | 2 +- ompi/tools/wrappers/mpif77-wrapper-data.txt.in | 2 +- ompi/tools/wrappers/mpif90-wrapper-data.txt.in | 2 +- opal/Makefile.am | 14 ++++++++++++++ orte/Makefile.am | 16 +++++++++++++++- orte/tools/wrappers/ortec++-wrapper-data.txt.in | 2 +- orte/tools/wrappers/ortecc-wrapper-data.txt.in | 2 +- 9 files changed, 37 insertions(+), 9 deletions(-) diff --git a/ompi/Makefile.am b/ompi/Makefile.am index a64510ba7b..3b5e29be04 100644 --- a/ompi/Makefile.am +++ b/ompi/Makefile.am @@ -112,7 +112,7 @@ libmpi_la_LIBADD = \ $(MCA_ompi_FRAMEWORK_LIBS) \ $(EXT_ompi_FRAMEWORK_LIBS) \ $(OMPI_LIBMPI_EXTRA_LIBS) \ - $(top_ompi_builddir)/orte/libopen-rte.la + $(top_ompi_builddir)/orte/libopen-rte-lt.la libmpi_la_DEPENDENCIES = \ datatype/libdatatype.la \ debuggers/libdebuggers.la \ @@ -122,7 +122,7 @@ libmpi_la_DEPENDENCIES = \ $(f77_base_lib) \ $(MCA_ompi_FRAMEWORK_LIBS) \ $(EXT_ompi_FRAMEWORK_LIBS) \ - $(top_ompi_builddir)/orte/libopen-rte.la + $(top_ompi_builddir)/orte/libopen-rte-lt.la libmpi_la_LDFLAGS = \ -version-info $(libmpi_so_version) \ $(OMPI_LIBMPI_EXTRA_LDFLAGS) diff --git a/ompi/tools/wrappers/mpic++-wrapper-data.txt.in b/ompi/tools/wrappers/mpic++-wrapper-data.txt.in index 3602e91f88..0360848c3d 100644 --- a/ompi/tools/wrappers/mpic++-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpic++-wrapper-data.txt.in @@ -16,7 +16,7 @@ extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@ preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ -libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ +libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ required_file=@OMPI_WRAPPER_CXX_REQUIRED_FILE@ includedir=${includedir} libdir=${libdir} diff --git a/ompi/tools/wrappers/mpicc-wrapper-data.txt.in b/ompi/tools/wrappers/mpicc-wrapper-data.txt.in index f596a3f03c..7e50f46643 100644 --- a/ompi/tools/wrappers/mpicc-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpicc-wrapper-data.txt.in @@ -16,7 +16,7 @@ extra_includes=@OMPI_WRAPPER_EXTRA_INCLUDES@ preprocessor_flags=@OMPI_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ -libs=-lmpi -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ +libs=-lmpi @OMPI_WRAPPER_EXTRA_LIBS@ required_file= includedir=${includedir} libdir=${libdir} diff --git a/ompi/tools/wrappers/mpif77-wrapper-data.txt.in b/ompi/tools/wrappers/mpif77-wrapper-data.txt.in index 7d3760c1e1..ba2675e1ed 100644 --- a/ompi/tools/wrappers/mpif77-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpif77-wrapper-data.txt.in @@ -16,7 +16,7 @@ extra_includes= preprocessor_flags= compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ -libs=-lmpi_f77 -lmpi -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ +libs=-lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ required_file=@OMPI_WRAPPER_F77_REQUIRED_FILE@ includedir=${includedir} libdir=${libdir} diff --git a/ompi/tools/wrappers/mpif90-wrapper-data.txt.in b/ompi/tools/wrappers/mpif90-wrapper-data.txt.in index 465a74b787..91a3272fb2 100644 --- a/ompi/tools/wrappers/mpif90-wrapper-data.txt.in +++ b/ompi/tools/wrappers/mpif90-wrapper-data.txt.in @@ -17,7 +17,7 @@ extra_includes= preprocessor_flags= compiler_flags=@OMPI_WRAPPER_EXTRA_FCFLAGS@ linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@ -libs=-lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@ +libs=-lmpi_f90 -lmpi_f77 -lmpi @OMPI_WRAPPER_EXTRA_LIBS@ required_file=@OMPI_WRAPPER_F90_REQUIRED_FILE@ includedir=${includedir} libdir=${libdir} diff --git a/opal/Makefile.am b/opal/Makefile.am index 50537dfa29..c343a08430 100644 --- a/opal/Makefile.am +++ b/opal/Makefile.am @@ -89,3 +89,17 @@ include mca/Makefile.am include win32/Makefile.am include tools/Makefile.am include dss/Makefile.am + +# Set the convenience library to be the same as the non-convenience +# library, but a) it's marked as "noinst", so LT knows it's a +# convenience library, and b) no .so version number is assigned here. +# Note that we only need to make the convenience library if the ORTE +# project is being built (i.e., if there is an upper layer that needs +# to slurp in OPAL as a convenience library). + +if PROJECT_ORTE +noinst_LTLIBRARIES += libopen-pal-lt.la +endif +libopen_pal_lt_la_SOURCES = $(libopen_pal_la_SOURCES) +libopen_pal_lt_la_LIBADD = $(libopen_pal_la_LIBADD) +libopen_pal_lt_la_DEPENDENCIES = $(libopen_pal_la_DEPENDENCIES) diff --git a/orte/Makefile.am b/orte/Makefile.am index 85eb76cc50..a389b799e0 100644 --- a/orte/Makefile.am +++ b/orte/Makefile.am @@ -37,7 +37,7 @@ lib_LTLIBRARIES = libopen-rte.la libopen_rte_la_SOURCES = libopen_rte_la_LIBADD = \ $(MCA_orte_FRAMEWORK_LIBS) \ - $(top_ompi_builddir)/opal/libopen-pal.la + $(top_ompi_builddir)/opal/libopen-pal-lt.la libopen_rte_la_DEPENDENCIES = $(libopen_rte_la_LIBADD) libopen_rte_la_LDFLAGS = -version-info $(libopen_rte_so_version) @@ -66,3 +66,17 @@ include tools/Makefile.am include orted/Makefile.am include test/mpi/Makefile.include include test/system/Makefile.include + +# Set the convenience library to be the same as the non-convenience +# library, but a) it's marked as "noinst", so LT knows it's a +# convenience library, and b) no .so version number is assigned here. +# Note that we only need to make the convenience library if the OMPI +# project is being built (i.e., if there is an upper layer that needs +# to slurp in ORTE as a convenience library). + +if PROJECT_ORTE +noinst_LTLIBRARIES += libopen-rte-lt.la +endif +libopen_rte_lt_la_SOURCES = $(libopen_rte_la_SOURCES) +libopen_rte_lt_la_LIBADD = $(libopen_rte_la_LIBADD) +libopen_rte_lt_la_DEPENDENCIES = $(libopen_rte_la_DEPENDENCIES) diff --git a/orte/tools/wrappers/ortec++-wrapper-data.txt.in b/orte/tools/wrappers/ortec++-wrapper-data.txt.in index 7f5037e089..8240f0f4be 100644 --- a/orte/tools/wrappers/ortec++-wrapper-data.txt.in +++ b/orte/tools/wrappers/ortec++-wrapper-data.txt.in @@ -16,7 +16,7 @@ extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@ preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags=@ORTE_WRAPPER_EXTRA_CXXFLAGS@ linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@ -libs=-lopen-rte -lopen-pal @ORTE_WRAPPER_EXTRA_LIBS@ +libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ required_file= includedir=${includedir} libdir=${libdir} diff --git a/orte/tools/wrappers/ortecc-wrapper-data.txt.in b/orte/tools/wrappers/ortecc-wrapper-data.txt.in index 31d51174c5..831d87d578 100644 --- a/orte/tools/wrappers/ortecc-wrapper-data.txt.in +++ b/orte/tools/wrappers/ortecc-wrapper-data.txt.in @@ -16,7 +16,7 @@ extra_includes=@ORTE_WRAPPER_EXTRA_INCLUDES@ preprocessor_flags=@ORTE_WRAPPER_EXTRA_CPPFLAGS@ compiler_flags=@ORTE_WRAPPER_EXTRA_CFLAGS@ linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@ -libs=-lopen-rte -lopen-pal @ORTE_WRAPPER_EXTRA_LIBS@ +libs=-lopen-rte @ORTE_WRAPPER_EXTRA_LIBS@ required_file= includedir=${includedir} libdir=${libdir}