Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 92fa842

Browse files
committed
fortran: link the opal-pal.la library directly
The libmpi_*.la fortran libraries make some direct calls to libopen-pal.la. In many (most?) cases, having libmpi_* link against libmpi is sufficient (because libmpi pulls in libopen-pal). But when building RPMs on SLES, some compiler/linker flags are used that seem to make this implicit linking not sufficient -- we get missing opal symbols when creating libmpi_mpifh.la. So link in open-pal directly (vs. indirectly), which solves the problem. (cherry picked from commit open-mpi/ompi@a7f897a)
1 parent 35e5360 commit 92fa842

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

ompi/mpi/fortran/mpif-h/Makefile.am

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# University of Stuttgart. All rights reserved.
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
12-
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
12+
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
1313
# Copyright (c) 2011-2013 Inria. All rights reserved.
1414
# Copyright (c) 2011-2013 Universite Bordeaux 1
1515
# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
@@ -55,7 +55,14 @@ AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1
5555

5656
lib_LTLIBRARIES =
5757
CLEANFILES =
58-
libmpi_mpifh_la_LIBADD = $(top_builddir)/ompi/libmpi.la $(OMPI_MPIEXT_MPIFH_LIBS)
58+
# Note that we invoke some OPAL functions directly in libmpi_mpifh.la,
59+
# so we need to link in the OPAL library directly (pulling it in
60+
# indirectly via libmpi.la does not work on all platforms).
61+
libmpi_mpifh_la_LIBADD = \
62+
$(top_builddir)/ompi/libmpi.la \
63+
$(OMPI_MPIEXT_MPIFH_LIBS) \
64+
$(OMPI_TOP_BUILDDIR)/opal/lib@[email protected]
65+
5966
libmpi_mpifh_la_LDFLAGS = -version-info $(libmpi_mpifh_so_version)
6067

6168
# Are we building the mpif.h bindings at all?

ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- makefile -*-
22
#
3-
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
3+
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2015 Research Organization for Information Science
55
# and Technology (RIST). All rights reserved.
66
#
@@ -48,6 +48,13 @@ nodist_libmpi_usempi_ignore_tkr_la_SOURCES += \
4848
mpi-ignore-tkr-sizeof.f90
4949
endif
5050

51+
# Note that we invoke some OPAL functions directly in
52+
# libmpi_usempi_ignore_tkr.la, so we need to link in the OPAL library
53+
# directly (pulling it in indirectly via libmpi.la does not work on
54+
# all platforms).
55+
libmpi_usempi_ignore_tkr_la_LIBADD = \
56+
$(OMPI_MPIEXT_USEMPI_LIBS) \
57+
$(OMPI_TOP_BUILDDIR)/opal/lib@[email protected]
5158
libmpi_usempi_ignore_tkr_la_LDFLAGS = \
5259
-version-info $(libmpi_usempi_ignore_tkr_so_version) \
5360
$(OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS)

ompi/mpi/fortran/use-mpi-tkr/Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# University of Stuttgart. All rights reserved.
1111
# Copyright (c) 2004-2005 The Regents of the University of California.
1212
# All rights reserved.
13-
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
1414
# Copyright (c) 2007 Los Alamos National Security, LLC. All rights
1515
# reserved.
1616
# Copyright (c) 2014-2015 Research Organization for Information Science
@@ -86,6 +86,13 @@ nodist_libmpi_usempi_la_SOURCES += \
8686
mpi-tkr-sizeof.f90
8787
endif
8888

89+
# Note that we invoke some OPAL functions directly in
90+
# libmpi_usempi.la, so we need to link in the OPAL library directly
91+
# (pulling it in indirectly via libmpi.la does not work on all
92+
# platforms).
93+
libmpi_usempi_la_LIBADD = \
94+
$(OMPI_MPIEXT_USEMPI_LIBS) \
95+
$(OMPI_TOP_BUILDDIR)/opal/lib@[email protected]
8996
# Set the library version
9097
libmpi_usempi_la_LDFLAGS = \
9198
-version-info $(libmpi_usempi_tkr_so_version) \

0 commit comments

Comments
 (0)