Skip to content

mtl/ofi: fix problem with mprobe/mrecv #4533

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 4, 2017
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
7 changes: 5 additions & 2 deletions ompi/mca/mtl/ofi/mtl_ofi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
* reserved.
*
* $COPYRIGHT$
*
Expand Down Expand Up @@ -686,8 +688,8 @@ ompi_mtl_ofi_imrecv(struct mca_mtl_base_module_t *mtl,
msg.desc = NULL;
msg.iov_count = 1;
msg.addr = 0;
msg.tag = 0;
msg.ignore = 0;
msg.tag = ofi_req->match_bits;
msg.ignore = ofi_req->mask_bits;
msg.context = (void *)&ofi_req->ctx;
msg.data = 0;

Expand Down Expand Up @@ -868,6 +870,7 @@ ompi_mtl_ofi_improbe(struct mca_mtl_base_module_t *mtl,
ofi_req->error_callback = ompi_mtl_ofi_probe_error_callback;
ofi_req->completion_count = 1;
ofi_req->match_state = 0;
ofi_req->mask_bits = mask_bits;

MTL_OFI_RETRY_UNTIL_DONE(fi_trecvmsg(ompi_mtl_ofi.ep, &msg, msgflags));
if (-FI_ENOMSG == ret) {
Expand Down
7 changes: 6 additions & 1 deletion ompi/mca/mtl/ofi/mtl_ofi_request.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
* reserved.
*
* $COPYRIGHT$
*
Expand Down Expand Up @@ -71,9 +73,12 @@ struct ompi_mtl_ofi_request_t {
/** Flag to prevent MPI_Cancel from cancelling a started Recv request */
volatile bool req_started;

/** Request's tag used in case of an error. */
/** Request's tag used in case of an error. Also for FI_CLAIM requests. */
uint64_t match_bits;

/** Used to build msg for fi_trecvmsg with FI_CLAIM */
uint64_t mask_bits;

/** Remote OFI address used when a Recv needs to be ACKed */
fi_addr_t remote_addr;

Expand Down