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 1 commit
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
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
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
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
3 changes: 2 additions & 1 deletion 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 Down Expand Up @@ -42,7 +43,7 @@ libmpi_cxx_la_SOURCES += \
file.cc
endif

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

headers = \
Expand Down
19 changes: 10 additions & 9 deletions ompi/mpi/fortran/mpif-h/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# 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 @@ -50,22 +51,22 @@ CLEANFILES =
# Note that we invoke some OPAL functions directly in libmpi_mpifh.la,
# so we need to link in the OPAL library directly (pulling it in
# indirectly via libmpi.la does not work on all platforms).
libmpi_mpifh_la_LIBADD = \
$(top_builddir)/ompi/libmpi.la \
lib@OMPI_LIBMPI_NAME@_mpifh_la_LIBADD = \
$(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la \
$(OMPI_MPIEXT_MPIFH_LIBS) \
$(OMPI_TOP_BUILDDIR)/opal/lib@[email protected]

libmpi_mpifh_la_LDFLAGS = -version-info $(libmpi_mpifh_so_version)
lib@OMPI_LIBMPI_NAME@_mpifh_la_LDFLAGS = -version-info $(libmpi_mpifh_so_version)

# Are we building the mpif.h bindings at all?
if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS
# If yes, then we need to build the installable library and the glue
# convenience library that will be sucked up into the main libmpi.
lib_LTLIBRARIES += libmpi_mpifh.la
lib_LTLIBRARIES += lib@OMPI_LIBMPI_NAME@_mpifh.la
# Do we need to suck in the convenience library from the lower
# directory?
if BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER
libmpi_mpifh_la_LIBADD += profile/libmpi_mpifh_pmpi.la
lib@OMPI_LIBMPI_NAME@_mpifh_la_LIBADD += profile/libmpi_mpifh_pmpi.la
endif
endif

Expand All @@ -77,7 +78,7 @@ headers = \
#
# These files are only built and added to libmpi_mpifh.la in certain cases.
#
libmpi_mpifh_la_SOURCES =
lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES =

# sizeof_f.f90 is generated based on some results from configure tests.
CLEANFILES += sizeof_f.f90
Expand Down Expand Up @@ -107,7 +108,7 @@ if BUILD_FORTRAN_SIZEOF
noinst_LTLIBRARIES += libmpi_mpifh_sizeof.la
# Do not dist this file; it is generated
nodist_libmpi_mpifh_sizeof_la_SOURCES = sizeof_f.f90
libmpi_mpifh_la_LIBADD += libmpi_mpifh_sizeof.la
lib@OMPI_LIBMPI_NAME@_mpifh_la_LIBADD += libmpi_mpifh_sizeof.la
endif

sizeof_pl = $(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl
Expand All @@ -123,7 +124,7 @@ sizeof_f.f90:
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)

if BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER
libmpi_mpifh_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
abort_f.c \
add_error_class_f.c \
add_error_code_f.c \
Expand Down Expand Up @@ -431,7 +432,7 @@ libmpi_mpifh_la_SOURCES += \
win_flush_local_all_f.c

if OMPI_PROVIDE_MPI_FILE_INTERFACE
libmpi_mpifh_la_SOURCES += \
lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
file_call_errhandler_f.c \
file_close_f.c \
file_create_errhandler_f.c \
Expand Down
Loading