Skip to content

Commit

Permalink
Merge pull request #5756 from raffenet/4.0rc3-fixes
Browse files Browse the repository at this point in the history
4.0rc3 fixes
  • Loading branch information
raffenet authored Jan 11, 2022
2 parents bc0a035 + ef21691 commit c41ba6d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion maint/version.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# changing this by playing with diversions, but then we would probably be
# playing with autotools-fire.

m4_define([MPICH_VERSION_m4],[4.0rc2])dnl
m4_define([MPICH_VERSION_m4],[4.0rc3])dnl
m4_define([MPICH_RELEASE_DATE_m4],[unreleased development copy])dnl

# For libtool ABI versioning rules see:
Expand Down
5 changes: 4 additions & 1 deletion src/mpi/coll/op/op_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ int MPIR_Op_create_impl(MPI_User_function * user_fn, int commute, MPIR_Op ** p_o

int MPIR_Op_create_large_impl(MPI_User_function_c * user_fn, int commute, MPIR_Op ** p_op_ptr)
{
int mpi_errno = MPIR_Op_create_impl((void *) user_fn, commute, p_op_ptr);
int mpi_errno = MPIR_Op_create_impl(NULL, commute, p_op_ptr);
if (mpi_errno == MPI_SUCCESS) {
(*p_op_ptr)->kind =
commute ? MPIR_OP_KIND__USER_LARGE : MPIR_OP_KIND__USER_NONCOMMUTE_LARGE;
(*p_op_ptr)->function.c_large_function = (void (*)(const void *, void *,
const MPI_Count *,
const MPI_Datatype *)) user_fn;
}
return mpi_errno;
}
Expand Down
4 changes: 2 additions & 2 deletions src/mpid/ch4/netmod/ofi/ofi_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ int MPIDI_OFI_comm_set_hints(MPIR_Comm * comm, MPIR_Info * info)
int mpi_errno = MPI_SUCCESS;

mpi_errno = update_multi_nic_hints(comm);
MPIR_ERR_POP(mpi_errno);
MPIR_ERR_CHECK(mpi_errno);
mpi_errno = update_nic_preferences(comm);
MPIR_ERR_POP(mpi_errno);
MPIR_ERR_CHECK(mpi_errno);

fn_exit:
return mpi_errno;
Expand Down
20 changes: 0 additions & 20 deletions src/mpid/ch4/src/ch4_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "ch4_comm.h"
#include "ch4i_comm.h"

static void register_comm_hints(MPIR_Comm * comm);

int MPID_Comm_reenable_anysource(MPIR_Comm * comm, MPIR_Group ** failed_group_ptr)
{
Expand Down Expand Up @@ -190,16 +189,9 @@ int MPID_Comm_commit_pre_hook(MPIR_Comm * comm)
}
}

register_comm_hints(comm);

mpi_errno = MPIDIG_init_comm(comm);
MPIR_ERR_CHECK(mpi_errno);

/* vci hints defaults */
comm->hints[MPIR_COMM_HINT_SENDER_VCI] = MPIDI_VCI_INVALID;
comm->hints[MPIR_COMM_HINT_RECEIVER_VCI] = MPIDI_VCI_INVALID;
comm->hints[MPIR_COMM_HINT_VCI] = MPIDI_VCI_INVALID;

mpi_errno = MPIDI_NM_mpi_comm_commit_pre_hook(comm);
MPIR_ERR_CHECK(mpi_errno);
#ifndef MPIDI_CH4_DIRECT_NETMOD
Expand Down Expand Up @@ -646,15 +638,3 @@ int MPID_Create_intercomm_from_lpids(MPIR_Comm * newcomm_ptr, int size, const ui
fn_fail:
goto fn_exit;
}

/* Register CH4-specific hints */
static void register_comm_hints(MPIR_Comm * comm)
{
/* Non-standard hints for VCI selection. Default value MPIDI_VCI_INVALID (-1) */
MPIR_Comm_register_hint(MPIR_COMM_HINT_SENDER_VCI, "sender_vci",
MPIDI_set_comm_hint_sender_vci, MPIR_COMM_HINT_TYPE_INT, 0, -1);
MPIR_Comm_register_hint(MPIR_COMM_HINT_RECEIVER_VCI, "receiver_vci",
MPIDI_set_comm_hint_receiver_vci, MPIR_COMM_HINT_TYPE_INT, 0, -1);
MPIR_Comm_register_hint(MPIR_COMM_HINT_VCI, "vci",
MPIDI_set_comm_hint_vci, MPIR_COMM_HINT_TYPE_INT, 0, -1);
}
18 changes: 17 additions & 1 deletion src/mpid/ch4/src/ch4_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,20 @@ static int set_runtime_configurations(void)
#error "Thread Granularity: Invalid"
#endif

/* Register CH4-specific hints */
static void register_comm_hints(void)
{
/* Non-standard hints for VCI selection. */
MPIR_Comm_register_hint(MPIR_COMM_HINT_SENDER_VCI, "sender_vci",
MPIDI_set_comm_hint_sender_vci, MPIR_COMM_HINT_TYPE_INT, 0,
MPIDI_VCI_INVALID);
MPIR_Comm_register_hint(MPIR_COMM_HINT_RECEIVER_VCI, "receiver_vci",
MPIDI_set_comm_hint_receiver_vci, MPIR_COMM_HINT_TYPE_INT, 0,
MPIDI_VCI_INVALID);
MPIR_Comm_register_hint(MPIR_COMM_HINT_VCI, "vci", MPIDI_set_comm_hint_vci,
MPIR_COMM_HINT_TYPE_INT, 0, MPIDI_VCI_INVALID);
}

int MPID_Init(int requested, int *provided)
{
int mpi_errno = MPI_SUCCESS;
Expand Down Expand Up @@ -455,6 +469,8 @@ int MPID_Init(int requested, int *provided)
MPIR_Process.attrs.appnum = MPIR_Process.appnum;
MPIR_Process.attrs.io = MPI_ANY_SOURCE;

register_comm_hints();

fn_exit:
MPIR_FUNC_EXIT;
return mpi_errno;
Expand Down Expand Up @@ -795,7 +811,7 @@ int MPID_Get_max_node_id(MPIR_Comm * comm, int *max_id_p)
int mpi_errno = MPI_SUCCESS;
MPIR_FUNC_ENTER;

return MPIR_Process.num_nodes - 1;
*max_id_p = MPIR_Process.num_nodes - 1;

MPIR_FUNC_EXIT;
return mpi_errno;
Expand Down

0 comments on commit c41ba6d

Please sign in to comment.