X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/488dda0c43d26f0a770e1d5b47f73148e153949b..a521b79fb5f8fc07b3f9102cec6de074186fe5c1:/src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp diff --git a/src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp b/src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp index 8a89d286ab..23d02679b4 100644 --- a/src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp +++ b/src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. +/* Copyright (c) 2013-2020. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -37,8 +37,8 @@ #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 +#define MPIR_Allreduce_pt2pt_rd_MV2 allreduce__rdb +#define MPIR_Allreduce_pt2pt_rs_MV2 allreduce__mvapich2_rs extern int (*MV2_Allreducection)(const void *sendbuf, void *recvbuf, @@ -62,7 +62,7 @@ static int MPIR_Allreduce_reduce_p2p_MV2(const void *sendbuf, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { - Colls::reduce(sendbuf,recvbuf,count,datatype,op,0,comm); + colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm); return MPI_SUCCESS; } @@ -72,13 +72,13 @@ static int MPIR_Allreduce_reduce_shmem_MV2(const void *sendbuf, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { - Colls::reduce(sendbuf,recvbuf,count,datatype,op,0,comm); + colls::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm); return MPI_SUCCESS; } /* general two level allreduce helper function */ -int Coll_allreduce_mvapich2_two_level::allreduce(const void *sendbuf, +int allreduce__mvapich2_two_level(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, @@ -92,9 +92,9 @@ int Coll_allreduce_mvapich2_two_level::allreduce(const void *sendbuf, //if not set (use of the algo directly, without mvapich2 selector) if(MV2_Allreduce_intra_function==NULL) - MV2_Allreduce_intra_function = Coll_allreduce_mpich::allreduce; + MV2_Allreduce_intra_function = allreduce__mpich; if(MV2_Allreducection==NULL) - MV2_Allreducection = Coll_allreduce_rdb::allreduce; + MV2_Allreducection = allreduce__rdb; if(comm->get_leaders_comm()==MPI_COMM_NULL){ comm->init_smp(); @@ -135,7 +135,7 @@ int Coll_allreduce_mvapich2_two_level::allreduce(const void *sendbuf, } if (local_size != total_size) { - void* sendtmpbuf = (char *)smpi_get_tmp_sendbuffer(count*datatype->get_extent()); + unsigned char* sendtmpbuf = smpi_get_tmp_sendbuffer(count * datatype->get_extent()); Datatype::copy(recvbuf, count, datatype,sendtmpbuf, count, datatype); /* inter-node allreduce */ if(MV2_Allreducection == &MPIR_Allreduce_pt2pt_rd_MV2){ @@ -164,9 +164,9 @@ int Coll_allreduce_mvapich2_two_level::allreduce(const void *sendbuf, } } - /* Broadcasting the mesage from leader to the rest */ + /* Broadcasting the message from leader to the rest */ /* Note: shared memory broadcast could improve the performance */ - mpi_errno = Colls::bcast(recvbuf, count, datatype, 0, shmem_comm); + mpi_errno = colls::bcast(recvbuf, count, datatype, 0, shmem_comm); return (mpi_errno);