From 2e66590993279fe1bb28baae9d5067e8aa20a032 Mon Sep 17 00:00:00 2001 From: Andrew Friedley Date: Thu, 4 Oct 2007 16:29:24 +0000 Subject: [PATCH] Fix mistakes in the basic component.. can't call collectives on the communicator and always pass the basic module.. have to give them the module off the communicator. This commit was SVN r16329. --- ompi/mca/coll/basic/coll_basic_allgather.c | 4 ++-- ompi/mca/coll/basic/coll_basic_allgatherv.c | 10 ++++++---- ompi/mca/coll/basic/coll_basic_allreduce.c | 8 ++++---- ompi/mca/coll/basic/coll_basic_barrier.c | 2 +- ompi/mca/coll/basic/coll_basic_reduce_scatter.c | 4 ++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ompi/mca/coll/basic/coll_basic_allgather.c b/ompi/mca/coll/basic/coll_basic_allgather.c index 1fa16d8de6..59da3f0c5c 100644 --- a/ompi/mca/coll/basic/coll_basic_allgather.c +++ b/ompi/mca/coll/basic/coll_basic_allgather.c @@ -62,10 +62,10 @@ mca_coll_basic_allgather_intra(void *sbuf, int scount, /* Gather and broadcast. */ err = comm->c_coll.coll_gather(sbuf, scount, sdtype, rbuf, rcount, - rdtype, 0, comm, module); + rdtype, 0, comm, comm->c_coll.coll_gather_module); if (MPI_SUCCESS == err) { err = comm->c_coll.coll_bcast(rbuf, rcount * ompi_comm_size(comm), - rdtype, 0, comm, module); + rdtype, 0, comm, comm->c_coll.coll_bcast_module); } /* All done */ diff --git a/ompi/mca/coll/basic/coll_basic_allgatherv.c b/ompi/mca/coll/basic/coll_basic_allgatherv.c index af7a206d19..d1d7bf9850 100644 --- a/ompi/mca/coll/basic/coll_basic_allgatherv.c +++ b/ompi/mca/coll/basic/coll_basic_allgatherv.c @@ -71,8 +71,8 @@ mca_coll_basic_allgatherv_intra(void *sbuf, int scount, err = comm->c_coll.coll_gatherv(send_buf, rcounts[rank], send_type,rbuf, rcounts, disps, rdtype, 0, - comm, module); - + comm, comm->c_coll.coll_gatherv_module); + if (MPI_SUCCESS != err) { return err; } @@ -99,7 +99,8 @@ mca_coll_basic_allgatherv_intra(void *sbuf, int scount, return err; } - comm->c_coll.coll_bcast( rbuf, 1 ,newtype,0,comm, module); + comm->c_coll.coll_bcast( rbuf, 1 ,newtype,0,comm, + comm->c_coll.coll_bcast_module); ompi_ddt_destroy (&newtype); @@ -141,7 +142,8 @@ mca_coll_basic_allgatherv_inter(void *sbuf, int scount, } err = comm->c_coll.coll_alltoallv(sbuf, scounts, sdisps, sdtype, - rbuf, rcounts, disps, rdtype, comm, module); + rbuf, rcounts, disps, rdtype, comm, + comm->c_coll.coll_alltoallv_module); if (NULL != sdisps) { free(sdisps); diff --git a/ompi/mca/coll/basic/coll_basic_allreduce.c b/ompi/mca/coll/basic/coll_basic_allreduce.c index 761f940c5c..a017641dd7 100644 --- a/ompi/mca/coll/basic/coll_basic_allreduce.c +++ b/ompi/mca/coll/basic/coll_basic_allreduce.c @@ -49,18 +49,18 @@ mca_coll_basic_allreduce_intra(void *sbuf, void *rbuf, int count, if (MPI_IN_PLACE == sbuf) { if (0 == ompi_comm_rank(comm)) { - err = comm->c_coll.coll_reduce(MPI_IN_PLACE, rbuf, count, dtype, op, 0, comm, module); + err = comm->c_coll.coll_reduce(MPI_IN_PLACE, rbuf, count, dtype, op, 0, comm, comm->c_coll.coll_reduce_module); } else { - err = comm->c_coll.coll_reduce(rbuf, NULL, count, dtype, op, 0, comm, module); + err = comm->c_coll.coll_reduce(rbuf, NULL, count, dtype, op, 0, comm, comm->c_coll.coll_reduce_module); } } else { - err = comm->c_coll.coll_reduce(sbuf, rbuf, count, dtype, op, 0, comm, module); + err = comm->c_coll.coll_reduce(sbuf, rbuf, count, dtype, op, 0, comm, comm->c_coll.coll_reduce_module); } if (MPI_SUCCESS != err) { return err; } - return comm->c_coll.coll_bcast(rbuf, count, dtype, 0, comm, module); + return comm->c_coll.coll_bcast(rbuf, count, dtype, 0, comm, comm->c_coll.coll_bcast_module); } diff --git a/ompi/mca/coll/basic/coll_basic_barrier.c b/ompi/mca/coll/basic/coll_basic_barrier.c index e1b7c5cfb1..757524d72b 100644 --- a/ompi/mca/coll/basic/coll_basic_barrier.c +++ b/ompi/mca/coll/basic/coll_basic_barrier.c @@ -189,5 +189,5 @@ mca_coll_basic_barrier_inter_lin(struct ompi_communicator_t *comm, rank = ompi_comm_rank(comm); return comm->c_coll.coll_allreduce(&rank, &result, 1, MPI_INT, MPI_MAX, - comm, module); + comm, comm->c_coll.coll_allreduce_module); } diff --git a/ompi/mca/coll/basic/coll_basic_reduce_scatter.c b/ompi/mca/coll/basic/coll_basic_reduce_scatter.c index bb42cf9460..b0105de560 100644 --- a/ompi/mca/coll/basic/coll_basic_reduce_scatter.c +++ b/ompi/mca/coll/basic/coll_basic_reduce_scatter.c @@ -325,13 +325,13 @@ mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts, /* reduction */ err = comm->c_coll.coll_reduce(sbuf, recv_buf, count, dtype, op, 0, - comm, module); + comm, comm->c_coll.coll_reduce_module); /* scatter */ if (MPI_SUCCESS == err) { err = comm->c_coll.coll_scatterv(recv_buf, rcounts, disps, dtype, rbuf, rcounts[rank], dtype, 0, - comm, module); + comm, comm->c_coll.coll_scatterv_module); } }