From d7c7bb399388e7f85aa856c38865c8062bf7c0e6 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 22 Oct 2014 13:30:27 -0600 Subject: [PATCH] btl/sm: re-enable the use of CMA and knem At some point we added a sanity check to the btl base to ensure that the btl flags match the available functions (this prevents user's from specifying get or put when no function exists). This check was disabling get for the sm btl since at the time of the check there is no btl_get function. The simplest fix is to set a dummy value to btl_get that will be overwritten with the proper value on btl initialization. Closes #239. --- opal/mca/btl/sm/btl_sm_component.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opal/mca/btl/sm/btl_sm_component.c b/opal/mca/btl/sm/btl_sm_component.c index 4f06742cf4..56cd43dfb9 100644 --- a/opal/mca/btl/sm/btl_sm_component.c +++ b/opal/mca/btl/sm/btl_sm_component.c @@ -139,6 +139,9 @@ static int mca_btl_sm_component_verify(void) { #if OPAL_BTL_SM_HAVE_KNEM || OPAL_BTL_SM_HAVE_CMA if (mca_btl_sm_component.use_knem || mca_btl_sm_component.use_cma) { mca_btl_sm.super.btl_flags |= MCA_BTL_FLAGS_GET; + /* set a dummy value for btl_get to prevent mca_btl_base_param_verify from + * unsetting the MCA_BTL_FLAGS_GET flags. */ + mca_btl_sm.super.btl_get = (mca_btl_base_module_get_fn_t) 1; } if (mca_btl_sm_component.use_knem && mca_btl_sm_component.use_cma) {