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

build: Custom libmpi_FOO name fix for wrapper compilers #2142

Merged
merged 1 commit into from
Sep 30, 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
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-2016 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
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-2016 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2015-2016 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 @@ -500,7 +501,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
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
12 changes: 6 additions & 6 deletions ompi/mpi/cxx/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ AM_CPPFLAGS = -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1 -DOMPI_SKIP_MPICXX=1

if OMPI_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/lib@[email protected]
libmpi_cxx_la_LDFLAGS = -version-info $(libmpi_cxx_so_version)
lib@OMPI_LIBMPI_NAME@_cxx_la_LIBADD = $(top_builddir)/ompi/lib@[email protected]
lib@OMPI_LIBMPI_NAME@_cxx_la_LDFLAGS = -version-info $(libmpi_cxx_so_version)

headers = \
mpicxx.h \
Expand Down
8 changes: 4 additions & 4 deletions ompi/mpi/java/c/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ompidir = $(ompiincludedir)/ompi/mpi/java
ompi_HEADERS = \
$(headers)

lib_LTLIBRARIES = libmpi_java.la
libmpi_java_la_SOURCES = \
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_java.la
lib@OMPI_LIBMPI_NAME@_java_la_SOURCES = \
mpi_CartComm.c \
mpi_Comm.c \
mpi_Constant.c \
Expand All @@ -47,7 +47,7 @@ libmpi_java_la_SOURCES = \
mpi_Status.c \
mpi_Win.c

libmpi_java_la_LIBADD = -ldl $(top_builddir)/ompi/lib@[email protected]
libmpi_java_la_LDFLAGS = -version-info $(libmpi_java_so_version)
lib@OMPI_LIBMPI_NAME@_java_la_LIBADD = -ldl $(top_builddir)/ompi/lib@[email protected]
lib@OMPI_LIBMPI_NAME@_java_la_LDFLAGS = -version-info $(libmpi_java_so_version)

endif
4 changes: 2 additions & 2 deletions ompi/tools/wrappers/mpifort-wrapper-data.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ linker_flags=@OMPI_WRAPPER_EXTRA_FC_LDFLAGS@
# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are
# pulled in implicitly) because we intend MPI applications to only use
# the MPI API.
libs=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -l@OMPI_LIBMPI_NAME@
libs_static=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -l@OMPI_LIBMPI_NAME@ -l@ORTE_LIB_PREFIX@open-rte -l@OPAL_LIB_PREFIX@open-pal @OMPI_WRAPPER_EXTRA_LIBS@
libs=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@
libs_static=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@ -l@ORTE_LIB_PREFIX@open-rte -l@OPAL_LIB_PREFIX@open-pal @OMPI_WRAPPER_EXTRA_LIBS@
dyn_lib_file=lib@OMPI_LIBMPI_NAME@.@OPAL_DYN_LIB_SUFFIX@
static_lib_file=lib@[email protected]
required_file=@OMPI_WRAPPER_FORTRAN_REQUIRED_FILE@
Expand Down
2 changes: 1 addition & 1 deletion ompi/tools/wrappers/ompi-fort.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ pkgincludedir=@opalincludedir@
# static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private.
#
Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -lmpi_mpifh -l@OMPI_LIBMPI_NAME@
Libs: -L${libdir} @OMPI_PKG_CONFIG_LDFLAGS@ @OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@
Libs.private: -lopen-rte -lopen-pal @OMPI_WRAPPER_EXTRA_LIBS@
Cflags: -I${includedir} @OMPI_WRAPPER_EXTRA_CPPFLAGS@ @OMPI_WRAPPER_EXTRA_FCFLAGS@
2 changes: 1 addition & 1 deletion ompi/tools/wrappers/ompi_wrapper_script.in
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ elsif (basename($0) eq "mpifort" ||
# no extra includes for Fortran.
$comp_flags = $extra_fcflags;
$comp_flags_prefix = $extra_fcflags_prefix;
$libs = $fortran_libs . " -lmpi_mpifh " . $libs;
$libs = $fortran_libs . " -l".$ompi_libmpi_name."_mpifh " . $libs;
}

if ($lang eq "none") {
Expand Down
4 changes: 2 additions & 2 deletions oshmem/tools/wrappers/shmemfort-wrapper-data.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ linker_flags=@OMPI_WRAPPER_EXTRA_FC_LDFLAGS@
# intentionally only link in the SHMEM and MPI libraries (ORTE, OPAL,
# etc. are pulled in implicitly) because we intend SHMEM/MPI
# applications to only use the SHMEM and MPI APIs.
libs=-loshmem -lmpi_mpifh -l@OMPI_LIBMPI_NAME@
libs_static=-loshmem -lmpi_mpifh -l@OMPI_LIBMPI_NAME@ -l@ORTE_LIB_PREFIX@open-rte -l@OPAL_LIB_PREFIX@open-pal @OMPI_WRAPPER_EXTRA_LIBS@
libs=-loshmem -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@
libs_static=-loshmem -l@OMPI_LIBMPI_NAME@_mpifh -l@OMPI_LIBMPI_NAME@ -l@ORTE_LIB_PREFIX@open-rte -l@OPAL_LIB_PREFIX@open-pal @OMPI_WRAPPER_EXTRA_LIBS@
dyn_lib_file=liboshmem.@OPAL_DYN_LIB_SUFFIX@
static_lib_file=liboshmem.a
required_file=@OMPI_WRAPPER_FORTRAN_REQUIRED_FILE@
Expand Down