Skip to content

Commit ca34edc

Browse files
committed
Fix logic errors for continuation flags
Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 0dd5735 commit ca34edc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ompi/mpiext/continue/c/continuation.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ int ompi_continue_attach(
803803
return OMPI_ERR_REQUEST;
804804
}
805805

806-
bool req_volatile = (flags | MPIX_CONT_REQBUF_VOLATILE);
806+
bool req_volatile = (flags & MPIX_CONT_REQBUF_VOLATILE);
807807

808808
ompi_cont_request_t *cont_req = (ompi_cont_request_t *)continuation_request;
809809
ompi_continuation_t *cont = ompi_continue_cont_create(count, cont_req, cont_cb,
@@ -921,10 +921,13 @@ int ompi_continue_allocate_request(
921921
ompi_info_get_bool(info, "mpi_continue_poll_only", &test_poll, &flag);
922922

923923
if ((flag && test_poll)) {
924-
cont_req->cont_complete_list = OBJ_NEW(opal_list_t);
925924
cont_req->cont_flags |= MPIX_CONT_POLL_ONLY;
926925
}
927926

927+
if (cont_req->cont_flags & MPIX_CONT_POLL_ONLY) {
928+
cont_req->cont_complete_list = OBJ_NEW(opal_list_t);
929+
}
930+
928931
/* TODO: remove this flags, it should be part of attach */
929932
bool enqueue_complete = false;
930933
ompi_info_get_bool(info, "mpi_continue_enqueue_complete", &enqueue_complete, &flag);
@@ -941,6 +944,9 @@ int ompi_continue_allocate_request(
941944
cont_req->continue_max_poll = max_poll;
942945
}
943946
}
947+
if (0 == cont_req->continue_max_poll) {
948+
cont_req->continue_max_poll = UINT32_MAX;
949+
}
944950
*cont_req_ptr = &cont_req->super;
945951

946952
opal_mutex_atomic_lock(&cont_req_list_mtx);

0 commit comments

Comments
 (0)