Merge pull request #1278 from ggouaillardet/poc/osc_pt2pt
osc/pt2pt: use two distinct "namespaces" for tags
Этот коммит содержится в:
Коммит
dd4d49cbbb
@ -150,6 +150,7 @@ struct ompi_osc_pt2pt_module_t {
|
||||
|
||||
/** cyclic counter for a unique tage for long messages. */
|
||||
unsigned int tag_counter;
|
||||
unsigned int rtag_counter;
|
||||
|
||||
/* Number of outgoing fragments that have completed since the
|
||||
begining of time */
|
||||
@ -659,11 +660,22 @@ static inline int get_tag(ompi_osc_pt2pt_module_t *module)
|
||||
completion). */
|
||||
int tmp = module->tag_counter + !!(module->passive_target_access_epoch);
|
||||
|
||||
module->tag_counter = (module->tag_counter + 2) & OSC_PT2PT_FRAG_MASK;
|
||||
module->tag_counter = (module->tag_counter + 4) & OSC_PT2PT_FRAG_MASK;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static inline int get_rtag(ompi_osc_pt2pt_module_t *module)
|
||||
{
|
||||
/* the LSB of the tag is used be the receiver to determine if the
|
||||
message is a passive or active target (ie, where to mark
|
||||
completion). */
|
||||
int tmp = module->rtag_counter + !!(module->passive_target_access_epoch);
|
||||
|
||||
module->rtag_counter = (module->rtag_counter + 4) & OSC_PT2PT_FRAG_MASK;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
/**
|
||||
* ompi_osc_pt2pt_accumulate_lock:
|
||||
*
|
||||
|
@ -475,7 +475,7 @@ ompi_osc_pt2pt_accumulate_w_req (const void *origin_addr, int origin_count,
|
||||
}
|
||||
|
||||
is_long_msg = true;
|
||||
tag = get_tag (module);
|
||||
tag = get_rtag (module);
|
||||
}
|
||||
|
||||
/* flush will be called at the end of this function. make sure all post messages have
|
||||
|
@ -290,6 +290,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
|
||||
/* fill in the function pointer part */
|
||||
memcpy(module, &ompi_osc_pt2pt_module_template,
|
||||
sizeof(ompi_osc_base_module_t));
|
||||
module->rtag_counter = 2;
|
||||
|
||||
/* initialize the objects, so that always free in cleanup */
|
||||
OBJ_CONSTRUCT(&module->lock, opal_mutex_t);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user