Skip to content

Commit 4a7e02f

Browse files
committed
Merge pull request open-mpi#784 from francois-wellenreiter/trig_mtl_rdv
MTL portals4 : improve the rendez-vous protocol using PtlTriggeredGet…
2 parents 6050bf2 + 40c6f86 commit 4a7e02f

File tree

6 files changed

+207
-133
lines changed

6 files changed

+207
-133
lines changed

ompi/mca/mtl/portals4/mtl_portals4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ portals4_init_interface(void)
178178
me.ignore_bits = MTL_PORTALS4_CONTEXT_MASK |
179179
MTL_PORTALS4_SOURCE_MASK |
180180
MTL_PORTALS4_TAG_MASK;
181+
181182
ret = PtlMEAppend(ompi_mtl_portals4.ni_h,
182183
ompi_mtl_portals4.recv_idx,
183184
&me,

ompi/mca/mtl/portals4/mtl_portals4.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,26 @@ extern mca_mtl_portals4_module_t ompi_mtl_portals4;
202202
((int)((match_bits & MTL_PORTALS4_SOURCE_MASK) >> 24))
203203

204204

205+
/* hda_data bit manipulation
206+
*
207+
* 0 1234567 01234567 01234567 0123 4567 01234567 01234567 01234567 01234567
208+
* | | |
209+
* ^| | context id | message tag
210+
* || | |
211+
* +---- is_sync
212+
*/
213+
205214
#define MTL_PORTALS4_SYNC_MSG 0x8000000000000000ULL
206215

207-
#define MTL_PORTALS4_SET_HDR_DATA(hdr_data, opcount, length, sync) \
216+
#define MTL_PORTALS4_SET_HDR_DATA(hdr_data, tag, contextid, sync) \
208217
{ \
209218
hdr_data = (sync) ? 1 : 0; \
210-
hdr_data = (hdr_data << 15); \
211-
hdr_data |= opcount & 0x7FFFULL; \
212-
hdr_data = (hdr_data << 48); \
213-
hdr_data |= (length & 0xFFFFFFFFFFFFULL); \
219+
hdr_data = (hdr_data << 39); \
220+
hdr_data |= contextid; \
221+
hdr_data = (hdr_data << 24); \
222+
hdr_data |= (MTL_PORTALS4_TAG_MASK & tag); \
214223
}
215224

216-
#define MTL_PORTALS4_GET_LENGTH(hdr_data) ((size_t)(hdr_data & 0xFFFFFFFFFFFFULL))
217225
#define MTL_PORTALS4_IS_SYNC_MSG(hdr_data) \
218226
(0 != (MTL_PORTALS4_SYNC_MSG & hdr_data))
219227

ompi/mca/mtl/portals4/mtl_portals4_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ completion_fn(ptl_event_t *ev, ompi_mtl_portals4_base_request_t *ptl_base_reques
4141
ptl_request->status.MPI_SOURCE = MTL_PORTALS4_GET_SOURCE(ev->match_bits);
4242
ptl_request->status.MPI_TAG = MTL_PORTALS4_GET_TAG(ev->match_bits);
4343
ptl_request->status.MPI_ERROR = MPI_SUCCESS;
44-
ptl_request->status._ucount = MTL_PORTALS4_GET_LENGTH(ev->hdr_data);
44+
ptl_request->status._ucount += ev->mlength;
4545
if (ev->type != PTL_EVENT_SEARCH) {
4646
ptl_request->message = ompi_mtl_portals4_message_alloc(ev);
4747
}

0 commit comments

Comments
 (0)