Skip to content

Commit 18baa5e

Browse files
committed
use sync_send mask for ofi_create_recv_tag
The upper 2 bits of an ompi tag encode the synchronize send and synchronize send ack. Because the mtl_ofi_create_recv_tag_CQD and mtl_ofi_create_recv_tag functions both use ompi_mtl_ofi.sync_proto_mask instead of ompi_mtl_ofi.sync_send when generating their "ignore" masks, they hide the ack bit, turning the tag into an "any tag receive" This is an issue because ssend is implemented by doing a send and receive internally. So if there happens to be an outstanding posted receive posted before the ssend, that receive will end up consuming the internal message intended for the ssend's internal receive. Updating mtl_ofi_create_recv_tag_CQD and mtl_ofi_create_recv_tag functions to use ompi_mtl_ofi.sync_send fixes this. Authored-by: John L. Byrne <john.l.byrne@hpe.com> Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
1 parent eca00a7 commit 18baa5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/mtl/ofi/mtl_ofi_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ __opal_attribute_always_inline__ static inline void
160160
mtl_ofi_create_recv_tag_CQD(uint64_t *match_bits, uint64_t *mask_bits,
161161
int comm_id, int tag)
162162
{
163-
*mask_bits = ompi_mtl_ofi.sync_proto_mask;
163+
*mask_bits = ompi_mtl_ofi.sync_send;
164164
*match_bits = (uint64_t) comm_id;
165165
*match_bits = (*match_bits << (MTL_OFI_PROTO_BIT_COUNT
166166
+ MTL_OFI_TAG_BIT_COUNT_DATA));
@@ -229,7 +229,7 @@ __opal_attribute_always_inline__ static inline void
229229
mtl_ofi_create_recv_tag(uint64_t *match_bits, uint64_t *mask_bits,
230230
int comm_id, int source, int tag)
231231
{
232-
*mask_bits = ompi_mtl_ofi.sync_proto_mask;
232+
*mask_bits = ompi_mtl_ofi.sync_send;
233233
*match_bits = comm_id;
234234
*match_bits = (*match_bits << ompi_mtl_ofi.num_bits_source_rank);
235235

0 commit comments

Comments
 (0)