From 9903fe0ab8e891db42aa8ad4f93917a4316b965a Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Tue, 28 Jun 2022 15:50:54 -0400 Subject: [PATCH] Treat unsigned long as unsigned, not signed long This likely had no impact on arithmetic operations but bites us on min and max. We should use unsigned long consistently though. Signed-off-by: Joseph Schuchart (cherry picked from commit a8fc35c161e5ffcc1adb3690da9f2c60a3f18a5c) --- ompi/mca/op/base/op_base_functions.c | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ompi/mca/op/base/op_base_functions.c b/ompi/mca/op/base/op_base_functions.c index dcfb6e5c88e..556b6d1cfb0 100644 --- a/ompi/mca/op/base/op_base_functions.c +++ b/ompi/mca/op/base/op_base_functions.c @@ -118,7 +118,7 @@ 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) +FUNC_FUNC(max, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -181,7 +181,7 @@ 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) +FUNC_FUNC(min, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -241,7 +241,7 @@ 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, +=) +OP_FUNC(sum, unsigned_long, unsigned long, +=) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -311,7 +311,7 @@ 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, *=) +OP_FUNC(prod, unsigned_long, unsigned long, *=) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -383,7 +383,7 @@ 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) +FUNC_FUNC(land, unsigned_long, unsigned long) /* Logical */ #if OMPI_HAVE_FORTRAN_LOGICAL @@ -408,7 +408,7 @@ 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) +FUNC_FUNC(lor, unsigned_long, unsigned long) /* Logical */ #if OMPI_HAVE_FORTRAN_LOGICAL @@ -433,7 +433,7 @@ 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) +FUNC_FUNC(lxor, unsigned_long, unsigned long) /* Logical */ @@ -459,7 +459,7 @@ 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) +FUNC_FUNC(band, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -499,7 +499,7 @@ 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) +FUNC_FUNC(bor, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -539,7 +539,7 @@ 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) +FUNC_FUNC(bxor, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -730,7 +730,7 @@ 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) +FUNC_FUNC_3BUF(max, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -793,7 +793,7 @@ 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) +FUNC_FUNC_3BUF(min, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -853,7 +853,7 @@ 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, +) +OP_FUNC_3BUF(sum, unsigned_long, unsigned long, +) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -923,7 +923,7 @@ 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, *) +OP_FUNC_3BUF(prod, unsigned_long, unsigned long, *) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -995,7 +995,7 @@ 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) +FUNC_FUNC_3BUF(land, unsigned_long, unsigned long) /* Logical */ #if OMPI_HAVE_FORTRAN_LOGICAL @@ -1020,7 +1020,7 @@ 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) +FUNC_FUNC_3BUF(lor, unsigned_long, unsigned long) /* Logical */ #if OMPI_HAVE_FORTRAN_LOGICAL @@ -1045,7 +1045,7 @@ 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) +FUNC_FUNC_3BUF(lxor, unsigned_long, unsigned long) /* Logical */ #if OMPI_HAVE_FORTRAN_LOGICAL @@ -1070,7 +1070,7 @@ 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) +FUNC_FUNC_3BUF(band, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -1110,7 +1110,7 @@ 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) +FUNC_FUNC_3BUF(bor, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER @@ -1150,7 +1150,7 @@ 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) +FUNC_FUNC_3BUF(bxor, unsigned_long, unsigned long) /* Fortran integer */ #if OMPI_HAVE_FORTRAN_INTEGER