Skip to content

osc/sm: Fix a bug that MPI_WIN_TEST does not update flag to 0 #1190

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

Merged
merged 1 commit into from
Dec 8, 2015

Conversation

kawashima-fj
Copy link
Member

MPI_WIN_TEST must update the flag parameter to 0 when not all
origin processes called MPI_WIN_COMPLETE. But sm OSC doesn't.
If the caller initialize the flag argument to a non-0 value,
the caller will receive the non-0 flag value.

@hjelmn please review

I'll create PRs for v1.10 and v2.0.

`MPI_WIN_TEST` must update the `flag` parameter to 0 when not all
origin processes called `MPI_WIN_COMPLETE`. But sm OSC doesn't.
If the caller initialize the `flag` argument to a non-0 value,
the caller will receive the non-0 `flag` value.
@hjelmn
Copy link
Member

hjelmn commented Dec 8, 2015

👍

hjelmn added a commit that referenced this pull request Dec 8, 2015
osc/sm: Fix a bug that `MPI_WIN_TEST` does not update `flag` to 0
@hjelmn hjelmn merged commit dae3746 into open-mpi:master Dec 8, 2015
@kawashima-fj
Copy link
Member Author

@hjelmn Do you have a plan to merge 903762e to v1.10 and v2.x branches?
Automatic merge on cherry-picking my fix fails because the commit is not merged into v1.10 and v2.x branches.

The bug I found exists in v1.10 and v2.x in another form. Code which set flag to 0 exists in a wrong position. The else block shoud correspond to if block of complete_count, not post_group.

Current v1.10/v2.x code:

    if (NULL != module->post_group) {
        int size = ompi_group_size(module->post_group);

        if (module->my_node_state->complete_count == size) {
            OBJ_RELEASE(module->post_group);
            module->post_group = NULL;
            *flag = 1;
        }
    } else {
        opal_atomic_mb();
        *flag = 0;
    }

@hjelmn
Copy link
Member

hjelmn commented Dec 10, 2015

Opening PRs now.

@kawashima-fj kawashima-fj deleted the pr/sm-win-test-fix branch April 13, 2016 04:26
jsquyres pushed a commit to jsquyres/ompi that referenced this pull request Aug 23, 2016
…output-during-odls

v2.0.1: odls_default: do not opal_output() while creating a process!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants