Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.0: build: Custom libmpi(_FOO) name option in configure #2139

Merged
merged 2 commits into from
Oct 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
Copyright (c) 2006-2011 Mellanox Technologies. All rights reserved.
Copyright (c) 2006-2012 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2007 Myricom, Inc. All rights reserved.
Copyright (c) 2008 IBM Corporation. All rights reserved.
Copyright (c) 2008-2016 IBM Corporation. All rights reserved.
Copyright (c) 2010 Oak Ridge National Labs. All rights reserved.
Copyright (c) 2011 University of Houston. All rights reserved.
Copyright (c) 2013-2015 Intel, Inc. All rights reserved
Expand Down Expand Up @@ -819,6 +819,14 @@ INSTALLATION OPTIONS
command line that are not in FILE are also used. Options on the
command line and in FILE are replaced by what is in FILE.

--with-libmpi-name=STRING
Replace libmpi.* and libmpi_FOO.* (where FOO is one of the fortran
supporting libraries installed in lib) with libSTRING.* and
libSTRING_FOO.*. This is provided as a convenience mechanism for
third-party packagers of Open MPI that might want to rename these
libraries for their own purposes. This option is *not* intended for
typical users of Open MPI.

NETWORKING SUPPORT / OPTIONS

--with-fca=<directory>
Expand Down
7 changes: 4 additions & 3 deletions config/ompi_setup_mpi_fortran.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dnl reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2014-2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand Down Expand Up @@ -340,9 +341,9 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
AS_IF([test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
[OMPI_FORTRAN_USEMPI_DIR=mpi/fortran/use-mpi-ignore-tkr
OMPI_FORTRAN_USEMPI_LIB=-lmpi_usempi_ignore_tkr],
OMPI_FORTRAN_USEMPI_LIB=-l${with_libmpi_name}_usempi_ignore_tkr],
[OMPI_FORTRAN_USEMPI_DIR=mpi/fortran/use-mpi-tkr
OMPI_FORTRAN_USEMPI_LIB=-lmpi_usempi])
OMPI_FORTRAN_USEMPI_LIB=-l${with_libmpi_name}_usempi])
])

OMPI_FORTRAN_HAVE_ISO_C_BINDING=0
Expand Down Expand Up @@ -574,7 +575,7 @@ end type test_mpi_handle],

AC_MSG_CHECKING([if building Fortran 'use mpi_f08' bindings])
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[OMPI_FORTRAN_USEMPIF08_LIB=-lmpi_usempif08
[OMPI_FORTRAN_USEMPIF08_LIB=-l${with_libmpi_name}_usempif08
AC_MSG_RESULT([yes])],
[OMPI_TRY_FORTRAN_BINDIGS=$OMPI_FORTRAN_USEMPI_BINDINGS
AC_MSG_RESULT([no])])
Expand Down
22 changes: 22 additions & 0 deletions config/opal_set_lib_prefix.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- shell-script -*-
#
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -38,3 +39,24 @@ AC_DEFUN([ORTE_SET_LIB_PREFIX],[
orte_lib_prefix_set=yes
AC_SUBST(ORTE_LIB_PREFIX)
])dnl

