Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix osc sm posts when only 32 bit atomics support #6803

Merged
merged 1 commit into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ompi/mca/osc/sm/osc_sm_active_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ompi_osc_sm_start(struct ompi_group_t *group,

for (int i = 0 ; i < size ; ++i) {
int rank_byte = ranks[i] >> OSC_SM_POST_BITS;
osc_sm_post_type_t rank_bit = ((osc_sm_post_type_t) 1) << (ranks[i] & 0x3f);
osc_sm_post_type_t rank_bit = ((osc_sm_post_type_t) 1) << (ranks[i] & OSC_SM_POST_MASK);

/* wait for rank to post */
while (!(module->posts[my_rank][rank_byte] & rank_bit)) {
Expand Down Expand Up @@ -221,8 +221,8 @@ ompi_osc_sm_post(struct ompi_group_t *group,
ompi_osc_sm_module_t *module =
(ompi_osc_sm_module_t*) win->w_osc_module;
int my_rank = ompi_comm_rank (module->comm);
int my_byte = my_rank >> 6;
uint64_t my_bit = ((uint64_t) 1) << (my_rank & 0x3f);
int my_byte = my_rank >> OSC_SM_POST_BITS;
osc_sm_post_type_t my_bit = ((osc_sm_post_type_t) 1) << (my_rank & OSC_SM_POST_MASK);
int gsize;

OPAL_THREAD_LOCK(&module->lock);
Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/osc/sm/osc_sm_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
int i, flag;
size_t pagesize;
size_t state_size;
size_t posts_size, post_size = (comm_size + 63) / 64;
size_t posts_size, post_size = (comm_size + OSC_SM_POST_MASK) / (OSC_SM_POST_MASK + 1);

OPAL_OUTPUT_VERBOSE((1, ompi_osc_base_framework.framework_output,
"allocating shared memory region of size %ld\n", (long) size));
Expand Down