X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0f5e8daaa6e9f74521068aa75837200bcd182ea6..dd6fd136b15943c1bd211920383aa4e15d1eefec:/src/smpi/smpi_coll.c diff --git a/src/smpi/smpi_coll.c b/src/smpi/smpi_coll.c index b3c9b3ae27..a12de9c56e 100644 --- a/src/smpi/smpi_coll.c +++ b/src/smpi/smpi_coll.c @@ -11,7 +11,6 @@ #include #include "private.h" -#include "smpi_coll_private.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_coll, smpi, "Logging specific to SMPI (coll)"); @@ -100,20 +99,20 @@ static void tree_bcast(void *buf, int count, MPI_Datatype datatype, rank = smpi_comm_rank(comm); /* wait for data from my parent in the tree */ if (!tree->isRoot) { - DEBUG3("<%d> tree_bcast(): i am not root: recv from %d, tag=%d)", + XBT_DEBUG("<%d> tree_bcast(): i am not root: recv from %d, tag=%d)", rank, tree->parent, system_tag + rank); smpi_mpi_recv(buf, count, datatype, tree->parent, system_tag + rank, comm, MPI_STATUS_IGNORE); } requests = xbt_new(MPI_Request, tree->numChildren); - DEBUG2("<%d> creates %d requests (1 per child)", rank, + XBT_DEBUG("<%d> creates %d requests (1 per child)", rank, tree->numChildren); /* iniates sends to ranks lower in the tree */ for (i = 0; i < tree->numChildren; i++) { if (tree->child[i] == -1) { requests[i] = MPI_REQUEST_NULL; } else { - DEBUG3("<%d> send to <%d>, tag=%d", rank, tree->child[i], + XBT_DEBUG("<%d> send to <%d>, tag=%d", rank, tree->child[i], system_tag + tree->child[i]); requests[i] = smpi_isend_init(buf, count, datatype, tree->child[i], @@ -138,20 +137,20 @@ static void tree_antibcast(void *buf, int count, MPI_Datatype datatype, rank = smpi_comm_rank(comm); // everyone sends to its parent, except root. if (!tree->isRoot) { - DEBUG3("<%d> tree_antibcast(): i am not root: send to %d, tag=%d)", + XBT_DEBUG("<%d> tree_antibcast(): i am not root: send to %d, tag=%d)", rank, tree->parent, system_tag + rank); smpi_mpi_send(buf, count, datatype, tree->parent, system_tag + rank, comm); } //every one receives as many messages as it has children requests = xbt_new(MPI_Request, tree->numChildren); - DEBUG2("<%d> creates %d requests (1 per child)", rank, + XBT_DEBUG("<%d> creates %d requests (1 per child)", rank, tree->numChildren); for (i = 0; i < tree->numChildren; i++) { if (tree->child[i] == -1) { requests[i] = MPI_REQUEST_NULL; } else { - DEBUG3("<%d> recv from <%d>, tag=%d", rank, tree->child[i], + XBT_DEBUG("<%d> recv from <%d>, tag=%d", rank, tree->child[i], system_tag + tree->child[i]); requests[i] = smpi_irecv_init(buf, count, datatype, tree->child[i], @@ -216,7 +215,7 @@ int smpi_coll_tuned_alltoall_bruck(void *sendbuf, int sendcount, // FIXME: check implementation rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); - DEBUG1("<%d> algorithm alltoall_bruck() called.", rank); + XBT_DEBUG("<%d> algorithm alltoall_bruck() called.", rank); err = smpi_datatype_extent(sendtype, &lb, &sendextent); err = smpi_datatype_extent(recvtype, &lb, &recvextent); /* Local copy from self */ @@ -231,7 +230,7 @@ int smpi_coll_tuned_alltoall_bruck(void *sendbuf, int sendcount, /* Create all receives that will be posted first */ for (i = 0; i < size; ++i) { if (i == rank) { - DEBUG3("<%d> skip request creation [src = %d, recvcount = %d]", + XBT_DEBUG("<%d> skip request creation [src = %d, recvcount = %d]", rank, i, recvcount); continue; } @@ -243,7 +242,7 @@ int smpi_coll_tuned_alltoall_bruck(void *sendbuf, int sendcount, /* Now create all sends */ for (i = 0; i < size; ++i) { if (i == rank) { - DEBUG3("<%d> skip request creation [dst = %d, sendcount = %d]", + XBT_DEBUG("<%d> skip request creation [dst = %d, sendcount = %d]", rank, i, sendcount); continue; } @@ -254,7 +253,7 @@ int smpi_coll_tuned_alltoall_bruck(void *sendbuf, int sendcount, } /* Wait for them all. */ smpi_mpi_startall(count, requests); - DEBUG2("<%d> wait for %d requests", rank, count); + XBT_DEBUG("<%d> wait for %d requests", rank, count); smpi_mpi_waitall(count, requests, MPI_STATUS_IGNORE); xbt_free(requests); } @@ -280,7 +279,7 @@ int smpi_coll_tuned_alltoall_basic_linear(void *sendbuf, int sendcount, /* Initialize. */ rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); - DEBUG1("<%d> algorithm alltoall_basic_linear() called.", rank); + XBT_DEBUG("<%d> algorithm alltoall_basic_linear() called.", rank); err = smpi_datatype_extent(sendtype, &lb, &sendinc); err = smpi_datatype_extent(recvtype, &lb, &recvinc); sendinc *= sendcount; @@ -315,7 +314,7 @@ int smpi_coll_tuned_alltoall_basic_linear(void *sendbuf, int sendcount, } /* Wait for them all. */ smpi_mpi_startall(count, requests); - DEBUG2("<%d> wait for %d requests", rank, count); + XBT_DEBUG("<%d> wait for %d requests", rank, count); smpi_mpi_waitall(count, requests, MPI_STATUS_IGNORE); xbt_free(requests); } @@ -342,7 +341,7 @@ int smpi_coll_tuned_alltoall_pairwise(void *sendbuf, int sendcount, rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); - DEBUG1("<%d> algorithm alltoall_pairwise() called.", rank); + XBT_DEBUG("<%d> algorithm alltoall_pairwise() called.", rank); sendsize = smpi_datatype_size(sendtype); recvsize = smpi_datatype_size(recvtype); /* Perform pairwise exchange - starting from 1 so the local copy is last */ @@ -376,7 +375,7 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, /* Initialize. */ rank = smpi_comm_rank(comm); size = smpi_comm_size(comm); - DEBUG1("<%d> algorithm basic_alltoallv() called.", rank); + XBT_DEBUG("<%d> algorithm basic_alltoallv() called.", rank); err = smpi_datatype_extent(sendtype, &lb, &sendextent); err = smpi_datatype_extent(recvtype, &lb, &recvextent); /* Local copy from self */ @@ -392,7 +391,7 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, /* Create all receives that will be posted first */ for (i = 0; i < size; ++i) { if (i == rank || recvcounts[i] == 0) { - DEBUG3 + XBT_DEBUG ("<%d> skip request creation [src = %d, recvcounts[src] = %d]", rank, i, recvcounts[i]); continue; @@ -405,7 +404,7 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, /* Now create all sends */ for (i = 0; i < size; ++i) { if (i == rank || sendcounts[i] == 0) { - DEBUG3 + XBT_DEBUG ("<%d> skip request creation [dst = %d, sendcounts[dst] = %d]", rank, i, sendcounts[i]); continue; @@ -417,7 +416,7 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, } /* Wait for them all. */ smpi_mpi_startall(count, requests); - DEBUG2("<%d> wait for %d requests", rank, count); + XBT_DEBUG("<%d> wait for %d requests", rank, count); smpi_mpi_waitall(count, requests, MPI_STATUS_IGNORE); xbt_free(requests); }