#
# Rename 'libmpi' and 'libmpi_FOO' with a configure time option.
#
AC_DEFUN([OMPI_SET_LIB_NAME],[
AC_MSG_CHECKING([if want custom libmpi(_FOO) name])
AC_ARG_WITH([libmpi-name],
[AC_HELP_STRING([--with-libmpi-name=STRING],
["Replace \"libmpi(_FOO)\" with \"libSTRING(_FOO)\" (default=mpi)"])])

AS_IF([test "$with_libmpi_name" = "no"],
[AC_MSG_RESULT([Error])
AC_MSG_WARN([Invalid to specify --without-libmpi-name])
AC_MSG_ERROR([Cannot continue])])

AS_IF([test "$with_libmpi_name" = "" || test "$with_libmpi_name" = "yes"],
[with_libmpi_name="mpi"])

AC_MSG_RESULT([$with_libmpi_name])
AC_SUBST(OMPI_LIBMPI_NAME, $with_libmpi_name)
])dnl
3 changes: 2 additions & 1 deletion config/opal_setup_wrappers.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dnl Copyright (c) 2006-2010 Oracle and/or its affiliates. All rights reserved.
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
Expand Down Expand Up @@ -428,7 +429,7 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
# support. However, we do want it to fail if there is no C++
# compiler.
if test "$WANT_MPI_CXX_SUPPORT" = "1" ; then
OMPI_WRAPPER_CXX_LIB="-lmpi_cxx"
OMPI_WRAPPER_CXX_LIB="-l${with_libmpi_name}_cxx"
OMPI_WRAPPER_CXX_REQUIRED_FILE=""
elif test "$CXX" = "none"; then
OMPI_WRAPPER_CXX_LIB=""
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ fi
OPAL_SET_LIB_PREFIX([])
m4_ifdef([project_orte],
[ORTE_SET_LIB_PREFIX([])])
m4_ifdef([project_ompi],
[OMPI_SET_LIB_NAME([])])

############################################################################
# Libtool: part one
Expand Down
3 changes: 2 additions & 1 deletion contrib/build-mca-comps-outside-of-tree/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -154,7 +155,7 @@ EOF
# Open MPI v1.7 libraries
LDFLAGS="$LDFLAGS -L$withval/ompi/.libs"
# For OMPI v1.7 and later
LIBS="$LIBS -lmpi"
LIBS="$LIBS -l@OMPI_LIBMPI_NAME@"

CPPFLAGS="$CPPFLAGS $source_CPPFLAGS"
CFLAGS="$CFLAGS $source_CFLAGS"
Expand Down
17 changes: 9 additions & 8 deletions ompi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -127,9 +128,9 @@ DIST_SUBDIRS = \

# Build the main MPI library

lib_LTLIBRARIES = libmpi.la
libmpi_la_SOURCES =
libmpi_la_LIBADD = \
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@.la
lib@OMPI_LIBMPI_NAME@_la_SOURCES =
lib@OMPI_LIBMPI_NAME@_la_LIBADD = \
datatype/libdatatype.la \
debuggers/libdebuggers.la \
mpi/c/libmpi_c.la \
Expand All @@ -143,13 +144,13 @@ libmpi_la_LIBADD = \


if OMPI_RTE_ORTE
libmpi_la_LIBADD += \
lib@OMPI_LIBMPI_NAME@_la_LIBADD += \
$(OMPI_TOP_BUILDDIR)/orte/lib@[email protected]
endif
libmpi_la_LIBADD += \
lib@OMPI_LIBMPI_NAME@_la_LIBADD += \
$(OMPI_TOP_BUILDDIR)/opal/lib@[email protected]
libmpi_la_DEPENDENCIES = $(libmpi_la_LIBADD)
libmpi_la_LDFLAGS = \
lib@OMPI_LIBMPI_NAME@_la_DEPENDENCIES = $(lib@OMPI_LIBMPI_NAME@_la_LIBADD)
lib@OMPI_LIBMPI_NAME@_la_LDFLAGS = \
-version-info $(libmpi_so_version) \
$(OMPI_LIBMPI_EXTRA_LDFLAGS)

Expand All @@ -158,7 +159,7 @@ headers =
noinst_LTLIBRARIES =
include_HEADERS =
dist_ompidata_DATA =
libmpi_la_SOURCES += $(headers)
lib@OMPI_LIBMPI_NAME@_la_SOURCES += $(headers)
nodist_man_MANS =

# Conditionally install the header files
Expand Down
3 changes: 2 additions & 1 deletion ompi/attribute/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -21,6 +22,6 @@
headers += \
attribute/attribute.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
attribute/attribute.c \
attribute/attribute_predefined.c
3 changes: 2 additions & 1 deletion ompi/class/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -22,6 +23,6 @@
headers += \
class/ompi_seq_tracker.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
class/ompi_seq_tracker.c

