Skip to content

Instantly share code, notes, and snippets.

@hppritcha
Created April 13, 2017 21:37
Show Gist options
  • Save hppritcha/2c2f6280408d8668beac23e4537f045d to your computer and use it in GitHub Desktop.
Save hppritcha/2c2f6280408d8668beac23e4537f045d to your computer and use it in GitHub Desktop.
From 827eec3753a7b178c12f3e42c2e13dcf80aa5905 Mon Sep 17 00:00:00 2001
From: Howard Pritchard <howardp@lanl.gov>
Date: Wed, 12 Apr 2017 16:19:03 -0500
Subject: [PATCH] CH4/OFI: fix provider selection bug
In working with a libfabric that has multiple providers,
and trying to use the MPIR_CVAR_OFI_USE_PROVIDER env.
variable, I noticed it wasn't working and leading to
aborts with unable to pick the selected provider.
This commit fixes that bug.
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
diff --git a/src/mpid/ch4/netmod/ofi/ofi_init.h b/src/mpid/ch4/netmod/ofi/ofi_init.h
index ce4e8ffa..7983e38b 100644
--- a/src/mpid/ch4/netmod/ofi/ofi_init.h
+++ b/src/mpid/ch4/netmod/ofi/ofi_init.h
@@ -442,8 +442,11 @@ static inline int MPIDI_NM_mpi_init_hook(int rank,
MPIDI_OFI_CHOOSE_PROVIDER(prov, &prov_use, "No suitable provider provider found");
/* If we picked the provider already, make sure we grab the right provider */
- if ((NULL != provname) && (0 != strcmp(provname, hints->fabric_attr->prov_name)))
+ if ((NULL != provname) && (0 != strcmp(provname, prov_use->fabric_attr->prov_name))) {
+ MPL_DBG_MSG_FMT(MPIDI_CH4_DBG_GENERAL,VERBOSE,(MPL_DBG_FDEST, "Skipping provider because not selected one"));
+ prov = prov_use->next;
continue;
+ }
/* Check that this provider meets the minimum requirements for the user */
if (MPIDI_OFI_ENABLE_DATA && ((0ULL == (prov_use->caps & FI_DIRECTED_RECV)) || (prov_use->domain_attr->cq_data_size < 4))) {
--
2.4.0.rc3.16.g0ab00b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment