Skip to content

Commit

Permalink
ch4: fix usage of MPIR_ERR_OTHER and MPIR_ERR_PROC_FAILED
Browse files Browse the repository at this point in the history
They are no longer the same as MPI_ERR_OTHER and MPI_ERR_PROC_FAILED.
  • Loading branch information
hzhou committed Jul 11, 2023
1 parent 9ffd793 commit 69144d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/mpid/ch4/netmod/ofi/ofi_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ MPL_STATIC_INLINE_PREFIX void MPIDI_OFI_idata_set_error_bits(uint64_t * data_fie
}
}

/* Get the error flag from the OFI data field. */
/* Get the mpi error code from the OFI data field. */
MPL_STATIC_INLINE_PREFIX int MPIDI_OFI_idata_get_error_bits(uint64_t idata)
{
if ((idata >> MPIDI_OFI_IDATA_SRC_BITS) & MPIDI_OFI_ERR_OTHER) {
return MPIR_ERR_OTHER;
return MPI_ERR_OTHER;
} else if ((idata >> MPIDI_OFI_IDATA_SRC_BITS) & MPIDI_OFI_ERR_PROC_FAILED) {
return MPIR_ERR_PROC_FAILED;
return MPIX_ERR_PROC_FAILED;
} else {
return MPI_SUCCESS;
}
Expand Down
6 changes: 3 additions & 3 deletions src/mpid/ch4/shm/posix/release_gather/release_gather.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ int MPIDI_POSIX_mpi_release_gather_comm_init(MPIR_Comm * comm_ptr,
(void **) &(release_gather_info_ptr->flags_addr));
if (mpi_errno) {
/* for communication errors, just record the error but continue */
MPIR_ERR_ADD(mpi_errno_ret, MPIR_ERR_OTHER);
MPIR_ERR_ADD(mpi_errno_ret, MPI_ERR_OTHER);
}

MPIR_ERR_COLL_CHECKANDCONT(mpi_errno_ret, errflag, mpi_errno_ret);
Expand Down Expand Up @@ -400,7 +400,7 @@ int MPIDI_POSIX_mpi_release_gather_comm_init(MPIR_Comm * comm_ptr,
MPIDU_shm_alloc(comm_ptr, RELEASE_GATHER_FIELD(comm_ptr, bcast_shm_size),
(void **) &(RELEASE_GATHER_FIELD(comm_ptr, bcast_buf_addr)));
if (mpi_errno) {
MPIR_ERR_ADD(mpi_errno_ret, MPIR_ERR_OTHER);
MPIR_ERR_ADD(mpi_errno_ret, MPI_ERR_OTHER);
}
MPIR_ERR_COLL_CHECKANDCONT(mpi_errno, errflag, mpi_errno_ret);
}
Expand All @@ -420,7 +420,7 @@ int MPIDI_POSIX_mpi_release_gather_comm_init(MPIR_Comm * comm_ptr,
(void **) &(RELEASE_GATHER_FIELD(comm_ptr, reduce_buf_addr)));
if (mpi_errno) {
/* for communication errors, just record the error but continue */
MPIR_ERR_ADD(mpi_errno_ret, MPIR_ERR_OTHER);
MPIR_ERR_ADD(mpi_errno_ret, MPI_ERR_OTHER);
}
MPIR_ERR_COLL_CHECKANDCONT(mpi_errno_ret, errflag, mpi_errno_ret);
MPIR_ERR_CHECK(mpi_errno_ret);
Expand Down
2 changes: 1 addition & 1 deletion src/mpid/ch4/shm/posix/release_gather/release_gather.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_
if ((int) recv_bytes != count) {
/* It is OK to compare with count because datatype is always MPI_BYTE for Bcast */
errflag = MPIR_ERR_OTHER;
MPIR_ERR_SET(mpi_errno, errflag, "**fail");
MPIR_ERR_SET(mpi_errno, MPI_ERR_OTHER, "**fail");
MPIR_ERR_ADD(mpi_errno_ret, mpi_errno);
}
#else
Expand Down

0 comments on commit 69144d0

Please sign in to comment.