From d3372729bb0f3f84340948bd6753ac096c82e251 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 19 Jun 2007 05:03:11 +0000 Subject: [PATCH] - Support for opt. MPI_REAL2 (who has that?) to make checks for MPI-implementations fail in the right way ,-] - check in configure.ac - BINARY INCOMPATIBLE change to mpif-common.h (if implemented the *right* way) Actually OMPI_F90_CHECK takes two arguments, not three. - Only have corresponding C-Type, if the opt. Fortran type is really supported, Otherwise pass ompi_mpi_unavailable to DECLARE_MPI_SYNONYM_DDT; - Reviewed by George and Jeff This commit was SVN r15133. --- configure.ac | 11 +++++++---- ompi/include/mpi.h.in | 8 +++++++- ompi/mpi/f90/fortran_sizes.h.in | 4 +++- ompi/op/op.c | 9 ++++++++- ompi/op/op.h | 4 +++- ompi/op/op_predefined.c | 14 +++++++++++++- ompi/op/op_predefined.h | 8 +++++++- 7 files changed, 48 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 21113cedc3..c1e4255e4c 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, +# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. @@ -431,6 +431,8 @@ OMPI_F77_CHECK([INTEGER*16], [no], OMPI_F77_CHECK([REAL], [yes], [float, double, long double], [-1]) +OMPI_F77_CHECK([REAL*2], [no], + [float, double, long double], [2]) OMPI_F77_CHECK([REAL*4], [no], [float, double, long double], [4]) OMPI_F77_CHECK([REAL*8], [no], @@ -522,9 +524,10 @@ OMPI_F90_CHECK([INTEGER*16], [16]) # REAL, DOUBLE PRECISION, REAL*4, *8, *16 OMPI_F90_CHECK([REAL]) -OMPI_F90_CHECK([REAL*4], [4], [1]) -OMPI_F90_CHECK([REAL*8], [8], [1]) -OMPI_F90_CHECK([REAL*16], [16], [1]) +OMPI_F90_CHECK([REAL*2], [2]) +OMPI_F90_CHECK([REAL*4], [4]) +OMPI_F90_CHECK([REAL*8], [8]) +OMPI_F90_CHECK([REAL*16], [16]) OMPI_F90_CHECK([DOUBLE PRECISION]) # COMPLEX, DOUBLE COMPLEX, COMPLEX*8, *16, *32 diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index 7a71bb09d7..4fda27f5a1 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -5,7 +5,7 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -51,6 +51,9 @@ /* Whether we have FORTRAN REAL*16 or not */ #undef OMPI_HAVE_FORTRAN_REAL16 +/* Whether we have FORTRAN REAL*2 or not */ +#undef OMPI_HAVE_FORTRAN_REAL2 + /* Whether we have FORTRAN REAL*4 or not */ #undef OMPI_HAVE_FORTRAN_REAL4 @@ -608,6 +611,9 @@ OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer8; #if OMPI_HAVE_FORTRAN_INTEGER16 OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_integer16; #endif +#if OMPI_HAVE_FORTRAN_REAL2 +OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real2; +#endif #if OMPI_HAVE_FORTRAN_REAL4 OMPI_DECLSPEC extern struct ompi_datatype_t ompi_mpi_real4; #endif diff --git a/ompi/mpi/f90/fortran_sizes.h.in b/ompi/mpi/f90/fortran_sizes.h.in index 53ce31c4fb..340d4befe8 100644 --- a/ompi/mpi/f90/fortran_sizes.h.in +++ b/ompi/mpi/f90/fortran_sizes.h.in @@ -5,7 +5,7 @@ ! Copyright (c) 2004-2005 The University of Tennessee and The University ! of Tennessee Research Foundation. All rights ! reserved. -! Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +! Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, ! University of Stuttgart. All rights reserved. ! Copyright (c) 2004-2005 The Regents of the University of California. ! All rights reserved. @@ -27,6 +27,7 @@ integer :: OMPI_SIZEOF_F90_INT4 integer :: OMPI_SIZEOF_F90_INT8 integer :: OMPI_SIZEOF_F90_INT16 +integer :: OMPI_SIZEOF_F90_REAL2 integer :: OMPI_SIZEOF_F90_REAL4 integer :: OMPI_SIZEOF_F90_REAL8 integer :: OMPI_SIZEOF_F90_REAL16 @@ -43,6 +44,7 @@ parameter(OMPI_SIZEOF_F90_INT4 = @OMPI_SIZEOF_F90_INTEGER4@) parameter(OMPI_SIZEOF_F90_INT8 = @OMPI_SIZEOF_F90_INTEGER8@) parameter(OMPI_SIZEOF_F90_INT16 = @OMPI_SIZEOF_F90_INTEGER16@) +parameter(OMPI_SIZEOF_F90_REAL2 = @OMPI_SIZEOF_F90_REAL2@) parameter(OMPI_SIZEOF_F90_REAL4 = @OMPI_SIZEOF_F90_REAL4@) parameter(OMPI_SIZEOF_F90_REAL8 = @OMPI_SIZEOF_F90_REAL8@) parameter(OMPI_SIZEOF_F90_REAL16 = @OMPI_SIZEOF_F90_REAL16@) diff --git a/ompi/op/op.c b/ompi/op/op.c index 0c546107f0..e157284c2f 100644 --- a/ompi/op/op.c +++ b/ompi/op/op.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -152,6 +152,11 @@ OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t, #else #define FLOATING_POINT_FORTRAN_REAL_PLAIN(name) { NULL } #endif +#if OMPI_HAVE_FORTRAN_REAL2 +#define FLOATING_POINT_FORTRAN_REAL2(name) { ompi_mpi_op_##name##_fortran_real2 } +#else +#define FLOATING_POINT_FORTRAN_REAL2(name) { NULL } +#endif #if OMPI_HAVE_FORTRAN_REAL4 #define FLOATING_POINT_FORTRAN_REAL4(name) { ompi_mpi_op_##name##_fortran_real4 } #else @@ -170,6 +175,7 @@ OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t, #define FLOATING_POINT_FORTRAN_REAL(name) \ FLOATING_POINT_FORTRAN_REAL_PLAIN(name), /* OMPI_OP_TYPE_REAL */ \ + FLOATING_POINT_FORTRAN_REAL2(name), /* OMPI_OP_TYPE_REAL2 */ \ FLOATING_POINT_FORTRAN_REAL4(name), /* OMPI_OP_TYPE_REAL4 */ \ FLOATING_POINT_FORTRAN_REAL8(name), /* OMPI_OP_TYPE_REAL8 */ \ FLOATING_POINT_FORTRAN_REAL16(name) /* OMPI_OP_TYPE_REAL16 */ @@ -195,6 +201,7 @@ OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t, { NULL }, /* OMPI_OP_TYPE_FLOAT */ \ { NULL }, /* OMPI_OP_TYPE_DOUBLE */ \ { NULL }, /* OMPI_OP_TYPE_REAL */ \ + { NULL }, /* OMPI_OP_TYPE_REAL2 */ \ { NULL }, /* OMPI_OP_TYPE_REAL4 */ \ { NULL }, /* OMPI_OP_TYPE_REAL8 */ \ { NULL }, /* OMPI_OP_TYPE_REAL16 */ \ diff --git a/ompi/op/op.h b/ompi/op/op.h index 42314274fc..239850770f 100644 --- a/ompi/op/op.h +++ b/ompi/op/op.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -120,6 +120,8 @@ enum { /**< Floating point: double */ OMPI_OP_TYPE_REAL, /**< Floating point: real */ + OMPI_OP_TYPE_REAL2, + /**< Floating point: real*2 */ OMPI_OP_TYPE_REAL4, /**< Floating point: real*4 */ OMPI_OP_TYPE_REAL8, diff --git a/ompi/op/op_predefined.c b/ompi/op/op_predefined.c index 6947b29e69..9d72db6123 100644 --- a/ompi/op/op_predefined.c +++ b/ompi/op/op_predefined.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -176,6 +176,9 @@ FUNC_FUNC(max, fortran_real, ompi_fortran_real_t) #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION FUNC_FUNC(max, fortran_double_precision, ompi_fortran_double_precision_t) #endif +#if OMPI_HAVE_FORTRAN_REAL2 +FUNC_FUNC(max, fortran_real2, ompi_fortran_real2_t) +#endif #if OMPI_HAVE_FORTRAN_REAL4 FUNC_FUNC(max, fortran_real4, ompi_fortran_real4_t) #endif @@ -237,6 +240,9 @@ FUNC_FUNC(min, fortran_real, ompi_fortran_real_t) #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION FUNC_FUNC(min, fortran_double_precision, ompi_fortran_double_precision_t) #endif +#if OMPI_HAVE_FORTRAN_REAL2 +FUNC_FUNC(min, fortran_real2, ompi_fortran_real2_t) +#endif #if OMPI_HAVE_FORTRAN_REAL4 FUNC_FUNC(min, fortran_real4, ompi_fortran_real4_t) #endif @@ -295,6 +301,9 @@ OP_FUNC(sum, fortran_real, ompi_fortran_real_t, +=) #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION OP_FUNC(sum, fortran_double_precision, ompi_fortran_double_precision_t, +=) #endif +#if OMPI_HAVE_FORTRAN_REAL2 +OP_FUNC(sum, fortran_real2, ompi_fortran_real2_t, +=) +#endif #if OMPI_HAVE_FORTRAN_REAL4 OP_FUNC(sum, fortran_real4, ompi_fortran_real4_t, +=) #endif @@ -369,6 +378,9 @@ OP_FUNC(prod, fortran_real, ompi_fortran_real_t, *=) #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION OP_FUNC(prod, fortran_double_precision, ompi_fortran_double_precision_t, *=) #endif +#if OMPI_HAVE_FORTRAN_REAL2 +OP_FUNC(prod, fortran_real2, ompi_fortran_real2_t, *=) +#endif #if OMPI_HAVE_FORTRAN_REAL4 OP_FUNC(prod, fortran_real4, ompi_fortran_real4_t, *=) #endif diff --git a/ompi/op/op_predefined.h b/ompi/op/op_predefined.h index 1d17c2820b..061b37ba06 100644 --- a/ompi/op/op_predefined.h +++ b/ompi/op/op_predefined.h @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -100,6 +100,12 @@ void ompi_mpi_op_##name##_fortran_real OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_fortran_double_precision OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_long_double OMPI_OP_PROTO; +#if OMPI_HAVE_FORTRAN_REAL2 +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL2(name) \ + void ompi_mpi_op_##name##_fortran_real2 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL2(name) +#endif #if OMPI_HAVE_FORTRAN_REAL4 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name) \ void ompi_mpi_op_##name##_fortran_real4 OMPI_OP_PROTO;