Commit e08ee948 authored by David Goodell's avatar David Goodell
Browse files

[svn-r8341] convert MPIR_Group_translate_ranks_impl to use mpi_errno errhandling

No reviewer.
parent 8366f468
......@@ -3763,7 +3763,7 @@ int MPIR_Type_indexed_impl(int count, int blocklens[], int indices[], MPI_Dataty
void MPIR_Type_free_impl(MPI_Datatype *datatype);
int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype old_type, MPI_Datatype *newtype_p);
int MPIR_Type_struct_impl(int count, int blocklens[], MPI_Aint indices[], MPI_Datatype old_types[], MPI_Datatype *newtype);
void MPIR_Group_translate_ranks_impl(MPID_Group *group_ptr1, int n, int *ranks1,
int MPIR_Group_translate_ranks_impl(MPID_Group *group_ptr1, int n, int *ranks1,
MPID_Group *group_ptr2, int *ranks2);
int MPIR_Pack_impl(void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, int outcount, int *position);
void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, int *size);
......
......@@ -28,8 +28,8 @@
#define FUNCNAME MPIR_Group_translate_ranks_impl
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
void MPIR_Group_translate_ranks_impl(MPID_Group *gp1, int n, int *ranks1,
MPID_Group *gp2, int *ranks2)
int MPIR_Group_translate_ranks_impl(MPID_Group *gp1, int n, int *ranks1,
MPID_Group *gp2, int *ranks2)
{
int i, g2_idx, l1_pid, l2_pid;
......@@ -96,6 +96,11 @@ void MPIR_Group_translate_ranks_impl(MPID_Group *gp1, int n, int *ranks1,
}
}
}
int mpi_errno = MPI_SUCCESS;
fn_exit:
return mpi_errno;
fn_fail:
goto fn_exit;
}
......@@ -196,9 +201,10 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, int *ranks1,
# endif /* HAVE_ERROR_CHECKING */
/* ... body of routine ... */
MPIR_Group_translate_ranks_impl(group_ptr1, n, ranks1, group_ptr2, ranks2);
mpi_errno = MPIR_Group_translate_ranks_impl(group_ptr1, n, ranks1, group_ptr2, ranks2);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
/* ... end of body of routine ... */
#ifdef HAVE_ERROR_CHECKING
......
......@@ -1088,8 +1088,9 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
MPIR_Group_translate_ranks_impl(post_grp_ptr, post_grp_size, ranks_in_post_grp,
win_grp_ptr, ranks_in_win_grp);
mpi_errno = MPIR_Group_translate_ranks_impl(post_grp_ptr, post_grp_size, ranks_in_post_grp,
win_grp_ptr, ranks_in_win_grp);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
rank = win_ptr->myrank;
......@@ -1245,10 +1246,11 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
mpi_errno = MPIR_Comm_group_impl(comm_ptr, &win_grp_ptr);
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
MPIR_Group_translate_ranks_impl(win_ptr->start_group_ptr, start_grp_size,
ranks_in_start_grp,
win_grp_ptr, ranks_in_win_grp);
mpi_errno = MPIR_Group_translate_ranks_impl(win_ptr->start_group_ptr, start_grp_size,
ranks_in_start_grp,
win_grp_ptr, ranks_in_win_grp);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
rank = win_ptr->myrank;
/* If MPI_MODE_NOCHECK was not specified, we need to check if
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment