diff --git a/ompi/mca/osc/base/Makefile.am b/ompi/mca/osc/base/Makefile.am index 1e065f72c95..311fbe0394e 100644 --- a/ompi/mca/osc/base/Makefile.am +++ b/ompi/mca/osc/base/Makefile.am @@ -7,6 +7,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. +# Copyright (c) 2017 IBM Corporation. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -14,6 +15,8 @@ # $HEADER$ # +dist_ompidata_DATA = base/help-mca-osc-base.txt + headers += \ base/base.h \ base/osc_base_obj_convert.h diff --git a/ompi/mca/osc/base/help-mca-osc-base.txt b/ompi/mca/osc/base/help-mca-osc-base.txt new file mode 100644 index 00000000000..abe658fd625 --- /dev/null +++ b/ompi/mca/osc/base/help-mca-osc-base.txt @@ -0,0 +1,18 @@ +# -*- text -*- +# +# Copyright (c) 2017 IBM Corporation. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# This is the US/English help file for Open MPI MCA osc-specific +# error messages. +# +[unsupported-dt] +Unsupported datatype and op combination used in a one-sided operation. + + Datatype : %s + Operation: %s + Rank : %d diff --git a/ompi/mca/osc/base/osc_base_obj_convert.c b/ompi/mca/osc/base/osc_base_obj_convert.c index b90873f6edb..9d3082c08f3 100644 --- a/ompi/mca/osc/base/osc_base_obj_convert.c +++ b/ompi/mca/osc/base/osc_base_obj_convert.c @@ -15,6 +15,7 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Intel, Inc. All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,6 +32,7 @@ #include "opal/datatype/opal_convertor.h" #include "opal/datatype/opal_convertor_internal.h" #include "opal/datatype/opal_datatype_prototypes.h" +#include "opal/util/show_help.h" #include "ompi/op/op.h" #include "ompi/datatype/ompi_datatype.h" @@ -76,6 +78,24 @@ int ompi_osc_base_process_op (void *outbuf, void *inbuf, size_t inbuflen, return OMPI_ERR_NOT_SUPPORTED; } + /* TODO: Remove the following check when support is added. + * See the following issue for the current state: + * https://github.com/open-mpi/ompi/issues/1666 + */ + if(MPI_MINLOC == op || MPI_MAXLOC == op) { + if(MPI_SHORT_INT == datatype || + MPI_DOUBLE_INT == datatype || + MPI_LONG_INT == datatype || + MPI_LONG_DOUBLE_INT == datatype) { + ompi_communicator_t *comm = &ompi_mpi_comm_world.comm; + opal_show_help("help-mca-osc-base.txt", "unsupported-dt", true, + datatype->name, + op->o_name, + comm->c_my_rank); + ompi_mpi_abort(comm, -1); + } + } + if (ompi_datatype_is_predefined(datatype)) { ompi_op_reduce(op, inbuf, outbuf, count, datatype); } else { diff --git a/ompi/mca/osc/rdma/osc_rdma_accumulate.c b/ompi/mca/osc/rdma/osc_rdma_accumulate.c index b12c94aa21d..2d0cf71a9c7 100644 --- a/ompi/mca/osc/rdma/osc_rdma_accumulate.c +++ b/ompi/mca/osc/rdma/osc_rdma_accumulate.c @@ -4,6 +4,7 @@ * reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -14,6 +15,7 @@ #include "osc_rdma_accumulate.h" #include "osc_rdma_request.h" #include "osc_rdma_comm.h" +#include "opal/util/show_help.h" #include "ompi/mca/osc/base/osc_base_obj_convert.h" @@ -1026,6 +1028,46 @@ int ompi_osc_rdma_rget_accumulate_internal (ompi_osc_rdma_sync_t *sync, const vo return OMPI_SUCCESS; } + /* TODO: Remove the following check when support is added. + * See the following issue for the current state: + * https://github.com/open-mpi/ompi/issues/1666 + */ + if(MPI_MINLOC == op || MPI_MAXLOC == op) { + if(MPI_SHORT_INT == origin_datatype || + MPI_DOUBLE_INT == origin_datatype || + MPI_LONG_INT == origin_datatype || + MPI_LONG_DOUBLE_INT == origin_datatype) { + ompi_communicator_t *comm = &ompi_mpi_comm_world.comm; + opal_show_help("help-mca-osc-base.txt", "unsupported-dt", true, + origin_datatype->name, + op->o_name, + comm->c_my_rank); + ompi_mpi_abort(comm, -1); + } + if(MPI_SHORT_INT == result_datatype || + MPI_DOUBLE_INT == result_datatype || + MPI_LONG_INT == result_datatype || + MPI_LONG_DOUBLE_INT == result_datatype) { + ompi_communicator_t *comm = &ompi_mpi_comm_world.comm; + opal_show_help("help-mca-osc-base.txt", "unsupported-dt", true, + result_datatype->name, + op->o_name, + comm->c_my_rank); + ompi_mpi_abort(comm, -1); + } + if(MPI_SHORT_INT == target_datatype || + MPI_DOUBLE_INT == target_datatype || + MPI_LONG_INT == target_datatype || + MPI_LONG_DOUBLE_INT == target_datatype) { + ompi_communicator_t *comm = &ompi_mpi_comm_world.comm; + opal_show_help("help-mca-osc-base.txt", "unsupported-dt", true, + target_datatype->name, + op->o_name, + comm->c_my_rank); + ompi_mpi_abort(comm, -1); + } + } + (void) ompi_datatype_get_extent (origin_datatype, &lb, &extent); ret = osc_rdma_get_remote_segment (module, peer, target_disp, extent * target_count, &target_address, &target_handle);