Skip to content

Commit

Permalink
pmi: Use PMI2 API with Cray PMI library
Browse files Browse the repository at this point in the history
  • Loading branch information
raffenet committed Mar 16, 2017
1 parent 09c041a commit 039c9a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/mpid/ch4/netmod/ofi/ofi_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ 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
Expand Down Expand Up @@ -773,7 +773,7 @@ static inline int MPIDI_NM_mpi_init_hook(int rank,
end += size % num_local;
for (i = start; i < end; 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);
Expand Down Expand Up @@ -976,7 +976,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();
Expand Down
2 changes: 1 addition & 1 deletion src/mpid/ch4/src/ch4_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/pmi/cray/subconfigure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 039c9a4

Please sign in to comment.