44 * reserved.
55 * Copyright (c) 2016-2017 Research Organization for Information Science
66 * and Technology (RIST). All rights reserved.
7- * Copyright (c) 2016 Intel, Inc. All rights reserved.
7+ * Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
88 * $COPYRIGHT$
99 *
1010 * Additional copyrights may follow
@@ -50,6 +50,7 @@ struct ompi_osc_rdma_event_t {
5050
5151typedef struct ompi_osc_rdma_event_t ompi_osc_rdma_event_t ;
5252
53+ #if 0
5354static void * ompi_osc_rdma_event_put (int fd , int flags , void * context )
5455{
5556 ompi_osc_rdma_event_t * event = (ompi_osc_rdma_event_t * ) context ;
@@ -112,7 +113,7 @@ static int ompi_osc_rdma_event_queue (ompi_osc_rdma_module_t *module, struct mca
112113
113114 return OMPI_SUCCESS ;
114115}
115-
116+ #endif
116117
117118static int ompi_osc_rdma_gacc_local (const void * source_buffer , int source_count , ompi_datatype_t * source_datatype ,
118119 void * result_buffer , int result_count , ompi_datatype_t * result_datatype ,
@@ -188,10 +189,7 @@ static inline int ompi_osc_rdma_gacc_contig (ompi_osc_rdma_sync_t *sync, const v
188189 ompi_datatype_t * target_datatype , ompi_op_t * op , ompi_osc_rdma_request_t * request )
189190{
190191 ompi_osc_rdma_module_t * module = sync -> module ;
191- const size_t btl_alignment_mask = ALIGNMENT_MASK (module -> selected_btl -> btl_get_alignment );
192192 unsigned long len = target_count * target_datatype -> super .size ;
193- ompi_osc_rdma_frag_t * frag = NULL ;
194- volatile bool complete = false;
195193 char * ptr = NULL ;
196194 int ret ;
197195
@@ -523,7 +521,7 @@ static int ompi_osc_rdma_fetch_and_op_atomic (ompi_osc_rdma_sync_t *sync, const
523521 ompi_osc_rdma_module_t * module = sync -> module ;
524522 int32_t atomic_flags = module -> selected_btl -> btl_atomic_flags ;
525523 int ret , btl_op , flags ;
526- int64_t origin , result ;
524+ int64_t origin ;
527525
528526 if ((8 != extent && !((MCA_BTL_ATOMIC_SUPPORTS_32BIT & atomic_flags ) && 4 == extent )) ||
529527 (!(OMPI_DATATYPE_FLAG_DATA_INT & dt -> super .flags ) && !(MCA_BTL_ATOMIC_SUPPORTS_FLOAT & atomic_flags )) ||
@@ -590,13 +588,13 @@ static int ompi_osc_rdma_fetch_and_op_cas (ompi_osc_rdma_sync_t *sync, const voi
590588 new_value = old_value ;
591589
592590 if (& ompi_mpi_op_replace .op == op ) {
593- memcpy ((void * )((intptr_t ) & new_value ) + offset , origin_addr , extent );
591+ memcpy ((void * )((intptr_t ) & new_value + offset ) , origin_addr , extent );
594592 } else if (& ompi_mpi_op_no_op .op != op ) {
595- ompi_op_reduce (op , (void * ) origin_addr , (void * )((intptr_t ) & new_value ) + offset , 1 , dt );
593+ ompi_op_reduce (op , (void * ) origin_addr , (void * )((intptr_t ) & new_value + offset ) , 1 , dt );
596594 }
597595
598596 ret = ompi_osc_rdma_btl_cswap (module , peer -> data_endpoint , address , target_handle ,
599- old_value , new_value , 0 , & new_value );
597+ old_value , new_value , 0 , ( int64_t * ) & new_value );
600598 if (OPAL_SUCCESS != ret || new_value == old_value ) {
601599 break ;
602600 }
@@ -605,7 +603,7 @@ static int ompi_osc_rdma_fetch_and_op_cas (ompi_osc_rdma_sync_t *sync, const voi
605603 } while (1 );
606604
607605 if (result_addr ) {
608- memcpy (result_addr , (void * )((intptr_t ) & new_value ) + offset , extent );
606+ memcpy (result_addr , (void * )((intptr_t ) & new_value + offset ) , extent );
609607 }
610608
611609 if (OPAL_SUCCESS == ret ) {
@@ -696,11 +694,9 @@ static inline int cas_rdma (ompi_osc_rdma_sync_t *sync, const void *source_addr,
696694 mca_btl_base_registration_handle_t * target_handle , bool lock_acquired )
697695{
698696 ompi_osc_rdma_module_t * module = sync -> module ;
699- const size_t btl_alignment_mask = ALIGNMENT_MASK (module -> selected_btl -> btl_get_alignment );
700- unsigned long offset , aligned_len , len = datatype -> super .size ;
697+ unsigned long len = datatype -> super .size ;
701698 mca_btl_base_registration_handle_t * local_handle = NULL ;
702699 ompi_osc_rdma_frag_t * frag = NULL ;
703- ompi_osc_rdma_request_t * request ;
704700 volatile bool complete = false;
705701 /* drop the const. this code will not attempt to change the value */
706702 char * ptr = (char * ) source_addr ;
0 commit comments