Skip to content

Fix unimplemented op functions for MPI_LONG. #8780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions ompi/mca/op/base/op_base_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ FUNC_FUNC(max, int32_t, int32_t)
FUNC_FUNC(max, uint32_t, uint32_t)
FUNC_FUNC(max, int64_t, int64_t)
FUNC_FUNC(max, uint64_t, uint64_t)
FUNC_FUNC(max, long, long)
FUNC_FUNC(max, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC(max, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -224,6 +227,9 @@ FUNC_FUNC(min, int32_t, int32_t)
FUNC_FUNC(min, uint32_t, uint32_t)
FUNC_FUNC(min, int64_t, int64_t)
FUNC_FUNC(min, uint64_t, uint64_t)
FUNC_FUNC(min, long, long)
FUNC_FUNC(min, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC(min, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -284,6 +290,9 @@ OP_FUNC(sum, int32_t, int32_t, +=)
OP_FUNC(sum, uint32_t, uint32_t, +=)
OP_FUNC(sum, int64_t, int64_t, +=)
OP_FUNC(sum, uint64_t, uint64_t, +=)
OP_FUNC(sum, long, long, +=)
OP_FUNC(sum, unsigned_long, long, +=)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
OP_FUNC(sum, fortran_integer, ompi_fortran_integer_t, +=)
Expand Down Expand Up @@ -353,6 +362,9 @@ OP_FUNC(prod, int32_t, int32_t, *=)
OP_FUNC(prod, uint32_t, uint32_t, *=)
OP_FUNC(prod, int64_t, int64_t, *=)
OP_FUNC(prod, uint64_t, uint64_t, *=)
OP_FUNC(prod, long, long, *=)
OP_FUNC(prod, unsigned_long, long, *=)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
OP_FUNC(prod, fortran_integer, ompi_fortran_integer_t, *=)
Expand Down Expand Up @@ -424,6 +436,9 @@ FUNC_FUNC(land, int32_t, int32_t)
FUNC_FUNC(land, uint32_t, uint32_t)
FUNC_FUNC(land, int64_t, int64_t)
FUNC_FUNC(land, uint64_t, uint64_t)
FUNC_FUNC(land, long, long)
FUNC_FUNC(land, unsigned_long, long)

/* Logical */
#if OMPI_HAVE_FORTRAN_LOGICAL
FUNC_FUNC(land, fortran_logical, ompi_fortran_logical_t)
Expand All @@ -446,6 +461,9 @@ FUNC_FUNC(lor, int32_t, int32_t)
FUNC_FUNC(lor, uint32_t, uint32_t)
FUNC_FUNC(lor, int64_t, int64_t)
FUNC_FUNC(lor, uint64_t, uint64_t)
FUNC_FUNC(lor, long, long)
FUNC_FUNC(lor, unsigned_long, long)

/* Logical */
#if OMPI_HAVE_FORTRAN_LOGICAL
FUNC_FUNC(lor, fortran_logical, ompi_fortran_logical_t)
Expand All @@ -468,6 +486,10 @@ FUNC_FUNC(lxor, int32_t, int32_t)
FUNC_FUNC(lxor, uint32_t, uint32_t)
FUNC_FUNC(lxor, int64_t, int64_t)
FUNC_FUNC(lxor, uint64_t, uint64_t)
FUNC_FUNC(lxor, long, long)
FUNC_FUNC(lxor, unsigned_long, long)


/* Logical */
#if OMPI_HAVE_FORTRAN_LOGICAL
FUNC_FUNC(lxor, fortran_logical, ompi_fortran_logical_t)
Expand All @@ -490,6 +512,9 @@ FUNC_FUNC(band, int32_t, int32_t)
FUNC_FUNC(band, uint32_t, uint32_t)
FUNC_FUNC(band, int64_t, int64_t)
FUNC_FUNC(band, uint64_t, uint64_t)
FUNC_FUNC(band, long, long)
FUNC_FUNC(band, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC(band, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -527,6 +552,9 @@ FUNC_FUNC(bor, int32_t, int32_t)
FUNC_FUNC(bor, uint32_t, uint32_t)
FUNC_FUNC(bor, int64_t, int64_t)
FUNC_FUNC(bor, uint64_t, uint64_t)
FUNC_FUNC(bor, long, long)
FUNC_FUNC(bor, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC(bor, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -564,6 +592,9 @@ FUNC_FUNC(bxor, int32_t, int32_t)
FUNC_FUNC(bxor, uint32_t, uint32_t)
FUNC_FUNC(bxor, int64_t, int64_t)
FUNC_FUNC(bxor, uint64_t, uint64_t)
FUNC_FUNC(bxor, long, long)
FUNC_FUNC(bxor, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC(bxor, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -605,6 +636,7 @@ LOC_STRUCT(long_int, long, int)
LOC_STRUCT(2int, int, int)
LOC_STRUCT(short_int, short, int)
LOC_STRUCT(long_double_int, long double, int)
LOC_STRUCT(unsigned_long, unsigned long, int)

/*************************************************************************
* Max location
Expand Down Expand Up @@ -789,6 +821,9 @@ FUNC_FUNC_3BUF(max, int32_t, int32_t)
FUNC_FUNC_3BUF(max, uint32_t, uint32_t)
FUNC_FUNC_3BUF(max, int64_t, int64_t)
FUNC_FUNC_3BUF(max, uint64_t, uint64_t)
FUNC_FUNC_3BUF(max, long, long)
FUNC_FUNC_3BUF(max, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC_3BUF(max, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -852,6 +887,9 @@ FUNC_FUNC_3BUF(min, int32_t, int32_t)
FUNC_FUNC_3BUF(min, uint32_t, uint32_t)
FUNC_FUNC_3BUF(min, int64_t, int64_t)
FUNC_FUNC_3BUF(min, uint64_t, uint64_t)
FUNC_FUNC_3BUF(min, long, long)
FUNC_FUNC_3BUF(min, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC_3BUF(min, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -912,6 +950,9 @@ OP_FUNC_3BUF(sum, int32_t, int32_t, +)
OP_FUNC_3BUF(sum, uint32_t, uint32_t, +)
OP_FUNC_3BUF(sum, int64_t, int64_t, +)
OP_FUNC_3BUF(sum, uint64_t, uint64_t, +)
OP_FUNC_3BUF(sum, long, long, +)
OP_FUNC_3BUF(sum, unsigned_long, long, +)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
OP_FUNC_3BUF(sum, fortran_integer, ompi_fortran_integer_t, +)
Expand Down Expand Up @@ -981,6 +1022,9 @@ OP_FUNC_3BUF(prod, int32_t, int32_t, *)
OP_FUNC_3BUF(prod, uint32_t, uint32_t, *)
OP_FUNC_3BUF(prod, int64_t, int64_t, *)
OP_FUNC_3BUF(prod, uint64_t, uint64_t, *)
OP_FUNC_3BUF(prod, long, long, *)
OP_FUNC_3BUF(prod, unsigned_long, long, *)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
OP_FUNC_3BUF(prod, fortran_integer, ompi_fortran_integer_t, *)
Expand Down Expand Up @@ -1052,6 +1096,9 @@ FUNC_FUNC_3BUF(land, int32_t, int32_t)
FUNC_FUNC_3BUF(land, uint32_t, uint32_t)
FUNC_FUNC_3BUF(land, int64_t, int64_t)
FUNC_FUNC_3BUF(land, uint64_t, uint64_t)
FUNC_FUNC_3BUF(land, long, long)
FUNC_FUNC_3BUF(land, unsigned_long, long)

/* Logical */
#if OMPI_HAVE_FORTRAN_LOGICAL
FUNC_FUNC_3BUF(land, fortran_logical, ompi_fortran_logical_t)
Expand All @@ -1074,6 +1121,9 @@ FUNC_FUNC_3BUF(lor, int32_t, int32_t)
FUNC_FUNC_3BUF(lor, uint32_t, uint32_t)
FUNC_FUNC_3BUF(lor, int64_t, int64_t)
FUNC_FUNC_3BUF(lor, uint64_t, uint64_t)
FUNC_FUNC_3BUF(lor, long, long)
FUNC_FUNC_3BUF(lor, unsigned_long, long)

/* Logical */
#if OMPI_HAVE_FORTRAN_LOGICAL
FUNC_FUNC_3BUF(lor, fortran_logical, ompi_fortran_logical_t)
Expand All @@ -1096,6 +1146,9 @@ FUNC_FUNC_3BUF(lxor, int32_t, int32_t)
FUNC_FUNC_3BUF(lxor, uint32_t, uint32_t)
FUNC_FUNC_3BUF(lxor, int64_t, int64_t)
FUNC_FUNC_3BUF(lxor, uint64_t, uint64_t)
FUNC_FUNC_3BUF(lxor, long, long)
FUNC_FUNC_3BUF(lxor, unsigned_long, long)

/* Logical */
#if OMPI_HAVE_FORTRAN_LOGICAL
FUNC_FUNC_3BUF(lxor, fortran_logical, ompi_fortran_logical_t)
Expand All @@ -1118,6 +1171,9 @@ FUNC_FUNC_3BUF(band, int32_t, int32_t)
FUNC_FUNC_3BUF(band, uint32_t, uint32_t)
FUNC_FUNC_3BUF(band, int64_t, int64_t)
FUNC_FUNC_3BUF(band, uint64_t, uint64_t)
FUNC_FUNC_3BUF(band, long, long)
FUNC_FUNC_3BUF(band, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC_3BUF(band, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -1155,6 +1211,9 @@ FUNC_FUNC_3BUF(bor, int32_t, int32_t)
FUNC_FUNC_3BUF(bor, uint32_t, uint32_t)
FUNC_FUNC_3BUF(bor, int64_t, int64_t)
FUNC_FUNC_3BUF(bor, uint64_t, uint64_t)
FUNC_FUNC_3BUF(bor, long, long)
FUNC_FUNC_3BUF(bor, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC_3BUF(bor, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -1192,6 +1251,9 @@ FUNC_FUNC_3BUF(bxor, int32_t, int32_t)
FUNC_FUNC_3BUF(bxor, uint32_t, uint32_t)
FUNC_FUNC_3BUF(bxor, int64_t, int64_t)
FUNC_FUNC_3BUF(bxor, uint64_t, uint64_t)
FUNC_FUNC_3BUF(bxor, long, long)
FUNC_FUNC_3BUF(bxor, unsigned_long, long)

/* Fortran integer */
#if OMPI_HAVE_FORTRAN_INTEGER
FUNC_FUNC_3BUF(bxor, fortran_integer, ompi_fortran_integer_t)
Expand Down Expand Up @@ -1293,6 +1355,8 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
[OMPI_OP_BASE_TYPE_INT32_T] = ompi_op_base_##ftype##_##name##_int32_t, \
[OMPI_OP_BASE_TYPE_UINT32_T] = ompi_op_base_##ftype##_##name##_uint32_t, \
[OMPI_OP_BASE_TYPE_INT64_T] = ompi_op_base_##ftype##_##name##_int64_t, \
[OMPI_OP_BASE_TYPE_LONG] = ompi_op_base_##ftype##_##name##_long, \
[OMPI_OP_BASE_TYPE_UNSIGNED_LONG] = ompi_op_base_##ftype##_##name##_unsigned_long, \
[OMPI_OP_BASE_TYPE_UINT64_T] = ompi_op_base_##ftype##_##name##_uint64_t

/** All the Fortran integers ********************************************/
Expand Down
5 changes: 5 additions & 0 deletions ompi/mca/op/op.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ enum {
/** 2 location C: long double int */
OMPI_OP_BASE_TYPE_LONG_DOUBLE_INT,

/** long */
OMPI_OP_BASE_TYPE_LONG,
/** unsigned long */
OMPI_OP_BASE_TYPE_UNSIGNED_LONG,

/** 2 location C: wchar_t */
OMPI_OP_BASE_TYPE_WCHAR,

Expand Down
3 changes: 3 additions & 0 deletions ompi/op/op.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ int ompi_op_init(void)
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SHORT_FLOAT] = OMPI_OP_BASE_TYPE_SHORT_FLOAT;
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX] = OMPI_OP_BASE_TYPE_C_SHORT_FLOAT_COMPLEX;

ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG] = OMPI_OP_BASE_TYPE_LONG;
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_LONG] = OMPI_OP_BASE_TYPE_UNSIGNED_LONG;

/* Create the intrinsic ops */

if (OMPI_SUCCESS !=
Expand Down