diff --git a/ompi/mca/coll/base/coll_base_allgather.c b/ompi/mca/coll/base/coll_base_allgather.c index d789edd89a..311456399b 100644 --- a/ompi/mca/coll/base/coll_base_allgather.c +++ b/ompi/mca/coll/base/coll_base_allgather.c @@ -12,7 +12,7 @@ * Copyright (c) 2009 University of Houston. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All Rights * reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science + * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -623,6 +623,10 @@ int ompi_coll_base_allgather_intra_two_procs(const void *sbuf, int scount, OPAL_OUTPUT((ompi_coll_base_framework.framework_output, "ompi_coll_base_allgather_intra_two_procs rank %d", rank)); + if (2 != ompi_comm_size(comm)) { + return MPI_ERR_UNSUPPORTED_OPERATION; + } + err = ompi_datatype_get_extent (sdtype, &lb, &sext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } diff --git a/ompi/mca/coll/base/coll_base_allgatherv.c b/ompi/mca/coll/base/coll_base_allgatherv.c index 9b5cff2cbe..06719624ef 100644 --- a/ompi/mca/coll/base/coll_base_allgatherv.c +++ b/ompi/mca/coll/base/coll_base_allgatherv.c @@ -13,7 +13,7 @@ * Copyright (c) 2009 University of Houston. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All Rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -526,6 +526,10 @@ int ompi_coll_base_allgatherv_intra_two_procs(const void *sbuf, int scount, OPAL_OUTPUT((ompi_coll_base_framework.framework_output, "ompi_coll_base_allgatherv_intra_two_procs rank %d", rank)); + if (2 != ompi_comm_size(comm)) { + return MPI_ERR_UNSUPPORTED_OPERATION; + } + err = ompi_datatype_get_extent (sdtype, &lb, &sext); if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; } diff --git a/ompi/mca/coll/base/coll_base_alltoall.c b/ompi/mca/coll/base/coll_base_alltoall.c index b4614094ec..c023972a01 100644 --- a/ompi/mca/coll/base/coll_base_alltoall.c +++ b/ompi/mca/coll/base/coll_base_alltoall.c @@ -12,7 +12,7 @@ * All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All Rights * reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science + * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -500,6 +500,10 @@ int ompi_coll_base_alltoall_intra_two_procs(const void *sbuf, int scount, OPAL_OUTPUT((ompi_coll_base_framework.framework_output, "ompi_coll_base_alltoall_intra_two_procs rank %d", rank)); + if (2 != ompi_comm_size(comm)) { + return MPI_ERR_UNSUPPORTED_OPERATION; + } + err = ompi_datatype_get_extent (sdtype, &lb, &sext); if (err != MPI_SUCCESS) { line = __LINE__; goto err_hndl; } diff --git a/ompi/mca/coll/base/coll_base_barrier.c b/ompi/mca/coll/base/coll_base_barrier.c index 11bbf8378d..53e7817abe 100644 --- a/ompi/mca/coll/base/coll_base_barrier.c +++ b/ompi/mca/coll/base/coll_base_barrier.c @@ -13,7 +13,7 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All Rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -303,6 +303,11 @@ int ompi_coll_base_barrier_intra_two_procs(struct ompi_communicator_t *comm, remote = ompi_comm_rank(comm); OPAL_OUTPUT((ompi_coll_base_framework.framework_output, "ompi_coll_base_barrier_intra_two_procs rank %d", remote)); + + if (2 != ompi_comm_size(comm)) { + return MPI_ERR_UNSUPPORTED_OPERATION; + } + remote = (remote + 1) & 0x1; err = ompi_coll_base_sendrecv_zero(remote, MCA_COLL_BASE_TAG_BARRIER,