3 changes: 2 additions & 1 deletion ompi/communicator/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# reserved.
# Copyright (c) 2014 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -28,7 +29,7 @@ headers += \
communicator/comm_request.h \
communicator/comm_helpers.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
communicator/comm_init.c \
communicator/comm.c \
communicator/comm_cid.c \
Expand Down
7 changes: 4 additions & 3 deletions ompi/debuggers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2007-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -44,13 +45,13 @@ headers = \

dlopen_test_SOURCES = dlopen_test.c
dlopen_test_LDADD = \
$(top_builddir)/ompi/libmpi.la \
$(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la \
$(top_builddir)/opal/lib@[email protected]
dlopen_test_DEPENDENCIES = $(ompi_predefined_LDADD)

predefined_gap_test_SOURCES = predefined_gap_test.c
predefined_gap_test_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS)
predefined_gap_test_LDADD = $(top_builddir)/ompi/libmpi.la
predefined_gap_test_LDADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la
predefined_gap_test_DEPENDENCIES = $(ompi_predefined_LDADD)

libdebuggers_la_SOURCES = \
Expand Down Expand Up @@ -78,7 +79,7 @@ libompi_dbg_msgq_la_LDFLAGS = -module -avoid-version
# and "make check" will *build* a test in runtime/, but it won't *run*
# it. :-(
predefined_pad_test_LDFLAGS = $(WRAPPER_EXTRA_LDFLAGS)
predefined_pad_test_LDADD = $(top_builddir)/ompi/libmpi.la
predefined_pad_test_LDADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la
predefined_pad_test_DEPENDENCIES = $(ompi_predefined_LDADD)

# Conditionally install the header files
Expand Down
3 changes: 2 additions & 1 deletion ompi/dpm/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- makefile -*-
#
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -13,6 +14,6 @@
headers += \
dpm/dpm.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
dpm/dpm.c

3 changes: 2 additions & 1 deletion ompi/errhandler/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -28,7 +29,7 @@ headers += \
errhandler/errhandler.h \
errhandler/errhandler_predefined.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
errhandler/errhandler.c \
errhandler/errhandler_invoke.c \
errhandler/errhandler_predefined.c \
Expand Down
3 changes: 2 additions & 1 deletion ompi/file/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -21,5 +22,5 @@
headers += \
file/file.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
file/file.c
5 changes: 3 additions & 2 deletions ompi/group/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2007 University of Houston. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -24,11 +25,11 @@ headers += \
group/group.h \
group/group_dbg.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
group/group.c \
group/group_init.c \
group/group_set_rank.c \
group/group_plist.c \
group/group_sporadic.c \
group/group_strided.c \
group/group_bitmap.c
group/group_bitmap.c
3 changes: 2 additions & 1 deletion ompi/info/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -22,5 +23,5 @@
headers += \
info/info.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
info/info.c
3 changes: 2 additions & 1 deletion ompi/message/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -23,5 +24,5 @@
headers += \
message/message.h

libmpi_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
message/message.c
13 changes: 7 additions & 6 deletions ompi/mpi/cxx/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -27,23 +28,23 @@ AM_CPPFLAGS = -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1

if BUILD_MPI_CXX_BINDINGS

mpi_lib = libmpi_cxx.la
mpi_lib = lib@OMPI_LIBMPI_NAME@_cxx.la

lib_LTLIBRARIES = libmpi_cxx.la
libmpi_cxx_la_SOURCES = \
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_cxx.la
lib@OMPI_LIBMPI_NAME@_cxx_la_SOURCES = \
mpicxx.cc \
intercepts.cc \
comm.cc \
datatype.cc \
win.cc

if OMPI_PROVIDE_MPI_FILE_INTERFACE
libmpi_cxx_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_cxx_la_SOURCES += \
file.cc
endif

libmpi_cxx_la_LIBADD = $(top_builddir)/ompi/libmpi.la
libmpi_cxx_la_LDFLAGS = -version-info $(libmpi_cxx_so_version)
lib@OMPI_LIBMPI_NAME@_cxx_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la
lib@OMPI_LIBMPI_NAME@_cxx_la_LDFLAGS = -version-info $(libmpi_cxx_so_version)

headers = \
mpicxx.h \
Expand Down
Loading