X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7f04fa5306f52960db709bb520c49e9f4ecec000..954676b700e711f38ec4d286d33d5427d3f4ca46:/src/smpi/colls/bcast-binomial-tree.c diff --git a/src/smpi/colls/bcast-binomial-tree.c b/src/smpi/colls/bcast-binomial-tree.c index 284f2c4efd..955a814827 100644 --- a/src/smpi/colls/bcast-binomial-tree.c +++ b/src/smpi/colls/bcast-binomial-tree.c @@ -1,4 +1,10 @@ -#include "colls.h" +/* Copyright (c) 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#include "colls_private.h" /***************************************************************************** @@ -68,10 +74,10 @@ smpi_coll_tuned_bcast_binomial_tree(void *buff, int count, MPI_Comm comm) { int src, dst, rank, num_procs, mask, relative_rank; - int tag = 1; + int tag = COLL_TAG_BCAST; - MPI_Comm_rank(comm, &rank); - MPI_Comm_size(comm, &num_procs); + rank = smpi_comm_rank(comm); + num_procs = smpi_comm_size(comm); relative_rank = (rank >= root) ? rank - root : rank - root + num_procs; @@ -81,7 +87,7 @@ smpi_coll_tuned_bcast_binomial_tree(void *buff, int count, src = rank - mask; if (src < 0) src += num_procs; - MPI_Recv(buff, count, data_type, src, tag, comm, MPI_STATUS_IGNORE); + smpi_mpi_recv(buff, count, data_type, src, tag, comm, MPI_STATUS_IGNORE); break; } mask <<= 1; @@ -93,7 +99,7 @@ smpi_coll_tuned_bcast_binomial_tree(void *buff, int count, dst = rank + mask; if (dst >= num_procs) dst -= num_procs; - MPI_Send(buff, count, data_type, dst, tag, comm); + smpi_mpi_send(buff, count, data_type, dst, tag, comm); } mask >>= 1; }