@@ -420,14 +420,14 @@ sshmem_mkey_t *mca_spml_ucx_register(void* addr,
420
420
int * count )
421
421
{
422
422
sshmem_mkey_t * mkeys ;
423
- ucs_status_t err ;
423
+ ucs_status_t status ;
424
424
spml_ucx_mkey_t * ucx_mkey ;
425
425
size_t len ;
426
- int my_pe = oshmem_my_proc_id ();
427
426
ucp_mem_map_params_t mem_map_params ;
428
427
int segno ;
429
428
map_segment_t * mem_seg ;
430
429
unsigned flags ;
430
+ int my_pe = oshmem_my_proc_id ();
431
431
432
432
* count = 0 ;
433
433
mkeys = (sshmem_mkey_t * ) calloc (1 , sizeof (* mkeys ));
@@ -455,17 +455,18 @@ sshmem_mkey_t *mca_spml_ucx_register(void* addr,
455
455
mem_map_params .length = size ;
456
456
mem_map_params .flags = flags ;
457
457
458
- err = ucp_mem_map (mca_spml_ucx .ucp_context , & mem_map_params , & ucx_mkey -> mem_h );
459
- if (UCS_OK != err ) {
458
+ status = ucp_mem_map (mca_spml_ucx .ucp_context , & mem_map_params , & ucx_mkey -> mem_h );
459
+ if (UCS_OK != status ) {
460
460
goto error_out ;
461
461
}
462
+
462
463
} else {
463
464
ucx_mkey -> mem_h = (ucp_mem_h )mem_seg -> context ;
464
465
}
465
466
466
- err = ucp_rkey_pack (mca_spml_ucx .ucp_context , ucx_mkey -> mem_h ,
467
- & mkeys [0 ].u .data , & len );
468
- if (UCS_OK != err ) {
467
+ status = ucp_rkey_pack (mca_spml_ucx .ucp_context , ucx_mkey -> mem_h ,
468
+ & mkeys [0 ].u .data , & len );
469
+ if (UCS_OK != status ) {
469
470
goto error_unmap ;
470
471
}
471
472
if (len >= 0xffff ) {
@@ -475,10 +476,10 @@ sshmem_mkey_t *mca_spml_ucx_register(void* addr,
475
476
oshmem_shmem_abort (-1 );
476
477
}
477
478
478
- err = ucp_ep_rkey_unpack (mca_spml_ucx .ucp_peers [oshmem_group_self -> my_pe ].ucp_conn ,
479
- mkeys [0 ].u .data ,
480
- & ucx_mkey -> rkey );
481
- if (UCS_OK != err ) {
479
+ status = ucp_ep_rkey_unpack (mca_spml_ucx .ucp_peers [oshmem_group_self -> my_pe ].ucp_conn ,
480
+ mkeys [0 ].u .data ,
481
+ & ucx_mkey -> rkey );
482
+ if (UCS_OK != status ) {
482
483
SPML_ERROR ("failed to unpack rkey" );
483
484
goto error_unmap ;
484
485
}
0 commit comments