8
8
* University of Stuttgart. All rights reserved.
9
9
* Copyright (c) 2004-2005 The Regents of the University of California.
10
10
* All rights reserved.
11
- * Copyright (c) 2007-2015 Los Alamos National Security, LLC. All rights
11
+ * Copyright (c) 2007-2016 Los Alamos National Security, LLC. All rights
12
12
* reserved.
13
13
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
14
14
* Copyright (c) 2012-2013 Sandia National Laboratories. All rights reserved.
@@ -149,20 +149,20 @@ struct ompi_osc_pt2pt_module_t {
149
149
uint32_t * epoch_outgoing_frag_count ;
150
150
151
151
/** cyclic counter for a unique tage for long messages. */
152
- unsigned int tag_counter ;
153
- unsigned int rtag_counter ;
152
+ uint32_t tag_counter ;
153
+ uint32_t rtag_counter ;
154
154
155
155
/* Number of outgoing fragments that have completed since the
156
156
begining of time */
157
- uint32_t outgoing_frag_count ;
157
+ volatile uint32_t outgoing_frag_count ;
158
158
/* Next outgoing fragment count at which we want a signal on cond */
159
- uint32_t outgoing_frag_signal_count ;
159
+ volatile uint32_t outgoing_frag_signal_count ;
160
160
161
161
/* Number of incoming fragments that have completed since the
162
162
begining of time */
163
- uint32_t active_incoming_frag_count ;
163
+ volatile uint32_t active_incoming_frag_count ;
164
164
/* Next incoming buffer count at which we want a signal on cond */
165
- uint32_t active_incoming_frag_signal_count ;
165
+ volatile uint32_t active_incoming_frag_signal_count ;
166
166
167
167
/** Number of targets locked/being locked */
168
168
unsigned int passive_target_access_epoch ;
@@ -409,14 +409,6 @@ int ompi_osc_pt2pt_component_irecv(ompi_osc_pt2pt_module_t *module,
409
409
int tag ,
410
410
struct ompi_communicator_t * comm );
411
411
412
- int ompi_osc_pt2pt_component_isend (ompi_osc_pt2pt_module_t * module ,
413
- const void * buf ,
414
- size_t count ,
415
- struct ompi_datatype_t * datatype ,
416
- int dest ,
417
- int tag ,
418
- struct ompi_communicator_t * comm );
419
-
420
412
/**
421
413
* ompi_osc_pt2pt_progress_pending_acc:
422
414
*
@@ -639,8 +631,8 @@ static inline void osc_pt2pt_add_pending (ompi_osc_pt2pt_pending_t *pending)
639
631
opal_list_append (& mca_osc_pt2pt_component .pending_operations , & pending -> super ));
640
632
}
641
633
642
- #define OSC_PT2PT_FRAG_TAG 0x10000
643
- #define OSC_PT2PT_FRAG_MASK 0x0ffff
634
+ #define OSC_PT2PT_FRAG_TAG 0x80000
635
+ #define OSC_PT2PT_FRAG_MASK 0x7ffff
644
636
645
637
/**
646
638
* get_tag:
@@ -658,23 +650,17 @@ static inline int get_tag(ompi_osc_pt2pt_module_t *module)
658
650
/* the LSB of the tag is used be the receiver to determine if the
659
651
message is a passive or active target (ie, where to mark
660
652
completion). */
661
- int tmp = module -> tag_counter + !!(module -> passive_target_access_epoch );
662
-
663
- module -> tag_counter = (module -> tag_counter + 4 ) & OSC_PT2PT_FRAG_MASK ;
664
-
665
- return tmp ;
653
+ int32_t tmp = OPAL_THREAD_ADD32 ((volatile int32_t * ) & module -> tag_counter , 4 );
654
+ return (tmp & OSC_PT2PT_FRAG_MASK ) | !!(module -> passive_target_access_epoch );
666
655
}
667
656
668
657
static inline int get_rtag (ompi_osc_pt2pt_module_t * module )
669
658
{
670
659
/* the LSB of the tag is used be the receiver to determine if the
671
660
message is a passive or active target (ie, where to mark
672
661
completion). */
673
- int tmp = module -> rtag_counter + !!(module -> passive_target_access_epoch );
674
-
675
- module -> rtag_counter = (module -> rtag_counter + 4 ) & OSC_PT2PT_FRAG_MASK ;
676
-
677
- return tmp ;
662
+ int32_t tmp = OPAL_THREAD_ADD32 ((volatile int32_t * ) & module -> rtag_counter , 4 );
663
+ return (tmp & OSC_PT2PT_FRAG_MASK ) | !!(module -> passive_target_access_epoch );
678
664
}
679
665
/**
680
666
* ompi_osc_pt2pt_accumulate_lock:
0 commit comments