Use the right number of segments per in-use flag when calculating
offsets. This commit was SVN r7571.
Этот коммит содержится в:
родитель
67d38b7896
Коммит
37fc944b01
@ -158,6 +158,12 @@ extern "C" {
|
||||
|
||||
/** Meta struct containing information about the bootstrap area */
|
||||
mca_common_sm_mmap_t *sm_bootstrap_meta;
|
||||
|
||||
/** How many fragment segments are protected by a single
|
||||
in-use flags. This is solely so that we can only perform
|
||||
the division once and then just use the value without
|
||||
having to re-calculate. */
|
||||
int sm_segs_per_inuse_flag;
|
||||
};
|
||||
/**
|
||||
* Convenience typedef
|
||||
|
@ -117,10 +117,10 @@ int mca_coll_sm_bcast_intra(void *buff, int count,
|
||||
|
||||
/* Loop over all the segments in this set */
|
||||
|
||||
segment_num = flag_num *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
max_segment_num = (flag_num + 1) *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
segment_num =
|
||||
flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
max_segment_num =
|
||||
(flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
do {
|
||||
index = &(data->mcb_mpool_index[segment_num]);
|
||||
|
||||
@ -178,10 +178,10 @@ int mca_coll_sm_bcast_intra(void *buff, int count,
|
||||
|
||||
/* Loop over all the segments in this set */
|
||||
|
||||
segment_num = flag_num *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
max_segment_num = (flag_num + 1) *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
segment_num =
|
||||
flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
max_segment_num =
|
||||
(flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
do {
|
||||
|
||||
/* Pre-calculate some values */
|
||||
|
@ -210,6 +210,8 @@ static int sm_open(void)
|
||||
cs->sm_comm_num_segments += cs->sm_comm_num_in_use_flags -
|
||||
(cs->sm_comm_num_segments % cs->sm_comm_num_in_use_flags);
|
||||
}
|
||||
cs->sm_segs_per_inuse_flag =
|
||||
cs->sm_comm_num_segments / cs->sm_comm_num_in_use_flags;
|
||||
|
||||
mca_base_param_reg_int(c, "tree_degree",
|
||||
"Degree of the tree for tree-based operations (must be => 1 and <= min(control_size, 255))",
|
||||
|
@ -265,12 +265,11 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count,
|
||||
|
||||
/* Loop over all the segments in this set */
|
||||
|
||||
segment_num = flag_num *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
max_segment_num = (flag_num + 1) *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
segment_num =
|
||||
flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
max_segment_num =
|
||||
(flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
reduce_target = (((char*) rbuf) + (frag_num * segment_ddt_bytes));
|
||||
|
||||
do {
|
||||
|
||||
/* Loop over the processes, receiving and reducing
|
||||
@ -452,10 +451,10 @@ static int reduce_inorder(void *sbuf, void* rbuf, int count,
|
||||
|
||||
/* Loop over all the segments in this set */
|
||||
|
||||
segment_num = flag_num *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
max_segment_num = (flag_num + 1) *
|
||||
mca_coll_sm_component.sm_comm_num_in_use_flags;
|
||||
segment_num =
|
||||
flag_num * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
max_segment_num =
|
||||
(flag_num + 1) * mca_coll_sm_component.sm_segs_per_inuse_flag;
|
||||
do {
|
||||
index = &(data->mcb_mpool_index[segment_num]);
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user