From 8a67a95c993dbfc2e3fa652777cab6ee20a4a735 Mon Sep 17 00:00:00 2001 From: guserav Date: Mon, 12 Aug 2019 16:17:59 -0700 Subject: [PATCH] common/ofi: Fix open-mpi/ompi#2519 As discussed in open-mpi/ompi#2519 the common component does not depend on libfabric yet. This commit introduces this dependency by just calling fi_version(). Signed-off-by: guserav --- opal/mca/common/ofi/common_ofi.c | 6 +++++- opal/mca/common/ofi/common_ofi.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/opal/mca/common/ofi/common_ofi.c b/opal/mca/common/ofi/common_ofi.c index c2d02be50b..83a6acd441 100644 --- a/opal/mca/common/ofi/common_ofi.c +++ b/opal/mca/common/ofi/common_ofi.c @@ -19,5 +19,9 @@ int mca_common_ofi_register_mca_variables(void) { - return OPAL_SUCCESS; + if (fi_version() >= FI_VERSION(1,0)) { + return OPAL_SUCCESS; + } else { + return OPAL_ERROR; + } } diff --git a/opal/mca/common/ofi/common_ofi.h b/opal/mca/common/ofi/common_ofi.h index bb5a04f35a..3494cb7d3a 100644 --- a/opal/mca/common/ofi/common_ofi.h +++ b/opal/mca/common/ofi/common_ofi.h @@ -12,6 +12,7 @@ #ifndef OPAL_MCA_COMMON_OFI_H #define OPAL_MCA_COMMON_OFI_H +#include OPAL_DECLSPEC int mca_common_ofi_register_mca_variables(void);