Skip to content

Commit 344bb64

Browse files
xinzhao3artpol84
authored andcommitted
opal/common/ucx: Minor changes in wpool
Signed-off-by: Artem Polyakov <artpol84@gmail.com>
1 parent 9fb9cfb commit 344bb64

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

opal/mca/common/ucx/common_ucx_wpool.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ int opal_common_ucx_wpmem_create(opal_common_ucx_ctx_t *ctx,
543543
opal_common_ucx_mem_type_t mem_type,
544544
opal_common_ucx_exchange_func_t exchange_func,
545545
void *exchange_metadata,
546+
char **my_mem_addr,
547+
int *my_mem_addr_size,
546548
opal_common_ucx_wpmem_t **mem_ptr)
547549
{
548550
opal_common_ucx_wpmem_t *mem = calloc(1, sizeof(*mem));
@@ -581,8 +583,6 @@ int opal_common_ucx_wpmem_create(opal_common_ucx_ctx_t *ctx,
581583
ret = exchange_func(rkey_addr, rkey_addr_len,
582584
&mem->mem_addrs, &mem->mem_displs, exchange_metadata);
583585
WPOOL_DBG_OUT(_dbg_mem, "\tcomplete exchange");
584-
585-
ucp_rkey_buffer_release(rkey_addr);
586586
if (ret != OPAL_SUCCESS) {
587587
goto error_rkey_pack;
588588
}
@@ -592,6 +592,8 @@ int opal_common_ucx_wpmem_create(opal_common_ucx_ctx_t *ctx,
592592
pthread_key_create(&mem->mem_tls_key, NULL);
593593

594594
(*mem_ptr) = mem;
595+
(*my_mem_addr) = rkey_addr;
596+
(*my_mem_addr_size) = rkey_addr_len;
595597

596598
WPOOL_DBG_OUT(_dbg_mem, "mem = %p. Done\n", (void *)mem);
597599
return ret;

opal/mca/common/ucx/common_ucx_wpool.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ OPAL_DECLSPEC int opal_common_ucx_wpmem_create(opal_common_ucx_ctx_t *ctx,
227227
opal_common_ucx_mem_type_t mem_type,
228228
opal_common_ucx_exchange_func_t exchange_func,
229229
void *exchange_metadata,
230+
char **my_mem_addr,
231+
int *my_mem_addr_size,
230232
opal_common_ucx_wpmem_t **mem_ptr);
231233
OPAL_DECLSPEC int opal_common_ucx_wpmem_free(opal_common_ucx_wpmem_t *mem);
232234

0 commit comments

Comments
 (0)