-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2018. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* See COPYRIGHT in top-level directory.
*/
-#include "../colls_private.h"
+#include "../colls_private.hpp"
#define MPIR_Allreduce_pt2pt_rd_MV2 Coll_allreduce_rdb::allreduce
#define MPIR_Allreduce_pt2pt_rs_MV2 Coll_allreduce_mvapich2_rs::allreduce
int count,
MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm);
-
-
+
+
namespace simgrid{
namespace smpi{
static int MPIR_Allreduce_reduce_p2p_MV2( void *sendbuf,
return MPI_SUCCESS;
}
-
+
/* general two level allreduce helper function */
int Coll_allreduce_mvapich2_two_level::allreduce(void *sendbuf,
void *recvbuf,
MV2_Allreduce_intra_function = Coll_allreduce_mpich::allreduce;
if(MV2_Allreducection==NULL)
MV2_Allreducection = Coll_allreduce_rdb::allreduce;
-
+
if(comm->get_leaders_comm()==MPI_COMM_NULL){
comm->init_smp();
}
-
+
if (count == 0) {
return MPI_SUCCESS;
}
/* Doing the shared memory gather and reduction by the leader */
if (local_rank == 0) {
- if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) ||
+ if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) ||
(MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_p2p_MV2) ) {
mpi_errno =
MV2_Allreduce_intra_function(sendbuf, recvbuf, count, datatype,
}
} else {
/* insert the first reduce here */
- if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) ||
+ if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) ||
(MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_p2p_MV2) ) {
mpi_errno =
MV2_Allreduce_intra_function(sendbuf, recvbuf, count, datatype,