1
1

OSHMEM: memheap: disable oob if allgather mkey exchange is used

In this case there is no point to add another progress callback

Signed-off-by: Alex Mikheev <alexm@mellanox.com>
Этот коммит содержится в:
Alex Mikheev 2016-10-26 15:10:29 +03:00
родитель 0826e63363
Коммит b5c7c7de78

Просмотреть файл

@ -53,6 +53,7 @@ struct oob_comm {
int mkeys_rcvd; int mkeys_rcvd;
oob_comm_request_t req_pool[MEMHEAP_RECV_REQS_MAX]; oob_comm_request_t req_pool[MEMHEAP_RECV_REQS_MAX];
opal_list_t req_list; opal_list_t req_list;
int is_inited;
}; };
mca_memheap_map_t* memheap_map = NULL; mca_memheap_map_t* memheap_map = NULL;
@ -435,6 +436,7 @@ int memheap_oob_init(mca_memheap_map_t *map)
} }
opal_progress_register(oshmem_mkey_recv_cb); opal_progress_register(oshmem_mkey_recv_cb);
memheap_oob.is_inited = 1;
return rc; return rc;
} }
@ -444,6 +446,10 @@ void memheap_oob_destruct(void)
int i; int i;
oob_comm_request_t *r; oob_comm_request_t *r;
if (!memheap_oob.is_inited) {
return;
}
opal_progress_unregister(oshmem_mkey_recv_cb); opal_progress_unregister(oshmem_mkey_recv_cb);
for (i = 0; i < MEMHEAP_RECV_REQS_MAX; i++) { for (i = 0; i < MEMHEAP_RECV_REQS_MAX; i++) {
@ -455,6 +461,7 @@ void memheap_oob_destruct(void)
OBJ_DESTRUCT(&memheap_oob.req_list); OBJ_DESTRUCT(&memheap_oob.req_list);
OBJ_DESTRUCT(&memheap_oob.lck); OBJ_DESTRUCT(&memheap_oob.lck);
OBJ_DESTRUCT(&memheap_oob.cond); OBJ_DESTRUCT(&memheap_oob.cond);
memheap_oob.is_inited = 0;
} }
static int send_buffer(int pe, opal_buffer_t *msg) static int send_buffer(int pe, opal_buffer_t *msg)
@ -699,6 +706,10 @@ sshmem_mkey_t * mca_memheap_base_get_cached_mkey_slow(map_segment_t *s,
int rc; int rc;
sshmem_mkey_t *mkey; sshmem_mkey_t *mkey;
if (!memheap_oob.is_inited) {
return NULL;
}
s->mkeys_cache[pe] = (sshmem_mkey_t *) calloc(memheap_map->num_transports, s->mkeys_cache[pe] = (sshmem_mkey_t *) calloc(memheap_map->num_transports,
sizeof(sshmem_mkey_t)); sizeof(sshmem_mkey_t));
if (!s->mkeys_cache[pe]) if (!s->mkeys_cache[pe])