@@ -421,8 +421,6 @@ static void mca_btl_base_am_descriptor_complete(mca_btl_base_module_t *btl,
421
421
struct mca_btl_base_endpoint_t * endpoint ,
422
422
mca_btl_base_descriptor_t * descriptor , int status )
423
423
{
424
- mca_btl_base_rdma_context_t * context = (mca_btl_base_rdma_context_t * ) descriptor -> des_context ;
425
-
426
424
(void ) mca_btl_base_am_rdma_advance (btl , endpoint ,
427
425
(mca_btl_base_rdma_context_t * ) descriptor -> des_context ,
428
426
/*send_descriptor=*/ false);
@@ -454,39 +452,37 @@ mca_btl_base_rdma_start(mca_btl_base_module_t *btl, struct mca_btl_base_endpoint
454
452
context -> local_handle = local_handle ;
455
453
context -> total_size = size ;
456
454
457
- size_t send_size = 0 ;
458
- size_t recv_size = 0 ;
459
455
bool use_rdma = false;
460
456
461
457
if (MCA_BTL_BASE_AM_PUT == type ) {
462
458
if (sizeof (* hdr ) + size <= btl -> btl_eager_limit ) {
463
459
/* just go ahead and send the data */
464
- send_size = size ;
460
+ packet_size + = size ;
465
461
} else if (!mca_btl_base_rdma_use_rdma_get (btl )) {
466
- send_size = size_t_min (size , btl -> btl_max_send_size - sizeof (* hdr ));
462
+ packet_size += size ;
463
+ } else if (!mca_btl_base_rdma_use_rdma_get (btl )) {
464
+ packet_size += size_t_min (size , btl -> btl_max_send_size - sizeof (* hdr ));
467
465
} else {
468
466
use_rdma = true;
469
467
}
470
468
} else if (MCA_BTL_BASE_AM_GET == type ) {
471
469
if (sizeof (mca_btl_base_rdma_response_hdr_t ) + size <= btl -> btl_eager_limit ) {
472
- recv_size = size ;
470
+ packet_size + = size ;
473
471
} else if (!mca_btl_base_rdma_use_rdma_put (btl )) {
474
- recv_size = size_t_min (size , btl -> btl_max_send_size
472
+ packet_size + = size_t_min (size , btl -> btl_max_send_size
475
473
- sizeof (mca_btl_base_rdma_response_hdr_t ));
476
474
} else {
477
475
use_rdma = true;
478
476
}
479
477
} else {
480
478
/* fetching atomic. always recv result via active message */
481
- recv_size = size ;
479
+ packet_size + = size ;
482
480
}
483
481
484
482
if (use_rdma && btl -> btl_register_mem ) {
485
483
packet_size += 2 * btl -> btl_registration_handle_size ;
486
484
}
487
485
488
- packet_size += send_size ;
489
-
490
486
BTL_VERBOSE (("Initiating RDMA operation. context=%p, size=%" PRIsize_t
491
487
", packet_size=%" PRIsize_t ,
492
488
context , size , packet_size ));
@@ -727,9 +723,8 @@ static int mca_btl_base_am_rdma_target_put(mca_btl_base_module_t *btl,
727
723
728
724
static void mca_btl_base_rdma_retry_operation (mca_btl_base_rdma_operation_t * operation )
729
725
{
730
- mca_btl_base_module_t * btl = operation -> btl ;
731
726
void * target_address = (void * ) (intptr_t ) operation -> hdr .target_address ;
732
- int ret ;
727
+ int ret = OPAL_SUCCESS ;
733
728
734
729
if (!operation -> descriptor && !operation -> is_completed ) {
735
730
switch (operation -> hdr .type ) {
@@ -797,6 +792,8 @@ static int mca_btl_base_am_rdma_progress(void)
797
792
}
798
793
}
799
794
}));
795
+
796
+ return 0 ;
800
797
}
801
798
802
799
static int mca_btl_base_am_atomic_64 (int64_t * operand , opal_atomic_int64_t * addr ,
@@ -958,7 +955,6 @@ static void mca_btl_base_am_process_atomic(mca_btl_base_module_t *btl,
958
955
959
956
const mca_btl_base_rdma_hdr_t * hdr = (mca_btl_base_rdma_hdr_t * ) desc -> des_segments [0 ]
960
957
.seg_addr .pval ;
961
- void * target_address = (void * ) (intptr_t ) hdr -> target_address ;
962
958
uint64_t atomic_response = hdr -> data .atomic .operand [0 ];
963
959
964
960
if (4 != hdr -> data .atomic .size && 8 != hdr -> data .atomic .size ) {
@@ -969,7 +965,7 @@ static void mca_btl_base_am_process_atomic(mca_btl_base_module_t *btl,
969
965
BTL_VERBOSE (("got active-message atomic request. hdr->context=0x%" PRIx64
970
966
", target_address=%p, "
971
967
"segment 0 size=%" PRIu64 ,
972
- hdr -> context , target_address , desc -> des_segments [0 ].seg_len ));
968
+ hdr -> context , ( void * )( intptr_t ) hdr -> target_address , desc -> des_segments [0 ].seg_len ));
973
969
974
970
switch (hdr -> type ) {
975
971
case MCA_BTL_BASE_AM_ATOMIC :
0 commit comments