1
1

Merge pull request #2832 from jjhursey/topic/ibm/osc-base-dt-abort

osc/base: Detect unsupported data types and abort
Этот коммит содержится в:
Geoff Paulsen 2017-02-05 04:26:04 -06:00 коммит произвёл GitHub
родитель f4ad119693 94f92f6b49
Коммит 4917e44a7d

Просмотреть файл

@ -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,25 @@ int ompi_osc_base_process_op (void *outbuf, void *inbuf, size_t inbuflen,
return OMPI_ERR_NOT_SUPPORTED;
}
/* TODO: Remove the following check when ompi adds support */
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_output(0, "Error: %s datatype is currently "
"unsupported for MPI_MINLOC/MPI_MAXLOC "
"operation\n", datatype->name);
opal_show_help("help-mpi-api.txt", "mpi-abort", true,
comm->c_my_rank,
('\0' != comm->c_name[0]) ? comm->c_name : "<Unknown>",
-1);
ompi_mpi_abort(comm, -1);
}
}
if (ompi_datatype_is_predefined(datatype)) {
ompi_op_reduce(op, inbuf, outbuf, count, datatype);
} else {