Skip to content

Commit d22d413

Browse files
guseravbwbarrett
authored andcommitted
common/ofi: Fix open-mpi#2519
As discussed in open-mpi#2519 the common component does not depend on libfabric yet. This commit introduces this dependency by just calling fi_version(). Signed-off-by: guserav <[email protected]> (cherry picked from commit 8a67a95) Signed-off-by: Brian Barrett <[email protected]>
1 parent 19771ad commit d22d413

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

opal/mca/common/ofi/common_ofi.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@
1919

2020
int mca_common_ofi_register_mca_variables(void)
2121
{
22-
return OPAL_SUCCESS;
22+
if (fi_version() >= FI_VERSION(1,0)) {
23+
return OPAL_SUCCESS;
24+
} else {
25+
return OPAL_ERROR;
26+
}
2327
}

opal/mca/common/ofi/common_ofi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#ifndef OPAL_MCA_COMMON_OFI_H
1414
#define OPAL_MCA_COMMON_OFI_H
15+
#include <rdma/fabric.h>
1516

1617
OPAL_DECLSPEC int mca_common_ofi_register_mca_variables(void);
1718

0 commit comments

Comments
 (0)