Skip to content

Commit 8038522

Browse files
committed
osc/base: Consolidate error messages for unsupported dt
Signed-off-by: Joshua Hursey <[email protected]>
1 parent c03116e commit 8038522

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

ompi/mca/osc/base/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
# University of Stuttgart. All rights reserved.
88
# Copyright (c) 2004-2005 The Regents of the University of California.
99
# All rights reserved.
10+
# Copyright (c) 2017 IBM Corporation. All rights reserved.
1011
# $COPYRIGHT$
1112
#
1213
# Additional copyrights may follow
1314
#
1415
# $HEADER$
1516
#
1617

18+
dist_ompidata_DATA = base/help-mca-osc-base.txt
19+
1720
headers += \
1821
base/base.h \
1922
base/osc_base_obj_convert.h
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# -*- text -*-
2+
#
3+
# Copyright (c) 2017 IBM Corporation. All rights reserved.
4+
# $COPYRIGHT$
5+
#
6+
# Additional copyrights may follow
7+
#
8+
# $HEADER$
9+
#
10+
# This is the US/English help file for Open MPI MCA osc-specific
11+
# error messages.
12+
#
13+
[unsupported-dt]
14+
Unsupported datatype and op combination used in a one-sided operation.
15+
16+
Datatype : %s
17+
Operation: %s
18+
Rank : %d

ompi/mca/osc/base/osc_base_obj_convert.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,20 @@ int ompi_osc_base_process_op (void *outbuf, void *inbuf, size_t inbuflen,
7878
return OMPI_ERR_NOT_SUPPORTED;
7979
}
8080

81-
/* TODO: Remove the following check when ompi adds support */
81+
/* TODO: Remove the following check when support is added.
82+
* See the following issue for the current state:
83+
* https://github.com/open-mpi/ompi/issues/1666
84+
*/
8285
if(MPI_MINLOC == op || MPI_MAXLOC == op) {
8386
if(MPI_SHORT_INT == datatype ||
8487
MPI_DOUBLE_INT == datatype ||
8588
MPI_LONG_INT == datatype ||
8689
MPI_LONG_DOUBLE_INT == datatype) {
8790
ompi_communicator_t *comm = &ompi_mpi_comm_world.comm;
88-
opal_output(0, "Error: %s datatype is currently "
89-
"unsupported for MPI_MINLOC/MPI_MAXLOC "
90-
"operation\n", datatype->name);
91-
opal_show_help("help-mpi-api.txt", "mpi-abort", true,
92-
comm->c_my_rank,
93-
('\0' != comm->c_name[0]) ? comm->c_name : "<Unknown>",
94-
-1);
95-
91+
opal_show_help("help-mca-osc-base.txt", "unsupported-dt", true,
92+
datatype->name,
93+
op->o_name,
94+
comm->c_my_rank);
9695
ompi_mpi_abort(comm, -1);
9796
}
9897
}

0 commit comments

Comments
 (0)