|
Packit Service |
c5cf8c |
/* -*- Mode: C ; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* (C) 2006 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
* Portions of this code were written by Intel Corporation.
|
|
Packit Service |
c5cf8c |
* Copyright (C) 2011-2016 Intel Corporation. Intel provides this material
|
|
Packit Service |
c5cf8c |
* to Argonne National Laboratory subject to Software Grant and Corporate
|
|
Packit Service |
c5cf8c |
* Contributor License Agreement dated February 8, 2012.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
#ifndef CH4_COLL_IMPL_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define CH4_COLL_IMPL_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include "ch4_coll_params.h"
|
|
Packit Service |
c5cf8c |
#include "coll_algo_params.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Barrier_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_alpha(MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *barrier_node_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
const void *barrier_roots_container = MPIDI_coll_get_next_container(barrier_node_container);
|
|
Packit Service |
c5cf8c |
const void *bcast_node_container = MPIDI_coll_get_next_container(barrier_roots_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* do the intranode barrier on all nodes */
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_SHM_mpi_barrier(comm->node_comm, errflag, barrier_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_NM_mpi_barrier(comm->node_comm, errflag, barrier_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* do the barrier across roots of all nodes */
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_NM_mpi_barrier(comm->node_roots_comm, errflag, barrier_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* release the local processes on each node with a 1-byte
|
|
Packit Service |
c5cf8c |
* broadcast (0-byte broadcast just returns without doing
|
|
Packit Service |
c5cf8c |
* anything) */
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
int i = 0;
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_bcast(&i, 1, MPI_BYTE, 0, comm->node_comm, errflag, bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(&i, 1, MPI_BYTE, 0, comm->node_comm, errflag, bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Barrier_intra_composition_beta
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_intra_composition_beta(MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *barrier_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_NM_mpi_barrier(comm, errflag, barrier_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Barrier_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Barrier_inter_composition_alpha(MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Barrier_inter_auto(comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Bcast_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_alpha(void *buffer, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *bcast_roots_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
const void *bcast_node_container = MPIDI_coll_get_next_container(bcast_roots_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm == NULL && comm->rank == root) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIC_Send(buffer, count, datatype, 0, MPIR_BCAST_TAG, comm->node_comm, errflag);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL && comm->rank != root &&
|
|
Packit Service |
c5cf8c |
MPIR_Get_intranode_rank(comm, root) != -1) {
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIC_Recv(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root), MPIR_BCAST_TAG,
|
|
Packit Service |
c5cf8c |
comm->node_comm, MPI_STATUS_IGNORE, errflag);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(buffer, count, datatype, MPIR_Get_internode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_roots_comm, errflag, bcast_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Bcast_intra_composition_beta
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_beta(void *buffer, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *bcast_roots_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
const void *bcast_node_container_root_local =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(bcast_roots_container);
|
|
Packit Service |
c5cf8c |
const void *bcast_node_container_root_remote =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(bcast_node_container_root_local);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) > 0) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_bcast(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_comm, errflag, bcast_node_container_root_local);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(buffer, count, datatype, MPIR_Get_intranode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_comm, errflag, bcast_node_container_root_local);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(buffer, count, datatype, MPIR_Get_internode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_roots_comm, errflag, bcast_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) <= 0) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container_root_remote);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(buffer, count, datatype, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container_root_remote);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Bcast_intra_composition_gamma
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_intra_composition_gamma(void *buffer, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *bcast_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_NM_mpi_bcast(buffer, count, datatype, root, comm, errflag, bcast_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Bcast_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Bcast_inter_composition_alpha(void *buffer, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Bcast_inter_auto(buffer, count, datatype, root, comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allreduce_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *reduce_node_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
const void *allred_roots_container = MPIDI_coll_get_next_container(reduce_node_container);
|
|
Packit Service |
c5cf8c |
const void *bcast_node_container = MPIDI_coll_get_next_container(allred_roots_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
if ((sendbuf == MPI_IN_PLACE) && (comm->node_comm->rank != 0)) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_reduce(recvbuf, NULL, count, datatype, op, 0, comm->node_comm,
|
|
Packit Service |
c5cf8c |
errflag, reduce_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(recvbuf, NULL, count, datatype, op, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
reduce_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
} else {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, 0, comm->node_comm,
|
|
Packit Service |
c5cf8c |
errflag, reduce_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, 0, comm->node_comm,
|
|
Packit Service |
c5cf8c |
errflag, reduce_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
} else {
|
|
Packit Service |
c5cf8c |
if (sendbuf != MPI_IN_PLACE) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Localcopy(sendbuf, count, datatype, recvbuf, count, datatype);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_allreduce(MPI_IN_PLACE, recvbuf, count, datatype, op,
|
|
Packit Service |
c5cf8c |
comm->node_roots_comm, errflag, allred_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_SHM_mpi_bcast(recvbuf, count, datatype, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIDI_NM_mpi_bcast(recvbuf, count, datatype, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allreduce_intra_composition_gamma
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_intra_composition_beta(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *allred_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_allreduce(sendbuf, recvbuf, count, datatype, op, comm, errflag,
|
|
Packit Service |
c5cf8c |
allred_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allreduce_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allreduce_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Allreduce_inter_auto(sendbuf, recvbuf, count, datatype, op, comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op, int root,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
int mpi_errno_ret = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
MPI_Aint true_lb = 0;
|
|
Packit Service |
c5cf8c |
MPI_Aint true_extent = 0;
|
|
Packit Service |
c5cf8c |
MPI_Aint extent = 0;
|
|
Packit Service |
c5cf8c |
const void *reduce_roots_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
const void *reduce_node_container = MPIDI_coll_get_next_container(reduce_roots_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_DECL(1);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
void *tmp_buf = NULL;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* Create a temporary buffer on local roots of all nodes */
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
|
|
Packit Service |
c5cf8c |
MPIR_Datatype_get_extent_macro(datatype, extent);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent));
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_MALLOC(tmp_buf, void *, count * (MPL_MAX(extent, true_extent)),
|
|
Packit Service |
c5cf8c |
mpi_errno, "temporary buffer", MPL_MEM_BUFFER);
|
|
Packit Service |
c5cf8c |
/* adjust for potential negative lower bound in datatype */
|
|
Packit Service |
c5cf8c |
tmp_buf = (void *) ((char *) tmp_buf - true_lb);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* do the intranode reduce on all nodes other than the root's node */
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) == -1) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
reduce_node_container);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, 0, comm->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
reduce_node_container);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
if (mpi_errno) {
|
|
Packit Service |
c5cf8c |
/* for communication errors, just record the error but continue */
|
|
Packit Service |
c5cf8c |
*errflag =
|
|
Packit Service |
c5cf8c |
MPIX_ERR_PROC_FAILED ==
|
|
Packit Service |
c5cf8c |
MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER;
|
|
Packit Service |
c5cf8c |
MPIR_ERR_SET(mpi_errno, *errflag, "**fail");
|
|
Packit Service |
c5cf8c |
MPIR_ERR_ADD(mpi_errno_ret, mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* do the internode reduce to the root's node */
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
if (comm->node_roots_comm->rank != MPIR_Get_internode_rank(comm, root)) {
|
|
Packit Service |
c5cf8c |
/* I am not on root's node. Use tmp_buf if we
|
|
Packit Service |
c5cf8c |
* participated in the first reduce, otherwise use sendbuf */
|
|
Packit Service |
c5cf8c |
const void *buf = (comm->node_comm == NULL ? sendbuf : tmp_buf);
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(buf, NULL, count, datatype,
|
|
Packit Service |
c5cf8c |
op, MPIR_Get_internode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_roots_comm, errflag, reduce_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno) {
|
|
Packit Service |
c5cf8c |
/* for communication errors, just record the error but continue */
|
|
Packit Service |
c5cf8c |
*errflag =
|
|
Packit Service |
c5cf8c |
MPIX_ERR_PROC_FAILED ==
|
|
Packit Service |
c5cf8c |
MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER;
|
|
Packit Service |
c5cf8c |
MPIR_ERR_SET(mpi_errno, *errflag, "**fail");
|
|
Packit Service |
c5cf8c |
MPIR_ERR_ADD(mpi_errno_ret, mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
} else { /* I am on root's node. I have not participated in the earlier reduce. */
|
|
Packit Service |
c5cf8c |
if (comm->rank != root) {
|
|
Packit Service |
c5cf8c |
/* I am not the root though. I don't have a valid recvbuf.
|
|
Packit Service |
c5cf8c |
* Use tmp_buf as recvbuf. */
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype,
|
|
Packit Service |
c5cf8c |
op, MPIR_Get_internode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_roots_comm, errflag, reduce_roots_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (mpi_errno) {
|
|
Packit Service |
c5cf8c |
/* for communication errors, just record the error but continue */
|
|
Packit Service |
c5cf8c |
*errflag =
|
|
Packit Service |
c5cf8c |
MPIX_ERR_PROC_FAILED ==
|
|
Packit Service |
c5cf8c |
MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER;
|
|
Packit Service |
c5cf8c |
MPIR_ERR_SET(mpi_errno, *errflag, "**fail");
|
|
Packit Service |
c5cf8c |
MPIR_ERR_ADD(mpi_errno_ret, mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* point sendbuf at tmp_buf to make final intranode reduce easy */
|
|
Packit Service |
c5cf8c |
sendbuf = tmp_buf;
|
|
Packit Service |
c5cf8c |
} else {
|
|
Packit Service |
c5cf8c |
/* I am the root. in_place is automatically handled. */
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
op, MPIR_Get_internode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_roots_comm, errflag, reduce_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno) {
|
|
Packit Service |
c5cf8c |
/* for communication errors, just record the error but continue */
|
|
Packit Service |
c5cf8c |
*errflag =
|
|
Packit Service |
c5cf8c |
MPIX_ERR_PROC_FAILED ==
|
|
Packit Service |
c5cf8c |
MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER;
|
|
Packit Service |
c5cf8c |
MPIR_ERR_SET(mpi_errno, *errflag, "**fail");
|
|
Packit Service |
c5cf8c |
MPIR_ERR_ADD(mpi_errno_ret, mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* set sendbuf to MPI_IN_PLACE to make final intranode reduce easy. */
|
|
Packit Service |
c5cf8c |
sendbuf = MPI_IN_PLACE;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* do the intranode reduce on the root's node */
|
|
Packit Service |
c5cf8c |
if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) != -1) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_reduce(sendbuf, recvbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
op, MPIR_Get_intranode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_comm, errflag, reduce_node_container);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
op, MPIR_Get_intranode_rank(comm, root),
|
|
Packit Service |
c5cf8c |
comm->node_comm, errflag, reduce_node_container);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
if (mpi_errno) {
|
|
Packit Service |
c5cf8c |
/* for communication errors, just record the error but continue */
|
|
Packit Service |
c5cf8c |
*errflag =
|
|
Packit Service |
c5cf8c |
MPIX_ERR_PROC_FAILED ==
|
|
Packit Service |
c5cf8c |
MPIR_ERR_GET_CLASS(mpi_errno) ? MPIR_ERR_PROC_FAILED : MPIR_ERR_OTHER;
|
|
Packit Service |
c5cf8c |
MPIR_ERR_SET(mpi_errno, *errflag, "**fail");
|
|
Packit Service |
c5cf8c |
MPIR_ERR_ADD(mpi_errno_ret, mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_FREEALL();
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_intra_composition_beta
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op, int root,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *reduce_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root,
|
|
Packit Service |
c5cf8c |
comm, errflag, reduce_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op, int root,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Reduce_inter_auto(sendbuf, recvbuf, count, datatype, op, root, comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Alltoall_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *alltoall_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_alltoall(sendbuf, sendcount, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcount, recvtype, comm_ptr, errflag, alltoall_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Alltoall_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoall_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Alltoall_inter_auto(sendbuf, sendcount, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcount, recvtype, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Alltoallv_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
const int *sendcounts,
|
|
Packit Service |
c5cf8c |
const int *sdispls,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int *recvcounts,
|
|
Packit Service |
c5cf8c |
const int *rdispls,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *alltoallv_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_alltoallv(sendbuf, sendcounts, sdispls,
|
|
Packit Service |
c5cf8c |
sendtype, recvbuf, recvcounts,
|
|
Packit Service |
c5cf8c |
rdispls, recvtype, comm_ptr, errflag, alltoallv_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Alltoallv_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallv_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
const int *sendcounts,
|
|
Packit Service |
c5cf8c |
const int *sdispls,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int *recvcounts,
|
|
Packit Service |
c5cf8c |
const int *rdispls,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Alltoallv_inter_auto(sendbuf, sendcounts, sdispls,
|
|
Packit Service |
c5cf8c |
sendtype, recvbuf, recvcounts,
|
|
Packit Service |
c5cf8c |
rdispls, recvtype, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Alltoallw_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
const int sendcounts[],
|
|
Packit Service |
c5cf8c |
const int sdispls[],
|
|
Packit Service |
c5cf8c |
const MPI_Datatype
|
|
Packit Service |
c5cf8c |
sendtypes[],
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int recvcounts[],
|
|
Packit Service |
c5cf8c |
const int rdispls[],
|
|
Packit Service |
c5cf8c |
const MPI_Datatype
|
|
Packit Service |
c5cf8c |
recvtypes[],
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *alltoallw_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_alltoallw(sendbuf, sendcounts, sdispls,
|
|
Packit Service |
c5cf8c |
sendtypes, recvbuf, recvcounts,
|
|
Packit Service |
c5cf8c |
rdispls, recvtypes, comm_ptr, errflag, alltoallw_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Alltoallw_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Alltoallw_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
const int sendcounts[],
|
|
Packit Service |
c5cf8c |
const int sdispls[],
|
|
Packit Service |
c5cf8c |
const MPI_Datatype
|
|
Packit Service |
c5cf8c |
sendtypes[],
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int recvcounts[],
|
|
Packit Service |
c5cf8c |
const int rdispls[],
|
|
Packit Service |
c5cf8c |
const MPI_Datatype
|
|
Packit Service |
c5cf8c |
recvtypes[],
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Alltoallw_inter_auto(sendbuf, sendcounts, sdispls,
|
|
Packit Service |
c5cf8c |
sendtypes, recvbuf, recvcounts,
|
|
Packit Service |
c5cf8c |
rdispls, recvtypes, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allgather_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *allgather_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_allgather(sendbuf, sendcount, sendtype,
|
|
Packit Service |
c5cf8c |
recvbuf, recvcount, recvtype,
|
|
Packit Service |
c5cf8c |
comm_ptr, errflag, allgather_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allgather_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allgather_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Allgather_inter_auto(sendbuf, sendcount, sendtype,
|
|
Packit Service |
c5cf8c |
recvbuf, recvcount, recvtype, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allgatherv_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int *recvcounts,
|
|
Packit Service |
c5cf8c |
const int *displs,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *allgatherv_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_allgatherv(sendbuf, sendcount, sendtype,
|
|
Packit Service |
c5cf8c |
recvbuf, recvcounts, displs,
|
|
Packit Service |
c5cf8c |
recvtype, comm_ptr, errflag, allgatherv_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Allgatherv_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Allgatherv_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int *recvcounts,
|
|
Packit Service |
c5cf8c |
const int *displs,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Allgatherv_inter_auto(sendbuf, sendcount, sendtype,
|
|
Packit Service |
c5cf8c |
recvbuf, recvcounts, displs,
|
|
Packit Service |
c5cf8c |
recvtype, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Gather_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *gather_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_gather(sendbuf, sendcount, sendtype, recvbuf, recvcount,
|
|
Packit Service |
c5cf8c |
recvtype, root, comm, errflag, gather_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Gather_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Gather_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf, int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Gather_inter_auto(sendbuf, sendcount, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcount, recvtype, root, comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Gatherv_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int *recvcounts,
|
|
Packit Service |
c5cf8c |
const int *displs,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *gatherv_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts,
|
|
Packit Service |
c5cf8c |
displs, recvtype, root, comm, errflag, gatherv_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Gatherv_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Gatherv_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int *recvcounts,
|
|
Packit Service |
c5cf8c |
const int *displs,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Gatherv_inter_auto(sendbuf, sendcount, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcounts, displs, recvtype, root, comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Scatter_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *scatter_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount,
|
|
Packit Service |
c5cf8c |
recvtype, root, comm, errflag, scatter_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Scatter_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Scatter_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
int sendcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Scatter_inter_auto(sendbuf, sendcount, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcount, recvtype, root, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Scatterv_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
const int *sendcounts,
|
|
Packit Service |
c5cf8c |
const int *displs,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *scatterv_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcount, recvtype, root, comm, errflag, scatterv_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Scatterv_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Scatterv_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
const int *sendcounts,
|
|
Packit Service |
c5cf8c |
const int *displs,
|
|
Packit Service |
c5cf8c |
MPI_Datatype sendtype,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype recvtype,
|
|
Packit Service |
c5cf8c |
int root, MPIR_Comm * comm,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Scatterv_inter_auto(sendbuf, sendcounts, displs, sendtype, recvbuf,
|
|
Packit Service |
c5cf8c |
recvcount, recvtype, root, comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_scatter_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_inter_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int
|
|
Packit Service |
c5cf8c |
recvcounts[],
|
|
Packit Service |
c5cf8c |
MPI_Datatype
|
|
Packit Service |
c5cf8c |
datatype, MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t *
|
|
Packit Service |
c5cf8c |
errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Reduce_scatter_inter_auto(sendbuf, recvbuf, recvcounts, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_scatter_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
const int
|
|
Packit Service |
c5cf8c |
recvcounts[],
|
|
Packit Service |
c5cf8c |
MPI_Datatype
|
|
Packit Service |
c5cf8c |
datatype, MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t *
|
|
Packit Service |
c5cf8c |
errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *reduce_scatter_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce_scatter(sendbuf, recvbuf, recvcounts, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr, errflag, reduce_scatter_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_scatter_block_inter_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_inter_composition_alpha(const void
|
|
Packit Service |
c5cf8c |
*sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype
|
|
Packit Service |
c5cf8c |
datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm *
|
|
Packit Service |
c5cf8c |
comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t
|
|
Packit Service |
c5cf8c |
* errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container
|
|
Packit Service |
c5cf8c |
ATTRIBUTE((unused)))
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Reduce_scatter_block_inter_auto(sendbuf, recvbuf, recvcount, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Reduce_scatter_block_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_scatter_block_intra_composition_alpha(const void
|
|
Packit Service |
c5cf8c |
*sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int recvcount,
|
|
Packit Service |
c5cf8c |
MPI_Datatype
|
|
Packit Service |
c5cf8c |
datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm *
|
|
Packit Service |
c5cf8c |
comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t
|
|
Packit Service |
c5cf8c |
* errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
*
|
|
Packit Service |
c5cf8c |
ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *reduce_scatter_block_container =
|
|
Packit Service |
c5cf8c |
MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_reduce_scatter_block(sendbuf, recvbuf, recvcount, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr, errflag, reduce_scatter_block_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Scan_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
int rank = comm_ptr->rank;
|
|
Packit Service |
c5cf8c |
MPI_Status status;
|
|
Packit Service |
c5cf8c |
void *tempbuf = NULL;
|
|
Packit Service |
c5cf8c |
void *localfulldata = NULL;
|
|
Packit Service |
c5cf8c |
void *prefulldata = NULL;
|
|
Packit Service |
c5cf8c |
MPI_Aint true_lb = 0;
|
|
Packit Service |
c5cf8c |
MPI_Aint true_extent = 0;
|
|
Packit Service |
c5cf8c |
MPI_Aint extent = 0;
|
|
Packit Service |
c5cf8c |
int noneed = 1; /* noneed=1 means no need to bcast tempbuf and
|
|
Packit Service |
c5cf8c |
* reduce tempbuf & recvbuf */
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_DECL(3);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
const void *scan_node_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
const void *scan_roots_container = MPIDI_coll_get_next_container(scan_node_container);
|
|
Packit Service |
c5cf8c |
const void *bcast_node_container = MPIDI_coll_get_next_container(scan_roots_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_Datatype_get_extent_macro(datatype, extent);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_Ensure_Aint_fits_in_pointer(count * MPL_MAX(extent, true_extent));
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_MALLOC(tempbuf, void *, count * (MPL_MAX(extent, true_extent)),
|
|
Packit Service |
c5cf8c |
mpi_errno, "temporary buffer", MPL_MEM_BUFFER);
|
|
Packit Service |
c5cf8c |
tempbuf = (void *) ((char *) tempbuf - true_lb);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* Create prefulldata and localfulldata on local roots of all nodes */
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_MALLOC(prefulldata, void *, count * (MPL_MAX(extent, true_extent)),
|
|
Packit Service |
c5cf8c |
mpi_errno, "prefulldata for scan", MPL_MEM_BUFFER);
|
|
Packit Service |
c5cf8c |
prefulldata = (void *) ((char *) prefulldata - true_lb);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_MALLOC(localfulldata, void *, count * (MPL_MAX(extent, true_extent)),
|
|
Packit Service |
c5cf8c |
mpi_errno, "localfulldata for scan", MPL_MEM_BUFFER);
|
|
Packit Service |
c5cf8c |
localfulldata = (void *) ((char *) localfulldata - true_lb);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* perform intranode scan to get temporary result in recvbuf. if there is only
|
|
Packit Service |
c5cf8c |
* one process, just copy the raw data. */
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_scan(sendbuf, recvbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr->node_comm, errflag, scan_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_scan(sendbuf, recvbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr->node_comm, errflag, scan_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
} else if (sendbuf != MPI_IN_PLACE) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Localcopy(sendbuf, count, datatype, recvbuf, count, datatype);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
/* get result from local node's last processor which
|
|
Packit Service |
c5cf8c |
* contains the reduce result of the whole node. Name it as
|
|
Packit Service |
c5cf8c |
* localfulldata. For example, localfulldata from node 1 contains
|
|
Packit Service |
c5cf8c |
* reduced data of rank 1,2,3. */
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_roots_comm != NULL && comm_ptr->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIC_Recv(localfulldata, count, datatype,
|
|
Packit Service |
c5cf8c |
comm_ptr->node_comm->local_size - 1, MPIR_SCAN_TAG,
|
|
Packit Service |
c5cf8c |
comm_ptr->node_comm, &status, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
} else if (comm_ptr->node_roots_comm == NULL &&
|
|
Packit Service |
c5cf8c |
comm_ptr->node_comm != NULL &&
|
|
Packit Service |
c5cf8c |
MPIR_Get_intranode_rank(comm_ptr, rank) == comm_ptr->node_comm->local_size - 1) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIC_Send(recvbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
0, MPIR_SCAN_TAG, comm_ptr->node_comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
} else if (comm_ptr->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
localfulldata = recvbuf;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
/* do scan on localfulldata to prefulldata. for example,
|
|
Packit Service |
c5cf8c |
* prefulldata on rank 4 contains reduce result of ranks
|
|
Packit Service |
c5cf8c |
* 1,2,3,4,5,6. it will be sent to rank 7 which is master
|
|
Packit Service |
c5cf8c |
* process of node 3. */
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_roots_comm != NULL) {
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_scan(localfulldata, prefulldata, count, datatype,
|
|
Packit Service |
c5cf8c |
op, comm_ptr->node_roots_comm, errflag, scan_roots_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (MPIR_Get_internode_rank(comm_ptr, rank) != comm_ptr->node_roots_comm->local_size - 1) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIC_Send(prefulldata, count, datatype,
|
|
Packit Service |
c5cf8c |
MPIR_Get_internode_rank(comm_ptr, rank) + 1,
|
|
Packit Service |
c5cf8c |
MPIR_SCAN_TAG, comm_ptr->node_roots_comm, errflag);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
if (MPIR_Get_internode_rank(comm_ptr, rank) != 0) {
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIC_Recv(tempbuf, count, datatype,
|
|
Packit Service |
c5cf8c |
MPIR_Get_internode_rank(comm_ptr, rank) - 1,
|
|
Packit Service |
c5cf8c |
MPIR_SCAN_TAG, comm_ptr->node_roots_comm, &status, errflag);
|
|
Packit Service |
c5cf8c |
noneed = 0;
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* now tempbuf contains all the data needed to get the correct
|
|
Packit Service |
c5cf8c |
* scan result. for example, to node 3, it will have reduce result
|
|
Packit Service |
c5cf8c |
* of rank 1,2,3,4,5,6 in tempbuf.
|
|
Packit Service |
c5cf8c |
* then we should broadcast this result in the local node, and
|
|
Packit Service |
c5cf8c |
* reduce it with recvbuf to get final result if nessesary. */
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(&noneed, 1, MPI_INT, 0, comm_ptr->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if (noneed == 0) {
|
|
Packit Service |
c5cf8c |
if (comm_ptr->node_comm != NULL) {
|
|
Packit Service |
c5cf8c |
#ifndef MPIDI_CH4_DIRECT_NETMOD
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_SHM_mpi_bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#else
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_bcast(tempbuf, count, datatype, 0, comm_ptr->node_comm, errflag,
|
|
Packit Service |
c5cf8c |
bcast_node_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
#endif /* MPIDI_CH4_DIRECT_NETMOD */
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno = MPIR_Reduce_local(tempbuf, recvbuf, count, datatype, op);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
MPIR_CHKLMEM_FREEALL();
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Scan_intra_composition_beta
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_beta(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *scan_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_scan(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag, scan_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#undef FUNCNAME
|
|
Packit Service |
c5cf8c |
#define FUNCNAME MPIDI_Exscan_intra_composition_alpha
|
|
Packit Service |
c5cf8c |
#undef FCNAME
|
|
Packit Service |
c5cf8c |
#define FCNAME MPL_QUOTE(FUNCNAME)
|
|
Packit Service |
c5cf8c |
MPL_STATIC_INLINE_PREFIX int MPIDI_Exscan_intra_composition_alpha(const void *sendbuf,
|
|
Packit Service |
c5cf8c |
void *recvbuf,
|
|
Packit Service |
c5cf8c |
int count,
|
|
Packit Service |
c5cf8c |
MPI_Datatype datatype,
|
|
Packit Service |
c5cf8c |
MPI_Op op,
|
|
Packit Service |
c5cf8c |
MPIR_Comm * comm_ptr,
|
|
Packit Service |
c5cf8c |
MPIR_Errflag_t * errflag,
|
|
Packit Service |
c5cf8c |
const
|
|
Packit Service |
c5cf8c |
MPIDI_coll_algo_container_t
|
|
Packit Service |
c5cf8c |
* ch4_algo_parameters_container)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int mpi_errno = MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
const void *exscan_container = MPIDI_coll_get_next_container(ch4_algo_parameters_container);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
mpi_errno =
|
|
Packit Service |
c5cf8c |
MPIDI_NM_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag,
|
|
Packit Service |
c5cf8c |
exscan_container);
|
|
Packit Service |
c5cf8c |
if (mpi_errno)
|
|
Packit Service |
c5cf8c |
MPIR_ERR_POP(mpi_errno);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
fn_exit:
|
|
Packit Service |
c5cf8c |
return mpi_errno;
|
|
Packit Service |
c5cf8c |
fn_fail:
|
|
Packit Service |
c5cf8c |
goto fn_exit;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#endif /* CH4_COLL_IMPL_H_INCLUDED */
|