Skip to content

OSC UCX: Enable software atomicity when lock is set to MPI_MODE_NOCHECK #10493

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
Jun 23, 2022
Merged
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
5 changes: 5 additions & 0 deletions ompi/mca/osc/ucx/osc_ucx_passive_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ int ompi_osc_ucx_lock(int lock_type, int target, int mpi_assert, struct ompi_win
}
} else {
lock->is_nocheck = true;
if (lock_type == MPI_LOCK_EXCLUSIVE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but the same problem exists in ompi_osc_ucx_lock_all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devreal Good catch. Will add it there too. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devreal I took a look at ompi_osc_ucx_lock_all implementation. Looks like we are not creating any new lock object. Therefore, lock will be NULL inside need_acc_lock(). So we should be good here as if the lock is NULL, need_acc_lock returns true. Please let me know your thoughts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh right, I quickly glanced over it and saw this line which looked similar:

module->lock_all_is_nocheck = true;
but that's the module, not the lock.

lock->type = LOCK_EXCLUSIVE;
} else {
lock->type = LOCK_SHARED;
}
}

if (ret == OMPI_SUCCESS) {
Expand Down