From 945f830f7a47acec52f02ec8d215c159f53550cd Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 6 Feb 2019 10:35:20 +0900 Subject: [PATCH 1/5] mtl/ofi: fix configury when VPATH is used Signed-off-by: Gilles Gouaillardet --- ompi/mca/mtl/ofi/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/mtl/ofi/Makefile.am b/ompi/mca/mtl/ofi/Makefile.am index 2499f8589d..5d04c08c77 100644 --- a/ompi/mca/mtl/ofi/Makefile.am +++ b/ompi/mca/mtl/ofi/Makefile.am @@ -55,7 +55,7 @@ mtl_ofi_sources = \ # files should be added to generated_source_modules, as well as adding # their .c variants to generated_sources. %.c : %.pm; - $(PERL) generate-opt-funcs.pl $@ + $(PERL) -I$(top_srcdir)/ompi/mca/mtl/ofi $(top_srcdir)/ompi/mca/mtl/ofi/generate-opt-funcs.pl $@ # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la From aba2571881951a5fc88574125bc374a30f4cdd98 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 6 Feb 2019 04:52:24 -0800 Subject: [PATCH 2/5] mtl/ofi/Makefile.am: down with tabs! Replace all tabs with spaces. No code or logic changes. Signed-off-by: Jeff Squyres --- ompi/mca/mtl/ofi/Makefile.am | 44 ++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ompi/mca/mtl/ofi/Makefile.am b/ompi/mca/mtl/ofi/Makefile.am index 5d04c08c77..26c45b9618 100644 --- a/ompi/mca/mtl/ofi/Makefile.am +++ b/ompi/mca/mtl/ofi/Makefile.am @@ -13,40 +13,40 @@ # EXTRA_DIST = post_configure.sh \ - $(generated_source_modules) + $(generated_source_modules) MAINTAINERCLEANFILES = \ - $(generated_sources) + $(generated_sources) AM_CPPFLAGS = $(ompi_mtl_ofi_CPPFLAGS) $(opal_common_ofi_CPPFLAGS) dist_ompidata_DATA = help-mtl-ofi.txt generated_source_modules = \ - mtl_ofi_send_opt.pm \ - mtl_ofi_isend_opt.pm \ - mtl_ofi_irecv_opt.pm \ - mtl_ofi_iprobe_opt.pm \ - mtl_ofi_improbe_opt.pm + mtl_ofi_send_opt.pm \ + mtl_ofi_isend_opt.pm \ + mtl_ofi_irecv_opt.pm \ + mtl_ofi_iprobe_opt.pm \ + mtl_ofi_improbe_opt.pm generated_sources = \ - mtl_ofi_send_opt.c \ - mtl_ofi_isend_opt.c \ - mtl_ofi_irecv_opt.c \ - mtl_ofi_iprobe_opt.c \ - mtl_ofi_improbe_opt.c + mtl_ofi_send_opt.c \ + mtl_ofi_isend_opt.c \ + mtl_ofi_irecv_opt.c \ + mtl_ofi_iprobe_opt.c \ + mtl_ofi_improbe_opt.c mtl_ofi_sources = \ - mtl_ofi.h \ - mtl_ofi.c \ - mtl_ofi_compat.h \ - mtl_ofi_component.c \ - mtl_ofi_endpoint.h \ - mtl_ofi_endpoint.c \ - mtl_ofi_request.h \ - mtl_ofi_types.h \ - mtl_ofi_opt.h \ - $(generated_sources) + mtl_ofi.h \ + mtl_ofi.c \ + mtl_ofi_compat.h \ + mtl_ofi_component.c \ + mtl_ofi_endpoint.h \ + mtl_ofi_endpoint.c \ + mtl_ofi_request.h \ + mtl_ofi_types.h \ + mtl_ofi_opt.h \ + $(generated_sources) # A number of files are generated from macro expansion to minimize # branches in the critical path. These files have perl modules with the suffix From b556cabfe937f84f30e8870e0a8c128b839e5dfd Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 6 Feb 2019 05:20:42 -0800 Subject: [PATCH 3/5] btl/ofi/Makefile.am: down with tabs! Replace all tabs with spaces. No code or logic changes. Signed-off-by: Jeff Squyres --- opal/mca/btl/ofi/Makefile.am | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/opal/mca/btl/ofi/Makefile.am b/opal/mca/btl/ofi/Makefile.am index b2250dc7ce..13693a287a 100644 --- a/opal/mca/btl/ofi/Makefile.am +++ b/opal/mca/btl/ofi/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2013 NVIDIA Corporation. All rights reserved. # Copyright (c) 2017 IBM Corporation. All rights reserved. # Copyright (c) 2018 Intel, inc. All rights reserved @@ -25,16 +25,16 @@ AM_CPPFLAGS = $(opal_common_ofi_CPPFLAGS) sources = \ btl_ofi.h \ - btl_ofi_component.c \ - btl_ofi_endpoint.h \ - btl_ofi_endpoint.c \ - btl_ofi_module.c \ - btl_ofi_rdma.h \ - btl_ofi_rdma.c \ - btl_ofi_atomics.c \ - btl_ofi_frag.c \ - btl_ofi_frag.h \ - btl_ofi_context.c + btl_ofi_component.c \ + btl_ofi_endpoint.h \ + btl_ofi_endpoint.c \ + btl_ofi_module.c \ + btl_ofi_rdma.h \ + btl_ofi_rdma.c \ + btl_ofi_atomics.c \ + btl_ofi_frag.c \ + btl_ofi_frag.h \ + btl_ofi_context.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la From f5e1a672ccd5db127e85e1e8f6bcfeb8a8b04527 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 29 Jan 2019 13:10:26 +0900 Subject: [PATCH 4/5] ofi: revamp OPAL_CHECK_OFI configury Update the OPAL_CHECK_OFI configury macro: - Make it safe to call the macro multiple times: - The checks only execute the first time it is invoked - Subsequent invocations, it just emits a friendly "checking..." message so that configure output is sensible/logical - With the goal of ultimately removing opal/mca/common/ofi, rename the output variables from OPAL_CHECK_OFI to be opal_ofi_{happy|CPPFLAGS|LDFLAGS|LIBS}. - Update btl/ofi, btl/usnic, and mtl/ofi for these new conventions. - Also, don't use AC_REQUIRE to invoke OPAL_CHECK_OFI because that causes the macro to be invoked at a fairly random time, which makes configure stdout confusing / hard to grok. - Remove a little left-over kruft in OPAL_CHECK_OFI, too (which resulted in an indenting change, making the change to opal_check_ofi.m4 look larger than it really is). Thanks Alastair McKinstry for the report and initial fix. Thanks Rashika Kheria for the reminder. Signed-off-by: Jeff Squyres --- config/opal_check_ofi.m4 | 192 +++++++++++++++++--------------- ompi/mca/mtl/ofi/Makefile.am | 15 +-- ompi/mca/mtl/ofi/configure.m4 | 8 +- opal/mca/btl/ofi/Makefile.am | 9 +- opal/mca/btl/ofi/configure.m4 | 9 +- opal/mca/btl/usnic/Makefile.am | 13 ++- opal/mca/btl/usnic/configure.m4 | 16 +-- 7 files changed, 140 insertions(+), 122 deletions(-) diff --git a/config/opal_check_ofi.m4 b/config/opal_check_ofi.m4 index f57cfae4e6..339039c0e1 100644 --- a/config/opal_check_ofi.m4 +++ b/config/opal_check_ofi.m4 @@ -1,6 +1,6 @@ dnl -*- shell-script -*- dnl -dnl Copyright (c) 2015-2016 Cisco Systems, Inc. All rights reserved. +dnl Copyright (c) 2015-2019 Cisco Systems, Inc. All rights reserved. dnl Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights dnl reserved. dnl $COPYRIGHT$ @@ -10,102 +10,116 @@ dnl dnl $HEADER$ dnl +dnl +dnl _OPAL_CHECK_OFI +dnl -------------------------------------------------------- +dnl Do the real work of checking for OFI libfabric. +dnl Upon return: +dnl +dnl - opal_ofi_happy: will be "yes" or "no" +dnl - opal_ofi_{CPPFLAGS|LDFLAGS|LIBS} will be loaded (if relevant) +dnl +AC_DEFUN([_OPAL_CHECK_OFI],[ + # Add --with options + AC_ARG_WITH([libfabric], + [AC_HELP_STRING([--with-libfabric=DIR], + [Deprecated synonym for --with-ofi])]) + AC_ARG_WITH([libfabric-libdir], + [AC_HELP_STRING([--with-libfabric-libdir=DIR], + [Deprecated synonym for --with-ofi-libdir])]) -# OPAL_CHECK_OFI(prefix, [action-if-found], [action-if-not-found] -# -------------------------------------------------------- -# Check if libfabric support can be found. -# -# Sets prefix_{CPPFLAGS, LDFLAGs, LIBS} as needed and runs -# action-if-found if there is support; otherwise executes -# action-if-not-found. -# -AC_DEFUN([OPAL_CHECK_OFI],[ - if test -z "$opal_check_libfabric_happy" ; then - OPAL_VAR_SCOPE_PUSH([opal_check_libfabric_$1_save_CPPFLAGS opal_check_libfabric_$1_save_LDFLAGS opal_check_libfabric_$1_save_LIBS]) + AC_ARG_WITH([ofi], + [AC_HELP_STRING([--with-ofi=DIR], + [Specify location of OFI libfabric installation, adding DIR/include to the default search location for libfabric headers, and DIR/lib or DIR/lib64 to the default search location for libfabric libraries. Error if libfabric support cannot be found.])]) - # Add --with options - AC_ARG_WITH([libfabric], - [AC_HELP_STRING([--with-libfabric=DIR], - [Deprecated synonym for --with-ofi])]) - AC_ARG_WITH([libfabric-libdir], - [AC_HELP_STRING([--with-libfabric-libdir=DIR], - [Deprecated synonym for --with-ofi-libdir])]) + AC_ARG_WITH([ofi-libdir], + [AC_HELP_STRING([--with-ofi-libdir=DIR], + [Search for OFI libfabric libraries in DIR])]) - AC_ARG_WITH([ofi], - [AC_HELP_STRING([--with-ofi=DIR], - [Specify location of OFI libfabric installation, adding DIR/include to the default search location for libfabric headers, and DIR/lib or DIR/lib64 to the default search location for libfabric libraries. Error if libfabric support cannot be found.])]) - - AC_ARG_WITH([ofi-libdir], - [AC_HELP_STRING([--with-ofi-libdir=DIR], - [Search for OFI libfabric libraries in DIR])]) - - if test "$with_ofi" = ""; then - with_ofi=$with_libfabric - fi - - if test "$with_ofi_libdir" = ""; then - with_ofi_libdir=$with_libfabric_libdir - fi - - # Sanity check the --with values - OPAL_CHECK_WITHDIR([ofi], [$with_ofi], - [include/rdma/fabric.h]) - OPAL_CHECK_WITHDIR([ofi-libdir], [$with_ofi_libdir], - [libfabric.*]) - - opal_check_ofi_$1_save_CPPFLAGS=$CPPFLAGS - opal_check_ofi_$1_save_LDFLAGS=$LDFLAGS - opal_check_ofi_$1_save_LIBS=$LIBS - - opal_check_ofi_happy=yes - AS_IF([test "$with_ofi" = "no"], - [opal_check_ofi_happy=no]) - - AS_IF([test $opal_check_ofi_happy = yes], - [AC_MSG_CHECKING([looking for OFI libfabric in]) - AS_IF([test "$with_ofi" != "yes"], - [opal_ofi_dir=$with_ofi - AC_MSG_RESULT([($opal_ofi_dir)])], - [AC_MSG_RESULT([(default search paths)])]) - AS_IF([test ! -z "$with_ofi_libdir" && \ - test "$with_ofi_libdir" != "yes"], - [opal_ofi_libdir=$with_ofi_libdir]) - ]) - - AS_IF([test $opal_check_ofi_happy = yes], - [OPAL_CHECK_PACKAGE([opal_check_ofi], - [rdma/fabric.h], - [fabric], - [fi_getinfo], - [], - [$opal_ofi_dir], - [$opal_ofi_libdir], - [], - [opal_check_ofi_happy=no])]) - - CPPFLAGS=$opal_check_ofi_$1_save_CPPFLAGS - LDFLAGS=$opal_check_ofi_$1_save_LDFLAGS - LIBS=$opal_check_ofi_$1_save_LIBS - - OPAL_SUMMARY_ADD([[Transports]],[[OpenFabrics Libfabric]],[$1],[$opal_check_ofi_happy]) - - OPAL_VAR_SCOPE_POP + if test "$with_ofi" = ""; then + with_ofi=$with_libfabric fi - if test $opal_check_ofi_happy = yes ; then - $1_CPPFLAGS="[$]$1_CPPFLAGS $opal_check_ofi_CPPFLAGS" - $1_LIBS="[$]$1_LIBS $opal_check_ofi_LIBS" - $1_LDFLAGS="[$]$1_LDFLAGS $opal_check_ofi_LDFLAGS" - - AC_SUBST($1_CPPFLAGS) - AC_SUBST($1_LDFLAGS) - AC_SUBST($1_LIBS) + if test "$with_ofi_libdir" = ""; then + with_ofi_libdir=$with_libfabric_libdir fi - AS_IF([test $opal_check_ofi_happy = yes], - [$2], + # Sanity check the --with values + OPAL_CHECK_WITHDIR([ofi], [$with_ofi], + [include/rdma/fabric.h]) + OPAL_CHECK_WITHDIR([ofi-libdir], [$with_ofi_libdir], + [libfabric.*]) + + OPAL_VAR_SCOPE_PUSH([opal_check_ofi_save_CPPFLAGS opal_check_ofi_save_LDFLAGS opal_check_ofi_save_LIBS]) + opal_check_ofi_save_CPPFLAGS=$CPPFLAGS + opal_check_ofi_save_LDFLAGS=$LDFLAGS + opal_check_ofi_save_LIBS=$LIBS + + opal_ofi_happy=yes + AS_IF([test "$with_ofi" = "no"], + [opal_ofi_happy=no]) + + AS_IF([test $opal_ofi_happy = yes], + [AC_MSG_CHECKING([looking for OFI libfabric in]) + AS_IF([test "$with_ofi" != "yes"], + [opal_ofi_dir=$with_ofi + AC_MSG_RESULT([($opal_ofi_dir)])], + [AC_MSG_RESULT([(default search paths)])]) + AS_IF([test ! -z "$with_ofi_libdir" && \ + test "$with_ofi_libdir" != "yes"], + [opal_ofi_libdir=$with_ofi_libdir]) + ]) + + AS_IF([test $opal_ofi_happy = yes], + [OPAL_CHECK_PACKAGE([opal_ofi], + [rdma/fabric.h], + [fabric], + [fi_getinfo], + [], + [$opal_ofi_dir], + [$opal_ofi_libdir], + [], + [opal_ofi_happy=no])]) + + CPPFLAGS=$opal_check_ofi_save_CPPFLAGS + LDFLAGS=$opal_check_ofi_save_LDFLAGS + LIBS=$opal_check_ofi_save_LIBS + + AC_SUBST([opal_ofi_CPPFLAGS]) + AC_SUBST([opal_ofi_LDFLAGS]) + AC_SUBST([opal_ofi_LIBS]) + + OPAL_SUMMARY_ADD([[Transports]],[[OpenFabrics OFI Libfabric]],[],[$opal_ofi_happy]) + + OPAL_VAR_SCOPE_POP + + AS_IF([test $opal_ofi_happy = no], [AS_IF([test -n "$with_ofi" && test "$with_ofi" != "no"], [AC_MSG_WARN([OFI libfabric support requested (via --with-ofi or --with-libfabric), but not found.]) AC_MSG_ERROR([Cannot continue.])]) - $3]) + ]) ])dnl + + +dnl +dnl OPAL_CHECK_OFI +dnl -------------------------------------------------------- +dnl Check to see if OFI libfabric is available. +dnl +dnl This is a simple wrapper around _OPAL_CHECK_OFI that just +dnl ensures to only run the checks once. We do not use AC_REQUIRE +dnl because that re-orders the texts and makes ordering in stdout +dnl quite confusing / difficult to grok. +dnl +AC_DEFUN([OPAL_CHECK_OFI],[ + # Check for OFI libfabric. Note that $opal_ofi_happy is used in + # other configure.m4's to know if OFI/libfabric configured + # successfully. We only need to run the back-end checks once, but + # at least emit a "checking..." statement each subsequent time + # this macro is invoked so that configure's stdout has + # sensible/logical output. + AS_IF([test -z "$opal_ofi_happy"], + [_OPAL_CHECK_OFI], + [AC_MSG_CHECKING([if OFI libfabric is available]) + AC_MSG_RESULT([$opal_ofi_happy])]) +]) diff --git a/ompi/mca/mtl/ofi/Makefile.am b/ompi/mca/mtl/ofi/Makefile.am index 26c45b9618..81526a35e2 100644 --- a/ompi/mca/mtl/ofi/Makefile.am +++ b/ompi/mca/mtl/ofi/Makefile.am @@ -1,10 +1,12 @@ # # Copyright (c) 2013-2015 Intel, Inc. All rights reserved # -# Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2017 Los Alamos National Security, LLC. All rights # reserved. # Copyright (c) 2017 IBM Corporation. All rights reserved. +# Copyright (c) 2019 Research Organization for Information Science +# and Technology (RIST). All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -18,7 +20,7 @@ EXTRA_DIST = post_configure.sh \ MAINTAINERCLEANFILES = \ $(generated_sources) -AM_CPPFLAGS = $(ompi_mtl_ofi_CPPFLAGS) $(opal_common_ofi_CPPFLAGS) +AM_CPPFLAGS = $(opal_ofi_CPPFLAGS) dist_ompidata_DATA = help-mtl-ofi.txt @@ -73,15 +75,14 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources) mca_mtl_ofi_la_LDFLAGS = \ - $(ompi_mtl_ofi_LDFLAGS) \ + $(opal_ofi_LDFLAGS) \ -module -avoid-version mca_mtl_ofi_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la \ - $(ompi_mtl_ofi_LIBS) \ - $(OPAL_TOP_BUILDDIR)/opal/mca/common/ofi/lib@OPAL_LIB_PREFIX@mca_common_ofi.la + $(opal_ofi_LIBS) noinst_LTLIBRARIES = $(component_noinst) libmca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources) libmca_mtl_ofi_la_LDFLAGS = \ - $(ompi_mtl_ofi_LDFLAGS) \ + $(opal_ofi_LDFLAGS) \ -module -avoid-version -libmca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS) +libmca_mtl_ofi_la_LIBADD = $(opal_ofi_LIBS) diff --git a/ompi/mca/mtl/ofi/configure.m4 b/ompi/mca/mtl/ofi/configure.m4 index 772cd75cfa..7bf981dba9 100644 --- a/ompi/mca/mtl/ofi/configure.m4 +++ b/ompi/mca/mtl/ofi/configure.m4 @@ -2,7 +2,7 @@ # # Copyright (c) 2013-2014 Intel, Inc. All rights reserved # -# Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2014-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2017 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ @@ -25,10 +25,10 @@ AC_DEFUN([MCA_ompi_mtl_ofi_POST_CONFIG], [ AC_DEFUN([MCA_ompi_mtl_ofi_CONFIG],[ AC_CONFIG_FILES([ompi/mca/mtl/ofi/Makefile]) - # ensure we already ran the common OFI/libfabric config - AC_REQUIRE([MCA_opal_common_ofi_CONFIG]) + # Check for OFI + OPAL_CHECK_OFI - AS_IF([test "$opal_common_ofi_happy" = "yes"], + AS_IF([test "$opal_ofi_happy" = "yes"], [$1], [$2]) ])dnl diff --git a/opal/mca/btl/ofi/Makefile.am b/opal/mca/btl/ofi/Makefile.am index 13693a287a..71d9542a8d 100644 --- a/opal/mca/btl/ofi/Makefile.am +++ b/opal/mca/btl/ofi/Makefile.am @@ -22,7 +22,7 @@ #dist_opaldata_DATA = help-mpi-btl-ofi.txt -AM_CPPFLAGS = $(opal_common_ofi_CPPFLAGS) +AM_CPPFLAGS = $(opal_ofi_CPPFLAGS) sources = \ btl_ofi.h \ btl_ofi_component.c \ @@ -56,10 +56,11 @@ mcacomponentdir = $(opallibdir) mcacomponent_LTLIBRARIES = $(component) mca_btl_ofi_la_SOURCES = $(component_sources) mca_btl_ofi_la_LDFLAGS = -module -avoid-version \ - $(opal_common_ofi_LDFLAGS) + $(opal_ofi_LDFLAGS) mca_btl_ofi_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ - $(OPAL_TOP_BUILDDIR)/opal/mca/common/ofi/lib@OPAL_LIB_PREFIX@mca_common_ofi.la + $(opal_ofi_LIBS) noinst_LTLIBRARIES = $(lib) libmca_btl_ofi_la_SOURCES = $(lib_sources) -libmca_btl_ofi_la_LDFLAGS = -module -avoid-version $(opal_common_ofi_LDFLAGS) +libmca_btl_ofi_la_LDFLAGS = -module -avoid-version $(opal_ofi_LDFLAGS) +libmca_btl_ofi_la_LIBS = $(opal_ofi_LIBS) diff --git a/opal/mca/btl/ofi/configure.m4 b/opal/mca/btl/ofi/configure.m4 index 222a7b29e0..23c7370e48 100644 --- a/opal/mca/btl/ofi/configure.m4 +++ b/opal/mca/btl/ofi/configure.m4 @@ -11,7 +11,7 @@ # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # Copyright (c) 2006 QLogic Corp. All rights reserved. -# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2009-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2011-2018 Los Alamos National Security, LLC. # All rights reserved. # Copyright (c) 2018 Intel, inc. All rights reserved @@ -34,12 +34,13 @@ AC_DEFUN([MCA_opal_btl_ofi_CONFIG],[ AC_CONFIG_FILES([opal/mca/btl/ofi/Makefile]) - AC_REQUIRE([MCA_opal_common_ofi_CONFIG]) + # Check for OFI + OPAL_CHECK_OFI opal_btl_ofi_happy=0 - AS_IF([test "$opal_common_ofi_happy" = "yes"], + AS_IF([test "$opal_ofi_happy" = "yes"], [CPPFLAGS_save=$CPPFLAGS - CPPFLAGS="$opal_common_ofi_CPPFLAGS $CPPFLAGS" + CPPFLAGS="$opal_ofi_CPPFLAGS $CPPFLAGS" AC_CHECK_DECL([FI_MR_VIRT_ADDR], [opal_btl_ofi_happy=1], [], [#include ]) CPPFLAGS=$CPPFLAGS_save]) diff --git a/opal/mca/btl/usnic/Makefile.am b/opal/mca/btl/usnic/Makefile.am index ecd3099dc6..9a270c043b 100644 --- a/opal/mca/btl/usnic/Makefile.am +++ b/opal/mca/btl/usnic/Makefile.am @@ -11,7 +11,7 @@ # All rights reserved. # Copyright (c) 2006 Sandia National Laboratories. All rights # reserved. -# Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2015 Intel, Inc. All rights reserved. # Copyright (c) 2016-2017 IBM Corporation. All rights reserved. # Copyright (c) 2017 Los Alamos National Security, LLC. All rights @@ -23,7 +23,7 @@ # $HEADER$ # -AM_CPPFLAGS = -DBTL_IN_OPAL=1 $(opal_common_ofi_CPPFLAGS) -DOMPI_LIBMPI_NAME=\"$(OMPI_LIBMPI_NAME)\" +AM_CPPFLAGS = -DBTL_IN_OPAL=1 $(opal_ofi_CPPFLAGS) -DOMPI_LIBMPI_NAME=\"$(OMPI_LIBMPI_NAME)\" EXTRA_DIST = README.txt README.test @@ -88,13 +88,18 @@ mcacomponent_LTLIBRARIES = $(component) mca_btl_usnic_la_SOURCES = $(component_sources) mca_btl_usnic_la_LDFLAGS = \ $(opal_btl_usnic_LDFLAGS) \ + $(opal_ofi_LDFLAGS) \ -module -avoid-version mca_btl_usnic_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \ - $(OPAL_TOP_BUILDDIR)/opal/mca/common/ofi/lib@OPAL_LIB_PREFIX@mca_common_ofi.la + $(opal_ofi_LIBS) noinst_LTLIBRARIES = $(lib) libmca_btl_usnic_la_SOURCES = $(lib_sources) -libmca_btl_usnic_la_LDFLAGS = -module -avoid-version $(opal_btl_usnic_LDFLAGS) +libmca_btl_usnic_la_LDFLAGS = \ + $(opal_btl_usnic_LDFLAGS) \ + $(opal_ofi_LDFLAGS) \ + -module -avoid-version +libmca_btl_usnic_la_LIBADD = $(opal_ofi_LIBS) if OPAL_BTL_USNIC_BUILD_UNIT_TESTS usnic_btl_run_tests_CPPFLAGS = \ diff --git a/opal/mca/btl/usnic/configure.m4 b/opal/mca/btl/usnic/configure.m4 index 33d5dacdb7..0e75e625a1 100644 --- a/opal/mca/btl/usnic/configure.m4 +++ b/opal/mca/btl/usnic/configure.m4 @@ -12,7 +12,7 @@ # All rights reserved. # Copyright (c) 2006 Sandia National Laboratories. All rights # reserved. -# Copyright (c) 2010-2017 Cisco Systems, Inc. All rights reserved +# Copyright (c) 2010-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2017 Los Alamos National Security, LLC. All rights # reserved. # $COPYRIGHT$ @@ -95,21 +95,17 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[ AC_MSG_RESULT([$opal_btl_usnic_happy]) ]) - # The usnic BTL requires OFI libfabric support. AS_IF([test "$opal_btl_usnic_happy" = "yes"], - [AC_MSG_CHECKING([whether OFI libfabric support is available]) - AS_IF([test "$opal_common_ofi_happy" = "yes"], - [opal_btl_usnic_happy=yes], - [opal_btl_usnic_happy=no]) - AC_MSG_RESULT([$opal_btl_usnic_happy]) - ]) + [ # The usnic BTL requires OFI libfabric support + OPAL_CHECK_OFI + opal_btl_usnic_happy=$opal_ofi_happy]) # The usnic BTL requires at least OFI libfabric v1.1 (there was a # critical bug in libfabric v1.0). AS_IF([test "$opal_btl_usnic_happy" = "yes"], [AC_MSG_CHECKING([whether OFI libfabric is >= v1.1]) opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS - CPPFLAGS="$opal_common_ofi_CPPFLAGS $CPPFLAGS" + CPPFLAGS="$opal_ofi_CPPFLAGS $CPPFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ #if !defined(FI_MAJOR_VERSION) @@ -127,7 +123,7 @@ AC_DEFUN([_OPAL_BTL_USNIC_DO_CONFIG],[ # Make sure we can find the OFI libfabric usnic extensions header AS_IF([test "$opal_btl_usnic_happy" = "yes" ], [opal_btl_usnic_CPPFLAGS_save=$CPPFLAGS - CPPFLAGS="$opal_common_ofi_CPPFLAGS $CPPFLAGS" + CPPFLAGS="$opal_ofi_CPPFLAGS $CPPFLAGS" AC_CHECK_HEADER([rdma/fi_ext_usnic.h], [], [opal_btl_usnic_happy=no]) From dd20174532928e0c9cdbe7b206868e6e4bea9d0b Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 6 Feb 2019 04:53:14 -0800 Subject: [PATCH 5/5] Remove opal/mca/common/ofi. It never lived up to its purpose (and has caused amorphous indirect errors such as https://github.com/open-mpi/ompi/issues/2519), so delete it. Signed-off-by: Jeff Squyres --- VERSION | 3 +- configure.ac | 3 +- opal/mca/common/ofi/Makefile.am | 105 ------------------------------- opal/mca/common/ofi/common_ofi.c | 23 ------- opal/mca/common/ofi/common_ofi.h | 18 ------ opal/mca/common/ofi/configure.m4 | 32 ---------- opal/mca/common/ofi/owner.txt | 7 --- 7 files changed, 2 insertions(+), 189 deletions(-) delete mode 100644 opal/mca/common/ofi/Makefile.am delete mode 100644 opal/mca/common/ofi/common_ofi.c delete mode 100644 opal/mca/common/ofi/common_ofi.h delete mode 100644 opal/mca/common/ofi/configure.m4 delete mode 100644 opal/mca/common/ofi/owner.txt diff --git a/VERSION b/VERSION index b766a19165..ae9aef43ad 100644 --- a/VERSION +++ b/VERSION @@ -1,5 +1,5 @@ # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. -# Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2008-2019 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011 NVIDIA Corporation. All rights reserved. # Copyright (c) 2013 Mellanox Technologies, Inc. # All rights reserved. @@ -110,7 +110,6 @@ libmca_orte_common_alps_so_version=0:0:0 # OPAL layer libmca_opal_common_cuda_so_version=0:0:0 -libmca_opal_common_ofi_so_version=0:0:0 libmca_opal_common_sm_so_version=0:0:0 libmca_opal_common_ucx_so_version=0:0:0 libmca_opal_common_ugni_so_version=0:0:0 diff --git a/configure.ac b/configure.ac index 24f83b73d9..21a8a7f136 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2006-2018 Cisco Systems, Inc. All rights reserved +# Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved # Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. # Copyright (c) 2006-2017 Los Alamos National Security, LLC. All rights # reserved. @@ -154,7 +154,6 @@ AC_SUBST(libopen_pal_so_version) # transparently by adding some intelligence in autogen.pl # and/or opal_mca.m4, but I don't have the cycles to do this # right now. -AC_SUBST(libmca_opal_common_ofi_so_version) AC_SUBST(libmca_opal_common_cuda_so_version) AC_SUBST(libmca_opal_common_sm_so_version) AC_SUBST(libmca_opal_common_ugni_so_version) diff --git a/opal/mca/common/ofi/Makefile.am b/opal/mca/common/ofi/Makefile.am deleted file mode 100644 index 658e1a703f..0000000000 --- a/opal/mca/common/ofi/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -# -# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana -# University Research and Technology -# Corporation. All rights reserved. -# Copyright (c) 2004-2013 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, -# University of Stuttgart. All rights reserved. -# Copyright (c) 2004-2005 The Regents of the University of California. -# All rights reserved. -# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. -# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2015 Intel, Inc. All rights reserved. -# Copyright (c) 2017 Los Alamos National Security, LLC. All rights -# reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# A word of explanation... -# -# This library is linked against various MCA components because the -# support for ofis is needed in various places. -# -# Note that building this common component statically and linking -# against other dynamic components is *not* supported! - -AM_CPPFLAGS = $(opal_common_ofi_CPPFLAGS) - -# Header files - -headers = \ - common_ofi.h - -# Source files - -sources = \ - common_ofi.c - -# As per above, we'll either have an installable or noinst result. -# The installable one should follow the same MCA prefix naming rules -# (i.e., libmca__.la). The noinst one can be named -# whatever it wants, although libmca___noinst.la is -# recommended. - -# To simplify components that link to this library, we will *always* -# have an output libtool library named libmca__.la -- even -# for case 2) described above (i.e., so there's no conditional logic -# necessary in component Makefile.am's that link to this library). -# Hence, if we're creating a noinst version of this library (i.e., -# case 2), we sym link it to the libmca__.la name -# (libtool will do the Right Things under the covers). See the -# all-local and clean-local rules, below, for how this is effected. - -lib_LTLIBRARIES = -noinst_LTLIBRARIES = -comp_inst = lib@OPAL_LIB_PREFIX@mca_common_ofi.la -comp_noinst = lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst.la - - -if MCA_BUILD_opal_common_ofi_DSO -lib_LTLIBRARIES += $(comp_inst) -else -noinst_LTLIBRARIES += $(comp_noinst) -endif - -lib@OPAL_LIB_PREFIX@mca_common_ofi_la_SOURCES = $(headers) $(sources) -lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LDFLAGS = \ - $(opal_common_ofi_LDFLAGS) \ - -version-info $(libmca_opal_common_ofi_so_version) -lib@OPAL_LIB_PREFIX@mca_common_ofi_la_LIBADD = $(opal_common_ofi_LIBS) - -lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_SOURCES = $(headers) $(sources) -lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LDFLAGS = $(opal_common_ofi_LDFLAGS) -lib@OPAL_LIB_PREFIX@mca_common_ofi_noinst_la_LIBADD = $(opal_common_ofi_LIBS) - -# Conditionally install the header files - -if WANT_INSTALL_HEADERS -opaldir = $(opalincludedir)/$(subdir) -opal_HEADERS = $(headers) -endif - -# These two rules will sym link the "noinst" libtool library filename -# to the installable libtool library filename in the case where we are -# compiling this component statically (case 2), described above). - -V=0 -OMPI_V_LN_SCOMP = $(ompi__v_LN_SCOMP_$V) -ompi__v_LN_SCOMP_ = $(ompi__v_LN_SCOMP_$AM_DEFAULT_VERBOSITY) -ompi__v_LN_SCOMP_0 = @echo " LN_S " `basename $(comp_inst)`; - -all-local: - $(OMPI_V_LN_SCOMP) if test -z "$(lib_LTLIBRARIES)"; then \ - rm -f "$(comp_inst)"; \ - $(LN_S) "$(comp_noinst)" "$(comp_inst)"; \ - fi - -clean-local: - if test -z "$(lib_LTLIBRARIES)"; then \ - rm -f "$(comp_inst)"; \ - fi diff --git a/opal/mca/common/ofi/common_ofi.c b/opal/mca/common/ofi/common_ofi.c deleted file mode 100644 index c2d02be50b..0000000000 --- a/opal/mca/common/ofi/common_ofi.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2015 Intel, Inc. All rights reserved. - * Copyright (c) 2017 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "opal_config.h" -#include "opal/constants.h" - -#include -#include - -#include "common_ofi.h" - -int mca_common_ofi_register_mca_variables(void) -{ - return OPAL_SUCCESS; -} diff --git a/opal/mca/common/ofi/common_ofi.h b/opal/mca/common/ofi/common_ofi.h deleted file mode 100644 index bb5a04f35a..0000000000 --- a/opal/mca/common/ofi/common_ofi.h +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ -/* - * Copyright (c) 2015 Intel, Inc. All rights reserved. - * Copyright (c) 2017 Los Alamos National Security, LLC. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef OPAL_MCA_COMMON_OFI_H -#define OPAL_MCA_COMMON_OFI_H - -OPAL_DECLSPEC int mca_common_ofi_register_mca_variables(void); - -#endif /* OPAL_MCA_COMMON_OFI_H */ diff --git a/opal/mca/common/ofi/configure.m4 b/opal/mca/common/ofi/configure.m4 deleted file mode 100644 index 4e47ad278d..0000000000 --- a/opal/mca/common/ofi/configure.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. -# Copyright (c) 2013 The University of Tennessee and The University -# of Tennessee Research Foundation. All rights -# reserved. -# Copyright (c) 2015 Intel, Inc. All rights reserved. -# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. -# Copyright (c) 2017 Los Alamos National Security, LLC. All rights -# reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AC_DEFUN([MCA_opal_common_ofi_CONFIG],[ - AC_CONFIG_FILES([opal/mca/common/ofi/Makefile]) - - # Check for ofi. Note that $opal_common_ofi_happy is - # used in other configure.m4's to know if ofi configured - # successfully. - OPAL_CHECK_OFI([opal_common_ofi], - [opal_common_ofi_happy=yes - common_ofi_WRAPPER_EXTRA_LDFLAGS=$opal_common_ofi_LDFLAGS - common_ofi_WRAPPER_EXTRA_LIBS=$opal_common_ofi_LIBS - $1], - [opal_common_ofi_happy=no - $2]) - -])dnl diff --git a/opal/mca/common/ofi/owner.txt b/opal/mca/common/ofi/owner.txt deleted file mode 100644 index 5fe87e2d40..0000000000 --- a/opal/mca/common/ofi/owner.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# owner/status file -# owner: institution that is responsible for this package -# status: e.g. active, maintenance, unmaintained -# -owner: Intel -status:active