From 61b91bdc9b8d56b382152279e35812edd91c7b89 Mon Sep 17 00:00:00 2001 From: Ken Raffenetti Date: Tue, 28 Feb 2017 15:53:49 -0800 Subject: [PATCH] pmi: Use PMI2 API with Cray PMI library --- src/mpid/ch4/netmod/ofi/ofi_init.h | 8 ++++---- src/mpid/ch4/src/ch4_init.h | 2 +- src/pmi/cray/subconfigure.m4 | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mpid/ch4/netmod/ofi/ofi_init.h b/src/mpid/ch4/netmod/ofi/ofi_init.h index f9442d9adf1..247e2ebca43 100644 --- a/src/mpid/ch4/netmod/ofi/ofi_init.h +++ b/src/mpid/ch4/netmod/ofi/ofi_init.h @@ -735,14 +735,14 @@ static inline int MPIDI_NM_mpi_init_hook(int rank, val = valS; sprintf(keyS, "OFI-%d", rank); -#ifdef USE_CRAYPMI_API +#ifdef USE_PMI2_API MPIDI_OFI_PMI_CALL_POP(PMI2_KVS_Put(keyS, val), pmi); MPIDI_OFI_PMI_CALL_POP(PMI2_KVS_Fence(), pmi); #else MPIDI_OFI_PMI_CALL_POP(PMI_KVS_Put(MPIDI_Global.kvsname, keyS, val), pmi); MPIDI_OFI_PMI_CALL_POP(PMI_KVS_Commit(MPIDI_Global.kvsname), pmi); -#endif MPIDI_OFI_PMI_CALL_POP(PMI_Barrier(), pmi); +#endif /* -------------------------------- */ /* Create our address table from */ @@ -753,7 +753,7 @@ static inline int MPIDI_NM_mpi_init_hook(int rank, for (i = 0; i < size; i++) { sprintf(keyS, "OFI-%d", i); -#ifdef USE_CRAYPMI_API +#ifdef USE_PMI2_API MPIDI_OFI_PMI_CALL_POP(PMI2_KVS_Get (NULL, -1, keyS, valS, MPIDI_KVSAPPSTRLEN, &vallen), pmi); MPIR_Assert(vallen > 0); @@ -951,7 +951,7 @@ static inline int MPIDI_NM_mpi_finalize_hook(void) MPIR_Assert(slist_empty(&MPIDI_Global.cq_buff_list)); } -#ifdef USE_CRAYPMI_API +#ifdef USE_PMI2_API PMI2_Finalize(); #else PMI_Finalize(); diff --git a/src/mpid/ch4/src/ch4_init.h b/src/mpid/ch4/src/ch4_init.h index 4b0971c52d2..ba03f1d6153 100644 --- a/src/mpid/ch4/src/ch4_init.h +++ b/src/mpid/ch4/src/ch4_init.h @@ -119,7 +119,7 @@ MPL_STATIC_INLINE_PREFIX int MPID_Init(int *argc, MPIDI_CH4_DBG_MEMORY = MPL_dbg_class_alloc("CH4_MEMORY", "ch4_memory"); #endif MPIDI_choose_netmod(); -#ifdef USE_CRAYPMI_API +#ifdef USE_PMI2_API pmi_errno = PMI2_Init(&has_parent, &size, &rank, &appnum); if (pmi_errno != PMI_SUCCESS) { diff --git a/src/pmi/cray/subconfigure.m4 b/src/pmi/cray/subconfigure.m4 index 44ff8ed8e4d..7596ec090d5 100644 --- a/src/pmi/cray/subconfigure.m4 +++ b/src/pmi/cray/subconfigure.m4 @@ -15,7 +15,7 @@ PAC_PREPEND_FLAG([$CRAY_PMI_POST_LINK_OPTS], [LDFLAGS]) AC_CHECK_HEADER([pmi.h], [], [AC_MSG_ERROR([could not find pmi.h. Configure aborted])]) AC_CHECK_LIB([pmi], [PMI_Init], [], [AC_MSG_ERROR([could not find the cray libpmi. Configure aborted])]) -AC_DEFINE(USE_CRAYPMI_API, 1, [Define if Cray PMI API must be used]) +AC_DEFINE(USE_PMI2_API, 1, [Define if Cray PMI API must be used]) PAC_APPEND_FLAG([-lpmi], [WRAPPER_LIBS]) ])dnl end COND_IF