Skip to content

Commit d1b04e8

Browse files
authored
Merge pull request #7219 from hzhou/2411_ch4_fix
ch4: fix the is_local setting in the am path Approved-by: Ken Raffenetti
2 parents 942f9bb + 0dff758 commit d1b04e8

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

src/mpid/ch4/netmod/ofi/ofi_send.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_issue_ack_recv(MPIR_Request * sreq, MPIR_
104104
ackreq->remote_addr = MPIDI_OFI_av_to_phys(addr, nic, vci_remote);
105105
ackreq->match_bits = match_bits;
106106

107+
#ifndef MPIDI_CH4_DIRECT_NETMOD
108+
/* set is_local in case we go into active messages later */
109+
MPIDI_REQUEST(sreq, is_local) = 0;
110+
#endif
107111
MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[ackreq->ctx_idx].rx,
108112
ackreq->ack_hdr, ackreq->ack_hdr_sz, NULL, ackreq->remote_addr,
109113
ackreq->match_bits, 0ULL, (void *) &(ackreq->context)),

src/mpid/ch4/netmod/ucx/ucx_send.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_isend(const void *buf,
161161
addr, request, vci_src, vci_dst, is_sync, 0 /* is_am */);
162162
MPIDI_UCX_REQ(*request).s.am_req = NULL;
163163
MPIDI_UCX_THREAD_CS_EXIT_VCI(vci_src);
164-
164+
#ifndef MPIDI_CH4_DIRECT_NETMOD
165+
MPIDI_REQUEST(*request, is_local) = 0;
166+
#endif
165167

166168
MPIR_FUNC_EXIT;
167169
return mpi_errno;

src/mpid/ch4/src/ch4_send.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend(const void *buf,
2929
mpi_errno = MPIDI_SHM_mpi_isend(buf, count, datatype, rank, tag, comm, attr, av, req);
3030
else
3131
mpi_errno = MPIDI_NM_mpi_isend(buf, count, datatype, rank, tag, comm, attr, av, req);
32-
if (mpi_errno == MPI_SUCCESS)
33-
MPIDI_REQUEST(*req, is_local) = r;
3432
#endif
3533
MPIR_ERR_CHECK(mpi_errno);
3634

src/mpid/ch4/src/mpidig_part_callbacks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ int MPIDIG_part_send_init_target_msg_cb(void *am_hdr, void *data,
8585
MPIR_ERR_CHKANDSTMT(unexp_req == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail,
8686
"**nomemreq");
8787

88+
#ifndef MPIDI_CH4_DIRECT_NETMOD
89+
MPIDI_REQUEST(unexp_req, is_local) = is_local;
90+
#endif
8891
MPIDI_PART_REQUEST(unexp_req, u.recv.context_id) = msg_hdr->context_id;
8992
part_rreq_update_sinfo(unexp_req, msg_hdr);
9093

src/mpid/ch4/src/mpidig_send.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_isend_impl(const void *buf, MPI_Aint count,
9999
src_vci, dst_vci, sreq), is_local, mpi_errno);
100100
} else {
101101
/* RNDV send */
102+
#ifndef MPIDI_CH4_DIRECT_NETMOD
103+
MPIDI_REQUEST(sreq, is_local) = is_local;
104+
#endif
102105
MPIDIG_REQUEST(sreq, buffer) = (void *) buf;
103106
MPIDIG_REQUEST(sreq, count) = count;
104107
MPIDIG_REQUEST(sreq, datatype) = datatype;

0 commit comments

Comments
 (0)