Skip to content

Commit 2844c5f

Browse files
committed
Merge pull request open-mpi#785 from francois-wellenreiter/mtl_remove_mdbind
MTL portals4 : remove useless PtlMDBind PtlMDRelease calls for rendez…
2 parents e330595 + 7a39b3e commit 2844c5f

File tree

2 files changed

+3
-25
lines changed

2 files changed

+3
-25
lines changed

ompi/mca/mtl/portals4/mtl_portals4_recv.c

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,36 +73,18 @@ read_msg(void *start, ptl_size_t length, ptl_process_t target,
7373
ptl_match_bits_t match_bits, ptl_size_t remote_offset,
7474
ompi_mtl_portals4_recv_request_t *request)
7575
{
76-
ptl_md_t md;
7776
int ret;
7877

79-
/* FIX ME: This needs to be on the send eq... */
80-
md.start = start;
81-
md.length = length;
82-
md.options = 0;
83-
md.eq_handle = ompi_mtl_portals4.send_eq_h;
84-
md.ct_handle = PTL_CT_NONE;
85-
86-
ret = PtlMDBind(ompi_mtl_portals4.ni_h,
87-
&md,
88-
&request->md_h);
89-
if (OPAL_UNLIKELY(PTL_OK != ret)) {
90-
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
91-
"%s:%d: PtlMDBind failed: %d",
92-
__FILE__, __LINE__, ret);
93-
return OMPI_ERR_OUT_OF_RESOURCE;
94-
}
95-
9678
#if OMPI_MTL_PORTALS4_FLOW_CONTROL
9779
while (OPAL_UNLIKELY(OPAL_THREAD_ADD32(&ompi_mtl_portals4.flowctl.send_slots, -1) < 0)) {
9880
OPAL_THREAD_ADD32(&ompi_mtl_portals4.flowctl.send_slots, 1);
9981
ompi_mtl_portals4_progress();
10082
}
10183
#endif
10284

103-
ret = PtlGet(request->md_h,
104-
0,
105-
md.length,
85+
ret = PtlGet(ompi_mtl_portals4.send_md_h,
86+
(ptl_size_t) start,
87+
length,
10688
target,
10789
ompi_mtl_portals4.read_idx,
10890
match_bits,
@@ -112,7 +94,6 @@ read_msg(void *start, ptl_size_t length, ptl_process_t target,
11294
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
11395
"%s:%d: PtlGet failed: %d",
11496
__FILE__, __LINE__, ret);
115-
PtlMDRelease(request->md_h);
11697
return OMPI_ERR_OUT_OF_RESOURCE;
11798
}
11899

@@ -214,7 +195,6 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
214195
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
215196
"%s:%d: PTL_EVENT_REPLY with ni_fail_type: %d",
216197
__FILE__, __LINE__, ev->ni_fail_type);
217-
PtlMDRelease(ptl_request->md_h);
218198
goto callback_error;
219199
}
220200

@@ -247,7 +227,6 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
247227
__FILE__, __LINE__, ret);
248228
ptl_request->super.super.ompi_req->req_status.MPI_ERROR = ret;
249229
}
250-
PtlMDRelease(ptl_request->md_h);
251230

252231
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_framework.framework_output,
253232
"Recv %lu (0x%lx) completed, reply",

ompi/mca/mtl/portals4/mtl_portals4_request.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ typedef struct ompi_mtl_portals4_send_request_t ompi_mtl_portals4_send_request_t
6868
struct ompi_mtl_portals4_recv_request_t {
6969
ompi_mtl_portals4_base_request_t super;
7070
void *buffer_ptr;
71-
ptl_handle_md_t md_h;
7271
ptl_handle_me_t me_h;
7372
ptl_handle_ct_t ct_h;
7473
bool is_triggered;

0 commit comments

Comments
 (0)