Skip to content

Commit

Permalink
Merge pull request #7219 from hzhou/2411_ch4_fix
Browse files Browse the repository at this point in the history
ch4: fix the is_local setting in the am path 

Approved-by: Ken Raffenetti
  • Loading branch information
hzhou authored Nov 15, 2024
2 parents 942f9bb + 0dff758 commit d1b04e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/mpid/ch4/netmod/ofi/ofi_send.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_issue_ack_recv(MPIR_Request * sreq, MPIR_
ackreq->remote_addr = MPIDI_OFI_av_to_phys(addr, nic, vci_remote);
ackreq->match_bits = match_bits;

#ifndef MPIDI_CH4_DIRECT_NETMOD
/* set is_local in case we go into active messages later */
MPIDI_REQUEST(sreq, is_local) = 0;
#endif
MPIDI_OFI_CALL_RETRY(fi_trecv(MPIDI_OFI_global.ctx[ackreq->ctx_idx].rx,
ackreq->ack_hdr, ackreq->ack_hdr_sz, NULL, ackreq->remote_addr,
ackreq->match_bits, 0ULL, (void *) &(ackreq->context)),
Expand Down
4 changes: 3 additions & 1 deletion src/mpid/ch4/netmod/ucx/ucx_send.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_NM_mpi_isend(const void *buf,
addr, request, vci_src, vci_dst, is_sync, 0 /* is_am */);
MPIDI_UCX_REQ(*request).s.am_req = NULL;
MPIDI_UCX_THREAD_CS_EXIT_VCI(vci_src);

#ifndef MPIDI_CH4_DIRECT_NETMOD
MPIDI_REQUEST(*request, is_local) = 0;
#endif

MPIR_FUNC_EXIT;
return mpi_errno;
Expand Down
2 changes: 0 additions & 2 deletions src/mpid/ch4/src/ch4_send.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_isend(const void *buf,
mpi_errno = MPIDI_SHM_mpi_isend(buf, count, datatype, rank, tag, comm, attr, av, req);
else
mpi_errno = MPIDI_NM_mpi_isend(buf, count, datatype, rank, tag, comm, attr, av, req);
if (mpi_errno == MPI_SUCCESS)
MPIDI_REQUEST(*req, is_local) = r;
#endif
MPIR_ERR_CHECK(mpi_errno);

Expand Down
3 changes: 3 additions & 0 deletions src/mpid/ch4/src/mpidig_part_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ int MPIDIG_part_send_init_target_msg_cb(void *am_hdr, void *data,
MPIR_ERR_CHKANDSTMT(unexp_req == NULL, mpi_errno, MPIX_ERR_NOREQ, goto fn_fail,
"**nomemreq");

#ifndef MPIDI_CH4_DIRECT_NETMOD
MPIDI_REQUEST(unexp_req, is_local) = is_local;
#endif
MPIDI_PART_REQUEST(unexp_req, u.recv.context_id) = msg_hdr->context_id;
part_rreq_update_sinfo(unexp_req, msg_hdr);

Expand Down
3 changes: 3 additions & 0 deletions src/mpid/ch4/src/mpidig_send.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDIG_isend_impl(const void *buf, MPI_Aint count,
src_vci, dst_vci, sreq), is_local, mpi_errno);
} else {
/* RNDV send */
#ifndef MPIDI_CH4_DIRECT_NETMOD
MPIDI_REQUEST(sreq, is_local) = is_local;
#endif
MPIDIG_REQUEST(sreq, buffer) = (void *) buf;
MPIDIG_REQUEST(sreq, count) = count;
MPIDIG_REQUEST(sreq, datatype) = datatype;
Expand Down

0 comments on commit d1b04e8

Please sign in to comment.