Index: ompi/mca/coll/tuned/coll_tuned_allgatherv.c =================================================================== --- ompi/mca/coll/tuned/coll_tuned_allgatherv.c (revision 27511) +++ ompi/mca/coll/tuned/coll_tuned_allgatherv.c (working copy) @@ -104,8 +104,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:allgather_intra_bruck rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -230,8 +232,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:allgatherv_intra_ring rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -373,8 +377,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:allgatherv_intra_neighborexchange rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -507,8 +513,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "ompi_coll_tuned_allgatherv_intra_two_procs rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &lb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &lb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &lb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } Index: ompi/mca/coll/tuned/coll_tuned_allgather.c =================================================================== --- ompi/mca/coll/tuned/coll_tuned_allgather.c (revision 27511) +++ ompi/mca/coll/tuned/coll_tuned_allgather.c (working copy) @@ -96,8 +96,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:allgather_intra_bruck rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -288,8 +290,10 @@ "coll:tuned:allgather_intra_recursivedoubling rank %d, size %d", rank, size)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -376,8 +380,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:allgather_intra_ring rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -514,8 +520,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "coll:tuned:allgather_intra_neighborexchange rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &slb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &slb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &rlb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } @@ -619,8 +627,10 @@ OPAL_OUTPUT((ompi_coll_tuned_stream, "ompi_coll_tuned_allgather_intra_two_procs rank %d", rank)); - err = ompi_datatype_get_extent (sdtype, &lb, &sext); - if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + if (MPI_IN_PLACE != sbuf) { + err = ompi_datatype_get_extent (sdtype, &lb, &sext); + if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } + } err = ompi_datatype_get_extent (rdtype, &lb, &rext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } Index: ompi/mca/coll/tuned/coll_tuned_scatter.c =================================================================== --- ompi/mca/coll/tuned/coll_tuned_scatter.c (revision 27511) +++ ompi/mca/coll/tuned/coll_tuned_scatter.c (working copy) @@ -60,8 +60,15 @@ ompi_datatype_get_extent(sdtype, &slb, &sextent); ompi_datatype_get_true_extent(sdtype, &strue_lb, &strue_extent); - ompi_datatype_get_extent(rdtype, &rlb, &rextent); - ompi_datatype_get_true_extent(rdtype, &rtrue_lb, &rtrue_extent); + if (rank == root) { + if (rbuf != MPI_IN_PLACE) { + ompi_datatype_get_extent(rdtype, &rlb, &rextent); + ompi_datatype_get_true_extent(rdtype, &rtrue_lb, &rtrue_extent); + } + } else { + ompi_datatype_get_extent(rdtype, &rlb, &rextent); + ompi_datatype_get_true_extent(rdtype, &rtrue_lb, &rtrue_extent); + } vrank = (rank - root + size) % size; ptmp = (char *) rbuf; /* by default suppose leaf nodes, just use rbuf */ Index: ompi/mca/coll/tuned/coll_tuned_gather.c =================================================================== --- ompi/mca/coll/tuned/coll_tuned_gather.c (revision 27511) +++ ompi/mca/coll/tuned/coll_tuned_gather.c (working copy) @@ -60,8 +60,15 @@ COLL_TUNED_UPDATE_IN_ORDER_BMTREE( comm, tuned_module, root ); bmtree = data->cached_in_order_bmtree; - ompi_datatype_get_extent(sdtype, &slb, &sextent); - ompi_datatype_get_true_extent(sdtype, &strue_lb, &strue_extent); + if (rank == root) { + if (MPI_IN_PLACE != sbuf) { + ompi_datatype_get_extent(sdtype, &slb, &sextent); + ompi_datatype_get_true_extent(sdtype, &strue_lb, &strue_extent); + } + } else { + ompi_datatype_get_extent(sdtype, &slb, &sextent); + ompi_datatype_get_true_extent(sdtype, &strue_lb, &strue_extent); + } vrank = (rank - root + size) % size; Index: ompi/mca/coll/tuned/coll_tuned_decision_fixed.c =================================================================== --- ompi/mca/coll/tuned/coll_tuned_decision_fixed.c (revision 27511) +++ ompi/mca/coll/tuned/coll_tuned_decision_fixed.c (working copy) @@ -534,8 +534,13 @@ } /* Determine complete data size */ - ompi_datatype_type_size(sdtype, &dsize); - total_dsize = dsize * (ptrdiff_t)scount * (ptrdiff_t)communicator_size; + if (MPI_IN_PLACE != sbuf) { + ompi_datatype_type_size(sdtype, &dsize); + total_dsize = dsize * (ptrdiff_t)scount * (ptrdiff_t)communicator_size; + } else { + ompi_datatype_type_size(rdtype, &dsize); + total_dsize = dsize * (ptrdiff_t)rcount * (ptrdiff_t)communicator_size; + } OPAL_OUTPUT((ompi_coll_tuned_stream, "ompi_coll_tuned_allgather_intra_dec_fixed" " rank %d com_size %d msg_length %lu", @@ -629,7 +634,11 @@ } /* Determine complete data size */ - ompi_datatype_type_size(sdtype, &dsize); + if (MPI_IN_PLACE != sbuf) { + ompi_datatype_type_size(sdtype, &dsize); + } else { + ompi_datatype_type_size(rdtype, &dsize); + } total_dsize = 0; for (i = 0; i < communicator_size; i++) { total_dsize += dsize * (ptrdiff_t)rcounts[i];