diff --git a/oshmem/mca/memheap/buddy/memheap_buddy.c b/oshmem/mca/memheap/buddy/memheap_buddy.c index b3f4ca1df9..c6f0fdc564 100644 --- a/oshmem/mca/memheap/buddy/memheap_buddy.c +++ b/oshmem/mca/memheap/buddy/memheap_buddy.c @@ -469,7 +469,7 @@ static int _do_alloc(uint32_t order, } *p_buff = (void*) addr; - MCA_SPML_CALL(memuse_hook(addr, 1<num_transports = 1; @@ -387,8 +387,8 @@ error_fatal: void mca_spml_ucx_memuse_hook(void *addr, size_t length) { - int my_pe = oshmem_my_proc_id(); - spml_ucx_mkey_t *ucx_mkey; + int my_pe; + spml_ucx_mkey_t *ucx_mkey; ucp_mem_advise_params_t params; ucs_status_t status; @@ -396,6 +396,7 @@ void mca_spml_ucx_memuse_hook(void *addr, size_t length) return; } + my_pe = oshmem_my_proc_id(); ucx_mkey = &mca_spml_ucx.ucp_peers[my_pe].mkeys[HEAP_SEG_INDEX].key; params.field_mask = UCP_MEM_ADVISE_PARAM_FIELD_ADDRESS | @@ -568,7 +569,7 @@ int mca_spml_ucx_fence(void) err = ucp_worker_flush(mca_spml_ucx.ucp_worker); if (UCS_OK != err) { - SPML_ERROR("fence failed: %s", ucs_status_string(err)); + SPML_ERROR("fence failed: %s", ucs_status_string(err)); oshmem_shmem_abort(-1); return OSHMEM_ERROR; } @@ -581,7 +582,7 @@ int mca_spml_ucx_quiet(void) err = ucp_worker_flush(mca_spml_ucx.ucp_worker); if (UCS_OK != err) { - SPML_ERROR("fence failed: %s", ucs_status_string(err)); + SPML_ERROR("fence failed: %s", ucs_status_string(err)); oshmem_shmem_abort(-1); return OSHMEM_ERROR; }