Skip to content

Commit b160cf6

Browse files
authored
Merge pull request #4533 from hppritcha/topic/ofi_mtl_mprobe_fixes
mtl/ofi: fix problem with mprobe/mrecv
2 parents 2233e44 + cd48ecc commit b160cf6

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ompi/mca/mtl/ofi/mtl_ofi.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved
3+
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
4+
* reserved.
35
*
46
* $COPYRIGHT$
57
*
@@ -686,8 +688,8 @@ ompi_mtl_ofi_imrecv(struct mca_mtl_base_module_t *mtl,
686688
msg.desc = NULL;
687689
msg.iov_count = 1;
688690
msg.addr = 0;
689-
msg.tag = 0;
690-
msg.ignore = 0;
691+
msg.tag = ofi_req->match_bits;
692+
msg.ignore = ofi_req->mask_bits;
691693
msg.context = (void *)&ofi_req->ctx;
692694
msg.data = 0;
693695

@@ -868,6 +870,7 @@ ompi_mtl_ofi_improbe(struct mca_mtl_base_module_t *mtl,
868870
ofi_req->error_callback = ompi_mtl_ofi_probe_error_callback;
869871
ofi_req->completion_count = 1;
870872
ofi_req->match_state = 0;
873+
ofi_req->mask_bits = mask_bits;
871874

872875
MTL_OFI_RETRY_UNTIL_DONE(fi_trecvmsg(ompi_mtl_ofi.ep, &msg, msgflags));
873876
if (-FI_ENOMSG == ret) {

ompi/mca/mtl/ofi/mtl_ofi_request.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved
3+
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
4+
* reserved.
35
*
46
* $COPYRIGHT$
57
*
@@ -71,9 +73,12 @@ struct ompi_mtl_ofi_request_t {
7173
/** Flag to prevent MPI_Cancel from cancelling a started Recv request */
7274
volatile bool req_started;
7375

74-
/** Request's tag used in case of an error. */
76+
/** Request's tag used in case of an error. Also for FI_CLAIM requests. */
7577
uint64_t match_bits;
7678

79+
/** Used to build msg for fi_trecvmsg with FI_CLAIM */
80+
uint64_t mask_bits;
81+
7782
/** Remote OFI address used when a Recv needs to be ACKed */
7883
fi_addr_t remote_addr;
7984

0 commit comments

Comments
 (0)