1
1

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 <jsquyres@cisco.com>
(cherry picked from commit f5e1a672ccd5db127e85e1e8f6bcfeb8a8b04527)

NOTE: This patch was cherry-picked into the v4.0.x branch as 9ad871fc,
but the OFI BTL changes were skipped, because the OFI BTL was not in
the v4.0.x branch.  This version of the cherry pick brings in the
changes to the OFI BTL.

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
Этот коммит содержится в:
Jeff Squyres 2019-01-29 13:10:26 +09:00 коммит произвёл Brian Barrett
родитель d9bfb1c4da
Коммит c8659a98c4
2 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -22,7 +22,7 @@
#dist_opaldata_DATA = help-mpi-btl-ofi.txt #dist_opaldata_DATA = help-mpi-btl-ofi.txt
AM_CPPFLAGS = $(opal_common_ofi_CPPFLAGS) AM_CPPFLAGS = $(opal_ofi_CPPFLAGS)
sources = \ sources = \
btl_ofi.h \ btl_ofi.h \
btl_ofi_component.c \ btl_ofi_component.c \
@ -56,11 +56,12 @@ mcacomponentdir = $(opallibdir)
mcacomponent_LTLIBRARIES = $(component) mcacomponent_LTLIBRARIES = $(component)
mca_btl_ofi_la_SOURCES = $(component_sources) mca_btl_ofi_la_SOURCES = $(component_sources)
mca_btl_ofi_la_LDFLAGS = -module -avoid-version \ 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 \ 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_TOP_BUILDDIR)/opal/mca/common/ofi/lib@OPAL_LIB_PREFIX@mca_common_ofi.la \
$(opal_ofi_LIBS) $(opal_ofi_LIBS)
noinst_LTLIBRARIES = $(lib) noinst_LTLIBRARIES = $(lib)
libmca_btl_ofi_la_SOURCES = $(lib_sources) 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)

Просмотреть файл

@ -11,7 +11,7 @@
# Copyright (c) 2004-2006 The Regents of the University of California. # Copyright (c) 2004-2006 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2006 QLogic Corp. 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. # Copyright (c) 2011-2018 Los Alamos National Security, LLC.
# All rights reserved. # All rights reserved.
# Copyright (c) 2018 Intel, inc. 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_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 opal_btl_ofi_happy=0
AS_IF([test "$opal_common_ofi_happy" = "yes"], AS_IF([test "$opal_ofi_happy" = "yes"],
[CPPFLAGS_save=$CPPFLAGS [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], [], AC_CHECK_DECL([FI_MR_VIRT_ADDR], [opal_btl_ofi_happy=1], [],
[#include <rdma/fabric.h>]) [#include <rdma/fabric.h>])
CPPFLAGS=$CPPFLAGS_save]) CPPFLAGS=$CPPFLAGS_save])