From 598571649ab7b1825007acad125294cc926a2af6 Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Wed, 30 Oct 2013 17:08:54 +0000 Subject: [PATCH] do MPI_Barrier at the end of shmem_init() code but before we use shmem native collectives Refs: #3763 This commit was SVN r29567. --- oshmem/mca/spml/ikrit/spml_ikrit.c | 3 +++ oshmem/runtime/oshmem_info_support.c | 1 + oshmem/runtime/oshmem_shmem_init.c | 2 ++ oshmem/runtime/runtime.h | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/oshmem/mca/spml/ikrit/spml_ikrit.c b/oshmem/mca/spml/ikrit/spml_ikrit.c index 4ffbb529d2..745f75a9bb 100644 --- a/oshmem/mca/spml/ikrit/spml_ikrit.c +++ b/oshmem/mca/spml/ikrit/spml_ikrit.c @@ -891,6 +891,9 @@ static int mca_spml_ikrit_mxm_fence(int dst) fence_req->mxm_req.flags = MXM_REQ_SEND_FLAG_FENCE; fence_req->mxm_req.op.mem.remote_vaddr = 0; fence_req->mxm_req.op.mem.remote_mkey = &mxm_empty_mem_key; + fence_req->mxm_req.base.data_type = MXM_REQ_DATA_BUFFER; + fence_req->mxm_req.base.data.buffer.ptr = 0; + fence_req->mxm_req.base.data.buffer.length = 0; #endif fence_req->mxm_req.base.state = MXM_REQ_NEW; fence_req->mxm_req.base.completed_cb = fence_completion_cb; diff --git a/oshmem/runtime/oshmem_info_support.c b/oshmem/runtime/oshmem_info_support.c index ca727899e1..07a02296b1 100644 --- a/oshmem/runtime/oshmem_info_support.c +++ b/oshmem/runtime/oshmem_info_support.c @@ -20,6 +20,7 @@ #include "ompi/runtime/ompi_info_support.h" #include "oshmem/runtime/oshmem_info_support.h" #include "opal/util/show_help.h" +#include "ompi/include/ompi/constants.h" const char *oshmem_info_type_oshmem = "oshmem"; diff --git a/oshmem/runtime/oshmem_shmem_init.c b/oshmem/runtime/oshmem_shmem_init.c index eb9954a70d..cb7cf9e131 100644 --- a/oshmem/runtime/oshmem_shmem_init.c +++ b/oshmem/runtime/oshmem_shmem_init.c @@ -223,6 +223,8 @@ int oshmem_shmem_init(int argc, char **argv, int requested, int *provided) ret = __shmem_init(argc, argv, requested, provided); } + MPI_Barrier(MPI_COMM_WORLD); + if (OSHMEM_SUCCESS == ret) { oshmem_shmem_initialized = true; diff --git a/oshmem/runtime/runtime.h b/oshmem/runtime/runtime.h index 163df4395b..5ce7be63dd 100644 --- a/oshmem/runtime/runtime.h +++ b/oshmem/runtime/runtime.h @@ -182,7 +182,6 @@ OSHMEM_DECLSPEC int oshmem_shmem_register_params(void); RUNTIME_CHECK_ERROR("Required address %p is not in symmetric space\n", (x)); \ oshmem_shmem_abort(-1); \ } - #define RUNTIME_CHECK_WITH_MEMHEAP_SIZE(x) \ if (OPAL_UNLIKELY((long)(x) > MCA_MEMHEAP_CALL(size))) \ { \ @@ -195,6 +194,7 @@ OSHMEM_DECLSPEC int oshmem_shmem_register_params(void); #define RUNTIME_CHECK_INIT() #define RUNTIME_CHECK_PE(x) #define RUNTIME_CHECK_ADDR(x) +#define RUNTIME_CHECK_WITH_MEMHEAP_SIZE(x) #endif /* OSHMEM_PARAM_CHECK */