diff --git a/config/f77_get_fortran_handle_max.m4 b/config/f77_get_fortran_handle_max.m4 index fc0d8d1146..de8c905586 100644 --- a/config/f77_get_fortran_handle_max.m4 +++ b/config/f77_get_fortran_handle_max.m4 @@ -28,7 +28,7 @@ AC_MSG_CHECKING([for max fortran MPI handle index]) if test "$OMPI_WANT_F77_BINDINGS" = "0" ; then ompi_fint_max=-1 else - ompi_sizeof_fint=`expr $OMPI_SIZEOF_FORTRAN_INT \* 8 - 1` + ompi_sizeof_fint=`expr $OMPI_SIZEOF_FORTRAN_INTEGER \* 8 - 1` ompi_fint_max=1 while test "$ompi_sizeof_fint" != "0"; do ompi_fint_max=`expr $ompi_fint_max \* 2` diff --git a/configure.ac b/configure.ac index acf5a1376c..3f09a45f60 100644 --- a/configure.ac +++ b/configure.ac @@ -368,13 +368,13 @@ OMPI_HAVE_FORTRAN_COMPLEX8=0 OMPI_HAVE_FORTRAN_COMPLEX16=0 OMPI_HAVE_FORTRAN_COMPLEX32=0 -OMPI_SIZEOF_FORTRAN_INT=0 +OMPI_SIZEOF_FORTRAN_INTEGER=0 OMPI_SIZEOF_FORTRAN_REAL=0 OMPI_SIZEOF_FORTRAN_DBLPREC=0 OMPI_SIZEOF_FORTRAN_COMPLEX=0 OMPI_SIZEOF_FORTRAN_DBLCOMPLEX=0 -OMPI_ALIGNMENT_FORTRAN_INT=0 +OMPI_ALIGNMENT_FORTRAN_INTEGER=0 OMPI_ALIGNMENT_FORTRAN_REAL=0 OMPI_ALIGNMENT_FORTRAN_DBLPREC=0 OMPI_ALIGNMENT_FORTRAN_COMPLEX=0 @@ -393,7 +393,7 @@ OMPI_F77_FIND_EXT_SYMBOL_CONVENTION($OMPI_F77) if test "$OMPI_WANT_F77_BINDINGS" = "0" ; then OMPI_SIZEOF_FORTRAN_LOGICAL=$ac_cv_sizeof_int - OMPI_SIZEOF_FORTRAN_INT=$ac_cv_sizeof_int + OMPI_SIZEOF_FORTRAN_INTEGER=$ac_cv_sizeof_int OMPI_SIZEOF_FORTRAN_REAL=$ac_cv_sizeof_float OMPI_SIZEOF_FORTRAN_DBLPREC=$ac_cv_sizeof_double else @@ -415,14 +415,14 @@ else OMPI_F77_CHECK_TYPE(COMPLEX*32, OMPI_HAVE_FORTRAN_COMPLEX32) OMPI_F77_GET_SIZEOF(LOGICAL, OMPI_SIZEOF_FORTRAN_LOGICAL) - OMPI_F77_GET_SIZEOF(INTEGER, OMPI_SIZEOF_FORTRAN_INT) + OMPI_F77_GET_SIZEOF(INTEGER, OMPI_SIZEOF_FORTRAN_INTEGER) OMPI_F77_GET_SIZEOF(REAL, OMPI_SIZEOF_FORTRAN_REAL) OMPI_F77_GET_SIZEOF(DOUBLE PRECISION, OMPI_SIZEOF_FORTRAN_DBLPREC) OMPI_F77_GET_SIZEOF(COMPLEX, OMPI_SIZEOF_FORTRAN_COMPLEX) OMPI_F77_GET_SIZEOF(DOUBLE COMPLEX, OMPI_SIZEOF_FORTRAN_DBLCOMPLEX) OMPI_F77_GET_ALIGNMENT(LOGICAL, OMPI_ALIGNMENT_FORTRAN_LOGICAL) - OMPI_F77_GET_ALIGNMENT(INTEGER, OMPI_ALIGNMENT_FORTRAN_INT) + OMPI_F77_GET_ALIGNMENT(INTEGER, OMPI_ALIGNMENT_FORTRAN_INTEGER) OMPI_F77_GET_ALIGNMENT(REAL, OMPI_ALIGNMENT_FORTRAN_REAL) OMPI_F77_GET_ALIGNMENT(DOUBLE PRECISION, OMPI_ALIGNMENT_FORTRAN_DBLPREC) OMPI_F77_GET_ALIGNMENT(COMPLEX, OMPI_ALIGNMENT_FORTRAN_COMPLEX) @@ -457,7 +457,7 @@ AC_DEFINE_UNQUOTED(OMPI_HAVE_FORTRAN_COMPLEX32, $OMPI_HAVE_FORTRAN_COMPLEX32, AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_LOGICAL, $OMPI_SIZEOF_FORTRAN_LOGICAL, [Size of fortran logical]) -AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_INT, $OMPI_SIZEOF_FORTRAN_INT, +AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_INTEGER, $OMPI_SIZEOF_FORTRAN_INTEGER, [Size of fortran integer]) AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_REAL, $OMPI_SIZEOF_FORTRAN_REAL, [Size of fortran real]) @@ -472,7 +472,8 @@ AC_DEFINE_UNQUOTED(OMPI_SIZEOF_FORTRAN_DBLCOMPLEX, AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_LOGICAL, $OMPI_ALIGNMENT_FORTRAN_LOGICAL, [Alignment of fortran logical]) -AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_INT, $OMPI_ALIGNMENT_FORTRAN_INT, +AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_INTEGER, + $OMPI_ALIGNMENT_FORTRAN_INTEGER, [Alignment of fortran integer]) AC_DEFINE_UNQUOTED(OMPI_ALIGNMENT_FORTRAN_REAL, $OMPI_ALIGNMENT_FORTRAN_REAL, [alignment of fortran real]) @@ -1139,32 +1140,123 @@ ompi_show_title "System-specific tests" if test "$OMPI_F77" != "none"; then OMPI_FIND_TYPE(Fortran LOGICAL, FORTRAN_LOGICAL, char int int32_t) - OMPI_FIND_TYPE(Fortran INTEGER, FORTRAN_INT, + + OMPI_FIND_TYPE(Fortran INTEGER, FORTRAN_INTEGER, int32_t int intr64_t long:long long) + if test "$OMPI_HAVE_FORTRAN_INTEGER1" = "1"; then + OMPI_SIZEOF_FORTRAN_INTEGER1=1 + OMPI_FIND_TYPE(Fortran INTEGER1, FORTRAN_INTEGER1, + char int8_t short int int64_t long:long long) + else + MPI_FORTRAN_INTEGER1_TYPE=int + fi + if test "$OMPI_HAVE_FORTRAN_INTEGER2" = "1"; then + OMPI_SIZEOF_FORTRAN_INTEGER2=2 + OMPI_FIND_TYPE(Fortran INTEGER2, FORTRAN_INTEGER2, + short int16_t int int64_t long:long long) + else + MPI_FORTRAN_INTEGER2_TYPE=int + fi + if test "$OMPI_HAVE_FORTRAN_INTEGER4" = "1"; then + OMPI_SIZEOF_FORTRAN_INTEGER4=4 + OMPI_FIND_TYPE(Fortran INTEGER4, FORTRAN_INTEGER4, + short int int64_t long:long long) + else + MPI_FORTRAN_INTEGER4_TYPE=int + fi + if test "$OMPI_HAVE_FORTRAN_INTEGER8" = "1"; then + OMPI_SIZEOF_FORTRAN_INTEGER8=8 + OMPI_FIND_TYPE(Fortran INTEGER8, FORTRAN_INTEGER8, + int int64_t long:long long) + else + MPI_FORTRAN_INTEGER8_TYPE=int + fi + if test "$OMPI_HAVE_FORTRAN_INTEGER16" = "1"; then + OMPI_SIZEOF_FORTRAN_INTEGER16=16 + OMPI_FIND_TYPE(Fortran INTEGER16, FORTRAN_INTEGER16, + int int64_t long:long long) + else + MPI_FORTRAN_INTEGER16_TYPE=int + fi + OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL, float double long:double) + if test "$OMPI_HAVE_FORTRAN_REAL4" = "1"; then + OMPI_SIZEOF_FORTRAN_REAL4=4 + OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL4, + float double long:double) + else + MPI_FORTRAN_REAL4_TYPE=float + fi + if test "$OMPI_HAVE_FORTRAN_REAL8" = "1"; then + OMPI_SIZEOF_FORTRAN_REAL8=8 + OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL8, + float double long:double) + else + MPI_FORTRAN_REAL8_TYPE=float + fi + if test "$OMPI_HAVE_FORTRAN_REAL16" = "1"; then + OMPI_SIZEOF_FORTRAN_REAL16=16 + OMPI_FIND_TYPE(Fortran REAL, FORTRAN_REAL16, + float double long:double) + else + MPI_FORTRAN_REAL16_TYPE=float + fi + OMPI_FIND_TYPE(Fortran DOUBLE PRECISION, FORTRAN_DBLPREC, float double long:double) else MPI_FORTRAN_LOGICAL_TYPE=char - MPI_FORTRAN_INT_TYPE=int + MPI_FORTRAN_INTEGER_TYPE=int + MPI_FORTRAN_INTEGER1_TYPE=char + MPI_FORTRAN_INTEGER2_TYPE=short + MPI_FORTRAN_INTEGER4_TYPE=int + MPI_FORTRAN_INTEGER8_TYPE=long + MPI_FORTRAN_INTEGER16_TYPE=long MPI_FORTRAN_REAL_TYPE=float + MPI_FORTRAN_REAL4_TYPE=float + MPI_FORTRAN_REAL8_TYPE=double + MPI_FORTRAN_REAL16_TYPE="long double" MPI_FORTRAN_DBLPREC_TYPE=double AC_MSG_WARN([*** Did not detect a f77 compiler. Assuming default corresponding types]) AC_MSG_WARN([*** Fortran LOGICAL = C $MPI_FORTRAN_LOGICAL_TYPE]) - AC_MSG_WARN([*** Fortran INTEGER = C $MPI_FORTRAN_INT_TYPE]) + AC_MSG_WARN([*** Fortran INTEGER = C $MPI_FORTRAN_INTEGER_TYPE]) + AC_MSG_WARN([*** Fortran INTEGER1 = C $MPI_FORTRAN_INTEGER1_TYPE]) + AC_MSG_WARN([*** Fortran INTEGER2 = C $MPI_FORTRAN_INTEGER2_TYPE]) + AC_MSG_WARN([*** Fortran INTEGER4 = C $MPI_FORTRAN_INTEGER4_TYPE]) + AC_MSG_WARN([*** Fortran INTEGER8 = C $MPI_FORTRAN_INTEGER8_TYPE]) + AC_MSG_WARN([*** Fortran INTEGER16 = C $MPI_FORTRAN_INTEGER16_TYPE]) AC_MSG_WARN([*** Fortran REAL = C $MPI_FORTRAN_REAL_TYPE]) + AC_MSG_WARN([*** Fortran REAL4 = C $MPI_FORTRAN_REAL4_TYPE]) + AC_MSG_WARN([*** Fortran REAL8 = C $MPI_FORTRAN_REAL8_TYPE]) + AC_MSG_WARN([*** Fortran REAL16 = C $MPI_FORTRAN_REAL16_TYPE]) AC_MSG_WARN([*** Fortran DOUBLE PRECISION = C $MPI_FORTRAN_DBLPREC_TYPE]) fi -AC_DEFINE_UNQUOTED(MPI_Fint, $MPI_FORTRAN_INT_TYPE, - [C type corresponding to Fortran INTEGER]) - AC_DEFINE_UNQUOTED(ompi_fortran_logical_t, $MPI_FORTRAN_LOGICAL_TYPE, [C type corresponding to Fortran LOGICAL]) -AC_DEFINE_UNQUOTED(ompi_fortran_integer_t, $MPI_FORTRAN_INT_TYPE, + +AC_DEFINE_UNQUOTED(MPI_Fint, $MPI_FORTRAN_INTEGER_TYPE, + [C type corresponding to Fortran INTEGER]) +AC_DEFINE_UNQUOTED(ompi_fortran_integer_t, $MPI_FORTRAN_INTEGER_TYPE, [C type corresponding to Fortran LOGICAL]) +AC_DEFINE_UNQUOTED(ompi_fortran_integer1_t, $MPI_FORTRAN_INTEGER1_TYPE, + [C type corresponding to Fortran INTEGER1]) +AC_DEFINE_UNQUOTED(ompi_fortran_integer2_t, $MPI_FORTRAN_INTEGER2_TYPE, + [C type corresponding to Fortran INTEGER2]) +AC_DEFINE_UNQUOTED(ompi_fortran_integer4_t, $MPI_FORTRAN_INTEGER4_TYPE, + [C type corresponding to Fortran INTEGER4]) +AC_DEFINE_UNQUOTED(ompi_fortran_integer8_t, $MPI_FORTRAN_INTEGER8_TYPE, + [C type corresponding to Fortran INTEGER4]) + AC_DEFINE_UNQUOTED(ompi_fortran_real_t, $MPI_FORTRAN_REAL_TYPE, [C type corresponding to Fortran REAL]) +AC_DEFINE_UNQUOTED(ompi_fortran_real4_t, $MPI_FORTRAN_REAL4_TYPE, + [C type corresponding to Fortran REAL4]) +AC_DEFINE_UNQUOTED(ompi_fortran_real8_t, $MPI_FORTRAN_REAL8_TYPE, + [C type corresponding to Fortran REAL8]) +AC_DEFINE_UNQUOTED(ompi_fortran_real16_t, $MPI_FORTRAN_REAL16_TYPE, + [C type corresponding to Fortran REAL16]) + AC_DEFINE_UNQUOTED(ompi_fortran_dblprec_t, $MPI_FORTRAN_DBLPREC_TYPE, [C type corresponding to Fortran DOUBLE PRECISION]) diff --git a/include/mpi.h b/include/mpi.h index 7ce9edab2f..beecbca37b 100644 --- a/include/mpi.h +++ b/include/mpi.h @@ -550,7 +550,7 @@ OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE; #define MPI_INTEGER2 (&ompi_mpi_integer2) #define MPI_INTEGER4 (&ompi_mpi_integer4) #if HAVE_LONG_LONG -#define MPI_INTEGER8 (&ompi_mpi_integr8) +#define MPI_INTEGER8 (&ompi_mpi_integer8) #endif /* HAVE_LONG_LONG */ #define MPI_REAL (&ompi_mpi_real) #define MPI_REAL4 (&ompi_mpi_real4) diff --git a/include/ompi_config_bottom.h b/include/ompi_config_bottom.h index 7c783e4aff..f5301c0fb9 100644 --- a/include/ompi_config_bottom.h +++ b/include/ompi_config_bottom.h @@ -84,6 +84,29 @@ typedef struct { ompi_fortran_real_t imag; } ompi_fortran_complex_t; +#if OMPI_HAVE_FORTRAN_REAL4 +/* * C type for Fortran COMPLEX*8 */ +typedef struct { + ompi_fortran_real4_t real; + ompi_fortran_real4_t imag; +} ompi_fortran_complex8_t; +#endif + +#if OMPI_HAVE_FORTRAN_REAL8 +/* * C type for Fortran COMPLEX*16 */ +typedef struct { + ompi_fortran_real8_t real; + ompi_fortran_real8_t imag; +} ompi_fortran_complex16_t; +#endif + +#if OMPI_HAVE_FORTRAN_REAL16 +/* * C type for Fortran COMPLEX*32 */ +typedef struct { + ompi_fortran_real16_t real; + ompi_fortran_real16_t imag; +} ompi_fortran_complex32_t; +#endif /* * C type for Fortran DOUBLE COMPLEX */ typedef struct { diff --git a/src/datatype/dt_module.c b/src/datatype/dt_module.c index 3fa7ab54e5..9e9752e103 100644 --- a/src/datatype/dt_module.c +++ b/src/datatype/dt_module.c @@ -106,7 +106,7 @@ ompi_datatype_t ompi_mpi_longdbl_int = INIT_BASIC_DATA( void*, 0, UNAVAILABLE, 0 ompi_datatype_t ompi_mpi_long_int = INIT_BASIC_TYPE( DT_LONG_INT, LONG_INT ); ompi_datatype_t ompi_mpi_2int = INIT_BASIC_TYPE( DT_2INT, 2INT ); ompi_datatype_t ompi_mpi_short_int = INIT_BASIC_TYPE( DT_SHORT_INT, SHORT_INT ); -ompi_datatype_t ompi_mpi_integer = INIT_BASIC_FORTRAN_TYPE( DT_INTEGER, INTEGER, OMPI_SIZEOF_FORTRAN_INT, OMPI_ALIGNMENT_FORTRAN_INT, DT_FLAG_DATA_INT ); +ompi_datatype_t ompi_mpi_integer = INIT_BASIC_FORTRAN_TYPE( DT_INTEGER, INTEGER, OMPI_SIZEOF_FORTRAN_INTEGER, OMPI_ALIGNMENT_FORTRAN_INTEGER, DT_FLAG_DATA_INT ); ompi_datatype_t ompi_mpi_real = INIT_BASIC_FORTRAN_TYPE( DT_REAL, REAL, OMPI_SIZEOF_FORTRAN_REAL, OMPI_ALIGNMENT_FORTRAN_REAL, DT_FLAG_DATA_FLOAT ); ompi_datatype_t ompi_mpi_dblprec = INIT_BASIC_FORTRAN_TYPE( DT_DBLPREC, DBLPREC, OMPI_SIZEOF_FORTRAN_DBLPREC, OMPI_ALIGNMENT_FORTRAN_DBLPREC, DT_FLAG_DATA_FLOAT ); ompi_datatype_t ompi_mpi_2real = INIT_BASIC_TYPE( DT_2REAL, 2REAL ); diff --git a/src/mpi/f77/file_read_all_end_f.c b/src/mpi/f77/file_read_all_end_f.c index f558d328e3..d51c0b6bd8 100644 --- a/src/mpi/f77/file_read_all_end_f.c +++ b/src/mpi/f77/file_read_all_end_f.c @@ -62,7 +62,7 @@ void mpi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_Fint *ierr) { MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif MPI_File c_fh = MPI_File_f2c(*fh); @@ -77,7 +77,7 @@ void mpi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -86,7 +86,7 @@ void mpi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, *ierr = OMPI_INT_2_FINT(MPI_File_read_all_end(c_fh, buf, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_all_f.c b/src/mpi/f77/file_read_all_f.c index 3908eb74fd..c5de674663 100644 --- a/src/mpi/f77/file_read_all_f.c +++ b/src/mpi/f77/file_read_all_f.c @@ -64,7 +64,7 @@ void mpi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -76,7 +76,7 @@ void mpi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -87,7 +87,7 @@ void mpi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FINT_2_INT(*count), c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_at_all_end_f.c b/src/mpi/f77/file_read_at_all_end_f.c index 1ea871fcd1..506ef3a010 100644 --- a/src/mpi/f77/file_read_at_all_end_f.c +++ b/src/mpi/f77/file_read_at_all_end_f.c @@ -63,7 +63,7 @@ void mpi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, { MPI_File c_fh = MPI_File_f2c(*fh); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -86,7 +86,7 @@ void mpi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, *ierr = OMPI_FINT_2_INT(MPI_File_read_at_all_end(c_fh, buf, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_at_all_f.c b/src/mpi/f77/file_read_at_all_f.c index 150a3ca637..0e518075e6 100644 --- a/src/mpi/f77/file_read_at_all_f.c +++ b/src/mpi/f77/file_read_at_all_f.c @@ -66,7 +66,7 @@ void mpi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -78,7 +78,7 @@ void mpi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -92,7 +92,7 @@ void mpi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset, c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_at_f.c b/src/mpi/f77/file_read_at_f.c index fb23ba5354..1fa9785687 100644 --- a/src/mpi/f77/file_read_at_f.c +++ b/src/mpi/f77/file_read_at_f.c @@ -65,7 +65,7 @@ void mpi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -79,7 +79,7 @@ void mpi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -92,7 +92,7 @@ void mpi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, OMPI_FINT_2_INT(*count), c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_f.c b/src/mpi/f77/file_read_f.c index 386d3dfc3c..3c2822d6f9 100644 --- a/src/mpi/f77/file_read_f.c +++ b/src/mpi/f77/file_read_f.c @@ -64,7 +64,7 @@ void mpi_file_read_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -76,7 +76,7 @@ void mpi_file_read_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -87,7 +87,7 @@ void mpi_file_read_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FINT_2_INT(*count), c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_ordered_end_f.c b/src/mpi/f77/file_read_ordered_end_f.c index 86d45491a5..f0f90d8183 100644 --- a/src/mpi/f77/file_read_ordered_end_f.c +++ b/src/mpi/f77/file_read_ordered_end_f.c @@ -63,7 +63,7 @@ void mpi_file_read_ordered_end_f(MPI_Fint *fh, char *buf, { MPI_File c_fh = MPI_File_f2c(*fh); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_read_ordered_end_f(MPI_Fint *fh, char *buf, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -86,7 +86,7 @@ void mpi_file_read_ordered_end_f(MPI_Fint *fh, char *buf, *ierr = OMPI_INT_2_FINT(MPI_File_read_ordered_end(c_fh, buf, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_ordered_f.c b/src/mpi/f77/file_read_ordered_f.c index a3d32dd91a..faeaaf1bec 100644 --- a/src/mpi/f77/file_read_ordered_f.c +++ b/src/mpi/f77/file_read_ordered_f.c @@ -65,7 +65,7 @@ void mpi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -90,7 +90,7 @@ void mpi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_read_shared_f.c b/src/mpi/f77/file_read_shared_f.c index 30fb4c3dff..f3a05c1e0e 100644 --- a/src/mpi/f77/file_read_shared_f.c +++ b/src/mpi/f77/file_read_shared_f.c @@ -65,7 +65,7 @@ void mpi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -90,7 +90,7 @@ void mpi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_all_end_f.c b/src/mpi/f77/file_write_all_end_f.c index 82d1a47f64..4344567885 100644 --- a/src/mpi/f77/file_write_all_end_f.c +++ b/src/mpi/f77/file_write_all_end_f.c @@ -62,7 +62,7 @@ void mpi_file_write_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_Fint *ierr) { MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif MPI_File c_fh = MPI_File_f2c(*fh); @@ -77,7 +77,7 @@ void mpi_file_write_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -86,7 +86,7 @@ void mpi_file_write_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, *ierr = OMPI_INT_2_FINT(MPI_File_write_all_end(c_fh, buf, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_all_f.c b/src/mpi/f77/file_write_all_f.c index 65b07d4128..f5974c345d 100644 --- a/src/mpi/f77/file_write_all_f.c +++ b/src/mpi/f77/file_write_all_f.c @@ -64,7 +64,7 @@ void mpi_file_write_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -76,7 +76,7 @@ void mpi_file_write_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -87,7 +87,7 @@ void mpi_file_write_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FINT_2_INT(*count), c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_at_all_end_f.c b/src/mpi/f77/file_write_at_all_end_f.c index b5ed7a16fa..91700f7170 100644 --- a/src/mpi/f77/file_write_at_all_end_f.c +++ b/src/mpi/f77/file_write_at_all_end_f.c @@ -63,7 +63,7 @@ void mpi_file_write_at_all_end_f(MPI_Fint *fh, char *buf, { MPI_File c_fh = MPI_File_f2c(*fh); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_write_at_all_end_f(MPI_Fint *fh, char *buf, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -86,7 +86,7 @@ void mpi_file_write_at_all_end_f(MPI_Fint *fh, char *buf, *ierr = OMPI_FINT_2_INT(MPI_File_write_at_all_end(c_fh, buf, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_at_all_f.c b/src/mpi/f77/file_write_at_all_f.c index c7779a41fb..d04b6f6bb0 100644 --- a/src/mpi/f77/file_write_at_all_f.c +++ b/src/mpi/f77/file_write_at_all_f.c @@ -66,7 +66,7 @@ void mpi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -78,7 +78,7 @@ void mpi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -92,7 +92,7 @@ void mpi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset, c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_at_f.c b/src/mpi/f77/file_write_at_f.c index 60528a0405..ff3acb7ac1 100644 --- a/src/mpi/f77/file_write_at_f.c +++ b/src/mpi/f77/file_write_at_f.c @@ -64,7 +64,7 @@ void mpi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -76,7 +76,7 @@ void mpi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -89,7 +89,7 @@ void mpi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset, OMPI_FINT_2_INT(*count), c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_f.c b/src/mpi/f77/file_write_f.c index a8a6b11e81..97212bb830 100644 --- a/src/mpi/f77/file_write_f.c +++ b/src/mpi/f77/file_write_f.c @@ -64,7 +64,7 @@ void mpi_file_write_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -76,7 +76,7 @@ void mpi_file_write_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -87,7 +87,7 @@ void mpi_file_write_f(MPI_Fint *fh, char *buf, MPI_Fint *count, OMPI_FINT_2_INT(*count), c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_ordered_end_f.c b/src/mpi/f77/file_write_ordered_end_f.c index a5ea923d0e..0501e64230 100644 --- a/src/mpi/f77/file_write_ordered_end_f.c +++ b/src/mpi/f77/file_write_ordered_end_f.c @@ -63,7 +63,7 @@ void mpi_file_write_ordered_end_f(MPI_Fint *fh, char *buf, { MPI_File c_fh = MPI_File_f2c(*fh); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_write_ordered_end_f(MPI_Fint *fh, char *buf, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -86,7 +86,7 @@ void mpi_file_write_ordered_end_f(MPI_Fint *fh, char *buf, *ierr = OMPI_INT_2_FINT(MPI_File_write_ordered_end(c_fh, buf, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_ordered_f.c b/src/mpi/f77/file_write_ordered_f.c index 47dc2efd4f..62dae9fd0d 100644 --- a/src/mpi/f77/file_write_ordered_f.c +++ b/src/mpi/f77/file_write_ordered_f.c @@ -65,7 +65,7 @@ void mpi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -90,7 +90,7 @@ void mpi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count, c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/file_write_shared_f.c b/src/mpi/f77/file_write_shared_f.c index 1a806e56af..582a737180 100644 --- a/src/mpi/f77/file_write_shared_f.c +++ b/src/mpi/f77/file_write_shared_f.c @@ -65,7 +65,7 @@ void mpi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_File c_fh = MPI_File_f2c(*fh); MPI_Datatype c_type = MPI_Type_f2c(*datatype); MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -77,7 +77,7 @@ void mpi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -90,7 +90,7 @@ void mpi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, c_type, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/fint_2_int.h b/src/mpi/f77/fint_2_int.h index be04bdb5f9..1bab78f888 100644 --- a/src/mpi/f77/fint_2_int.h +++ b/src/mpi/f77/fint_2_int.h @@ -25,7 +25,7 @@ * Define MACROS to take account of different size of MPI_Fint from int */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT #define OMPI_ARRAY_NAME_DECL(a) #define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2) #define OMPI_SINGLE_NAME_DECL(a) @@ -41,7 +41,7 @@ #define OMPI_SINGLE_INT_2_FINT(in) #define OMPI_ARRAY_INT_2_FINT(in, n) -#elif OMPI_SIZEOF_FORTRAN_INT > SIZEOF_INT +#elif OMPI_SIZEOF_FORTRAN_INTEGER > SIZEOF_INT #define OMPI_ARRAY_NAME_DECL(a) int *c_##a #define OMPI_2_DIM_ARRAY_NAME_DECL(a, dim2) int (*c_##a)[dim2], dim2_index #define OMPI_SINGLE_NAME_DECL(a) int c_##a diff --git a/src/mpi/f77/iprobe_f.c b/src/mpi/f77/iprobe_f.c index 2fcba924e7..113c033789 100644 --- a/src/mpi/f77/iprobe_f.c +++ b/src/mpi/f77/iprobe_f.c @@ -64,7 +64,7 @@ void mpi_iprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, { MPI_Status *c_status; MPI_Comm c_comm; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif OMPI_SINGLE_NAME_DECL(flag); @@ -80,7 +80,7 @@ void mpi_iprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -94,7 +94,7 @@ void mpi_iprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, OMPI_SINGLE_INT_2_FINT(flag); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/probe_f.c b/src/mpi/f77/probe_f.c index 705091d374..ce02b1816e 100644 --- a/src/mpi/f77/probe_f.c +++ b/src/mpi/f77/probe_f.c @@ -63,7 +63,7 @@ void mpi_probe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *stat { MPI_Status *c_status; MPI_Comm c_comm; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif @@ -78,7 +78,7 @@ void mpi_probe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *stat translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -89,7 +89,7 @@ void mpi_probe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *stat OMPI_FINT_2_INT(*tag), c_comm, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/mpi/f77/recv_f.c b/src/mpi/f77/recv_f.c index 311e6ca31f..3ae5080c03 100644 --- a/src/mpi/f77/recv_f.c +++ b/src/mpi/f77/recv_f.c @@ -64,7 +64,7 @@ void mpi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr) { MPI_Status *c_status; -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT MPI_Status c_status2; #endif MPI_Comm c_comm = MPI_Comm_f2c(*comm); @@ -78,7 +78,7 @@ void mpi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, translation necessary -- let the underlying functions write directly into the Fortran status */ -#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER == SIZEOF_INT c_status = (MPI_Status *) status; #else c_status = &c_status2; @@ -90,7 +90,7 @@ void mpi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, c_type, OMPI_FINT_2_INT(*source), OMPI_FINT_2_INT(*tag), c_comm, c_status)); -#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT +#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT if (MPI_STATUS_IGNORE != c_status) { MPI_Status_c2f(c_status, status); } diff --git a/src/op/op_predefined.c b/src/op/op_predefined.c index c45d5683a4..891c872e77 100644 --- a/src/op/op_predefined.c +++ b/src/op/op_predefined.c @@ -43,6 +43,35 @@ } \ } +#define COMPLEX_OP_FUNC_SUM(type_name, type) \ + void ompi_mpi_op_sum_##type_name(void *in, void *out, int *count, \ + MPI_Datatype *dtype) \ + { \ + int i; \ + type *a = (type *) in; \ + type *b = (type *) out; \ + for (i = 0; i < *count; ++i, ++b, ++a) { \ + b->real += a->real; \ + b->imag += a->imag; \ + } \ + } + +#define COMPLEX_OP_FUNC_PROD(type_name, type) \ + void ompi_mpi_op_prod_##type_name(void *in, void *out, int *count, \ + MPI_Datatype *dtype) \ + { \ + int i; \ + type *a = (type *) in; \ + type *b = (type *) out; \ + type temp; \ + for (i = 0; i < *count; ++i, ++b, ++a) { \ + temp.real = a->real * b->real - a->imag * b->imag; \ + temp.imag = a->imag * b->real + a->real * b->imag; \ + *b = temp; \ + } \ + } + + /* * Since all the functions in this file are essentially identical, we * use a macro to substitute in names and types. The core operation @@ -107,14 +136,43 @@ FUNC_FUNC(max, short, short) FUNC_FUNC(max, unsigned_short, unsigned short) FUNC_FUNC(max, unsigned, unsigned) FUNC_FUNC(max, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(max, long_long_int, long long int) +FUNC_FUNC(max, long_long, long long) +FUNC_FUNC(max, unsigned_long_long, unsigned long long) +#endif /* Fortran integer */ FUNC_FUNC(max, fortran_integer, MPI_Fint) +#if OMPI_HAVE_FORTRAN_INTEGER1 +FUNC_FUNC(max, fortran_integer1, ompi_fortran_integer1_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +FUNC_FUNC(max, fortran_integer2, ompi_fortran_integer2_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +FUNC_FUNC(max, fortran_integer4, ompi_fortran_integer4_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +FUNC_FUNC(max, fortran_integer8, ompi_fortran_integer8_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +FUNC_FUNC(max, fortran_integer16, ompi_fortran_integer16_t) +#endif /* Floating point */ FUNC_FUNC(max, float, float) FUNC_FUNC(max, double, double) FUNC_FUNC(max, fortran_real, ompi_fortran_real_t) FUNC_FUNC(max, fortran_double_precision, ompi_fortran_dblprec_t) FUNC_FUNC(max, long_double, long double) +#if OMPI_HAVE_FORTRAN_REAL4 +FUNC_FUNC(max, fortran_real4, ompi_fortran_real4_t) +#endif +#if OMPI_HAVE_FORTRAN_REAL8 +FUNC_FUNC(max, fortran_real8, ompi_fortran_real8_t) +#endif +#if OMPI_HAVE_FORTRAN_REAL16 +FUNC_FUNC(max, fortran_real16, ompi_fortran_real16_t) +#endif /************************************************************************* @@ -130,14 +188,43 @@ FUNC_FUNC(min, short, short) FUNC_FUNC(min, unsigned_short, unsigned short) FUNC_FUNC(min, unsigned, unsigned) FUNC_FUNC(min, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(min, long_long_int, long long int) +FUNC_FUNC(min, long_long, long long) +FUNC_FUNC(min, unsigned_long_long, unsigned long long) +#endif /* Fortran integer */ FUNC_FUNC(min, fortran_integer, MPI_Fint) +#if OMPI_HAVE_FORTRAN_INTEGER1 +FUNC_FUNC(min, fortran_integer1, ompi_fortran_integer1_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +FUNC_FUNC(min, fortran_integer2, ompi_fortran_integer2_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +FUNC_FUNC(min, fortran_integer4, ompi_fortran_integer4_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +FUNC_FUNC(min, fortran_integer8, ompi_fortran_integer8_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +FUNC_FUNC(min, fortran_integer16, ompi_fortran_integer16_t) +#endif /* Floating point */ FUNC_FUNC(min, float, float) FUNC_FUNC(min, double, double) FUNC_FUNC(min, fortran_real, ompi_fortran_real_t) FUNC_FUNC(min, fortran_double_precision, ompi_fortran_dblprec_t) FUNC_FUNC(min, long_double, long double) +#if OMPI_HAVE_FORTRAN_REAL4 +FUNC_FUNC(min, fortran_real4, ompi_fortran_real4_t) +#endif +#if OMPI_HAVE_FORTRAN_REAL8 +FUNC_FUNC(min, fortran_real8, ompi_fortran_real8_t) +#endif +#if OMPI_HAVE_FORTRAN_REAL16 +FUNC_FUNC(min, fortran_real16, ompi_fortran_real16_t) +#endif /************************************************************************* * Sum @@ -150,26 +237,54 @@ OP_FUNC(sum, short, short, +=) OP_FUNC(sum, unsigned_short, unsigned short, +=) OP_FUNC(sum, unsigned, unsigned, +=) OP_FUNC(sum, unsigned_long, unsigned long, +=) +#if HAVE_LONG_LONG +OP_FUNC(sum, long_long_int, long long int, +=) +OP_FUNC(sum, long_long, long long, +=) +OP_FUNC(sum, unsigned_long_long, unsigned long long, +=) +#endif /* Fortran integer */ OP_FUNC(sum, fortran_integer, MPI_Fint, +=) +#if OMPI_HAVE_FORTRAN_INTEGER1 +OP_FUNC(sum, fortran_integer1, ompi_fortran_integer1_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +OP_FUNC(sum, fortran_integer2, ompi_fortran_integer2_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +OP_FUNC(sum, fortran_integer4, ompi_fortran_integer4_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +OP_FUNC(sum, fortran_integer8, ompi_fortran_integer8_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +OP_FUNC(sum, fortran_integer16, ompi_fortran_integer16_t, +=) +#endif /* Floating point */ OP_FUNC(sum, float, float, +=) OP_FUNC(sum, double, double, +=) OP_FUNC(sum, fortran_real, ompi_fortran_real_t, +=) OP_FUNC(sum, fortran_double_precision, ompi_fortran_dblprec_t, +=) OP_FUNC(sum, long_double, long double, +=) +#if OMPI_HAVE_FORTRAN_REAL4 +OP_FUNC(sum, fortran_real4, ompi_fortran_real4_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_REAL8 +OP_FUNC(sum, fortran_real8, ompi_fortran_real8_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_REAL16 +OP_FUNC(sum, fortran_real16, ompi_fortran_real16_t, +=) +#endif /* Complex */ -void ompi_mpi_op_sum_fortran_complex(void *in, void *out, int *count, - MPI_Datatype *dtype) -{ - int i; - ompi_fortran_complex_t *a = (ompi_fortran_complex_t*) in; - ompi_fortran_complex_t *b = (ompi_fortran_complex_t*) out; - for (i = 0; i < *count; ++i, ++b, ++a) { - b->real += a->real; - b->imag += a->imag; - } -} +COMPLEX_OP_FUNC_SUM(fortran_complex, ompi_fortran_complex_t) +#if OMPI_HAVE_FORTRAN_COMPLEX8 +COMPLEX_OP_FUNC_SUM(fortran_complex8, ompi_fortran_complex8_t) +#endif +#if OMPI_HAVE_FORTRAN_COMPLEX16 +COMPLEX_OP_FUNC_SUM(fortran_complex16, ompi_fortran_complex16_t) +#endif +#if OMPI_HAVE_FORTRAN_COMPLEX32 +COMPLEX_OP_FUNC_SUM(fortran_complex32, ompi_fortran_complex32_t) +#endif /************************************************************************* * Product @@ -182,28 +297,54 @@ OP_FUNC(prod, short, short, *=) OP_FUNC(prod, unsigned_short, unsigned short, *=) OP_FUNC(prod, unsigned, unsigned, *=) OP_FUNC(prod, unsigned_long, unsigned long, *=) +#if HAVE_LONG_LONG +OP_FUNC(prod, long_long_int, long long int, +=) +OP_FUNC(prod, long_long, long long, +=) +OP_FUNC(prod, unsigned_long_long, unsigned long long, +=) +#endif /* Fortran integer */ OP_FUNC(prod, fortran_integer, MPI_Fint, *=) +#if OMPI_HAVE_FORTRAN_INTEGER1 +OP_FUNC(prod, fortran_integer1, ompi_fortran_integer1_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +OP_FUNC(prod, fortran_integer2, ompi_fortran_integer2_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +OP_FUNC(prod, fortran_integer4, ompi_fortran_integer4_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +OP_FUNC(prod, fortran_integer8, ompi_fortran_integer8_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +OP_FUNC(prod, fortran_integer16, ompi_fortran_integer16_t, +=) +#endif /* Floating point */ OP_FUNC(prod, float, float, *=) OP_FUNC(prod, double, double, *=) OP_FUNC(prod, fortran_real, ompi_fortran_real_t, *=) OP_FUNC(prod, fortran_double_precision, ompi_fortran_dblprec_t, *=) OP_FUNC(prod, long_double, long double, *=) +#if OMPI_HAVE_FORTRAN_REAL4 +OP_FUNC(prod, fortran_real4, ompi_fortran_real4_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_REAL8 +OP_FUNC(prod, fortran_real8, ompi_fortran_real8_t, +=) +#endif +#if OMPI_HAVE_FORTRAN_REAL16 +OP_FUNC(prod, fortran_real16, ompi_fortran_real16_t, +=) +#endif /* Complex */ -void ompi_mpi_op_prod_fortran_complex(void *in, void *out, int *count, - MPI_Datatype *dtype) -{ - int i; - ompi_fortran_complex_t *a = (ompi_fortran_complex_t*) in; - ompi_fortran_complex_t *b = (ompi_fortran_complex_t*) out; - ompi_fortran_complex_t temp; - for (i = 0; i < *count; ++i, ++a, ++b) { - temp.real = a->real * b->real - a->imag * b->imag; - temp.imag = a->imag * b->real + a->real * b->imag; - *b = temp; - } -} +COMPLEX_OP_FUNC_PROD(fortran_complex, ompi_fortran_complex_t) +#if OMPI_HAVE_FORTRAN_COMPLEX8 +COMPLEX_OP_FUNC_PROD(fortran_complex8, ompi_fortran_complex8_t) +#endif +#if OMPI_HAVE_FORTRAN_COMPLEX16 +COMPLEX_OP_FUNC_PROD(fortran_complex16, ompi_fortran_complex16_t) +#endif +#if OMPI_HAVE_FORTRAN_COMPLEX32 +COMPLEX_OP_FUNC_PROD(fortran_complex32, ompi_fortran_complex32_t) +#endif /************************************************************************* * Logical AND @@ -218,6 +359,11 @@ FUNC_FUNC(land, short, short) FUNC_FUNC(land, unsigned_short, unsigned short) FUNC_FUNC(land, unsigned, unsigned) FUNC_FUNC(land, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(land, long_long_int, long long int) +FUNC_FUNC(land, long_long, long long) +FUNC_FUNC(land, unsigned_long_long, unsigned long long) +#endif /* Logical */ FUNC_FUNC(land, fortran_logical, ompi_fortran_logical_t) @@ -234,6 +380,11 @@ FUNC_FUNC(lor, short, short) FUNC_FUNC(lor, unsigned_short, unsigned short) FUNC_FUNC(lor, unsigned, unsigned) FUNC_FUNC(lor, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(lor, long_long_int, long long int) +FUNC_FUNC(lor, long_long, long long) +FUNC_FUNC(lor, unsigned_long_long, unsigned long long) +#endif /* Logical */ FUNC_FUNC(lor, fortran_logical, ompi_fortran_logical_t) @@ -250,6 +401,11 @@ FUNC_FUNC(lxor, short, short) FUNC_FUNC(lxor, unsigned_short, unsigned short) FUNC_FUNC(lxor, unsigned, unsigned) FUNC_FUNC(lxor, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(lxor, long_long_int, long long int) +FUNC_FUNC(lxor, long_long, long long) +FUNC_FUNC(lxor, unsigned_long_long, unsigned long long) +#endif /* Logical */ FUNC_FUNC(lxor, fortran_logical, ompi_fortran_logical_t) @@ -266,8 +422,28 @@ FUNC_FUNC(band, short, short) FUNC_FUNC(band, unsigned_short, unsigned short) FUNC_FUNC(band, unsigned, unsigned) FUNC_FUNC(band, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(band, long_long_int, long long int) +FUNC_FUNC(band, long_long, long long) +FUNC_FUNC(band, unsigned_long_long, unsigned long long) +#endif /* Fortran integer */ FUNC_FUNC(band, fortran_integer, MPI_Fint) +#if OMPI_HAVE_FORTRAN_INTEGER1 +FUNC_FUNC(band, fortran_integer1, ompi_fortran_integer1_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +FUNC_FUNC(band, fortran_integer2, ompi_fortran_integer2_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +FUNC_FUNC(band, fortran_integer4, ompi_fortran_integer4_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +FUNC_FUNC(band, fortran_integer8, ompi_fortran_integer8_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +FUNC_FUNC(band, fortran_integer16, ompi_fortran_integer16_t) +#endif /* Byte */ FUNC_FUNC(band, byte, char) @@ -284,8 +460,28 @@ FUNC_FUNC(bor, short, short) FUNC_FUNC(bor, unsigned_short, unsigned short) FUNC_FUNC(bor, unsigned, unsigned) FUNC_FUNC(bor, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(bor, long_long_int, long long int) +FUNC_FUNC(bor, long_long, long long) +FUNC_FUNC(bor, unsigned_long_long, unsigned long long) +#endif /* Fortran integer */ FUNC_FUNC(bor, fortran_integer, MPI_Fint) +#if OMPI_HAVE_FORTRAN_INTEGER1 +FUNC_FUNC(bor, fortran_integer1, ompi_fortran_integer1_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +FUNC_FUNC(bor, fortran_integer2, ompi_fortran_integer2_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +FUNC_FUNC(bor, fortran_integer4, ompi_fortran_integer4_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +FUNC_FUNC(bor, fortran_integer8, ompi_fortran_integer8_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +FUNC_FUNC(bor, fortran_integer16, ompi_fortran_integer16_t) +#endif /* Byte */ FUNC_FUNC(bor, byte, char) @@ -302,8 +498,28 @@ FUNC_FUNC(bxor, short, short) FUNC_FUNC(bxor, unsigned_short, unsigned short) FUNC_FUNC(bxor, unsigned, unsigned) FUNC_FUNC(bxor, unsigned_long, unsigned long) +#if HAVE_LONG_LONG +FUNC_FUNC(bxor, long_long_int, long long int) +FUNC_FUNC(bxor, long_long, long long) +FUNC_FUNC(bxor, unsigned_long_long, unsigned long long) +#endif /* Fortran integer */ FUNC_FUNC(bxor, fortran_integer, MPI_Fint) +#if OMPI_HAVE_FORTRAN_INTEGER1 +FUNC_FUNC(bxor, fortran_integer1, ompi_fortran_integer1_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +FUNC_FUNC(bxor, fortran_integer2, ompi_fortran_integer2_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +FUNC_FUNC(bxor, fortran_integer4, ompi_fortran_integer4_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +FUNC_FUNC(bxor, fortran_integer8, ompi_fortran_integer8_t) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +FUNC_FUNC(bxor, fortran_integer16, ompi_fortran_integer16_t) +#endif /* Byte */ FUNC_FUNC(bxor, byte, char) @@ -370,6 +586,15 @@ OP_FUNC(replace, fortran_double_precision, ompi_fortran_dblprec_t, =) OP_FUNC(replace, long_double, long double, =) /* Complex */ OP_FUNC(replace, fortran_complex, ompi_fortran_complex_t, =) +#if OMPI_HAVE_FORTRAN_COMPLEX8 +OP_FUNC(replace, fortran_complex8, ompi_fortran_complex8_t, =) +#endif +#if OMPI_HAVE_FORTRAN_COMPLEX16 +OP_FUNC(replace, fortran_complex16, ompi_fortran_complex16_t, =) +#endif +#if OMPI_HAVE_FORTRAN_COMPLEX32 +OP_FUNC(replace, fortran_complex32, ompi_fortran_complex32_t, =) +#endif /* Byte */ OP_FUNC(replace, byte, char, =) /* Byte */ diff --git a/src/op/op_predefined.h b/src/op/op_predefined.h index 34221c34a7..1ac8a317c7 100644 --- a/src/op/op_predefined.h +++ b/src/op/op_predefined.h @@ -24,32 +24,141 @@ * for the name, use macros to prototype them. */ #define OMPI_OP_PROTO (void *in, void *out, int *count, MPI_Datatype *dtype) -#define OMPI_OP_HANDLER_C_INTEGER(name) \ + +/* C integer */ + +#define OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name) \ void ompi_mpi_op_##name##_int OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_long OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_short OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_unsigned_short OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_unsigned OMPI_OP_PROTO; \ - void ompi_mpi_op_##name##_unsigned_long OMPI_OP_PROTO + void ompi_mpi_op_##name##_unsigned_long OMPI_OP_PROTO; +#if HAVE_LONG_LONG +#define OMPI_OP_HANDLER_C_INTEGER_OPTIONAL(name) \ + void ompi_mpi_op_##name##_long_long_int OMPI_OP_PROTO; \ + void ompi_mpi_op_##name##_long_long OMPI_OP_PROTO; \ + void ompi_mpi_op_##name##_unsigned_long_long OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_C_INTEGER_OPTIONAL(name) +#endif +#define OMPI_OP_HANDLER_C_INTEGER(name) \ + OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name) \ + OMPI_OP_HANDLER_C_INTEGER_OPTIONAL(name) \ +/* Fortran integer */ + +#define OMPI_OP_HANDLER_FORTRAN_INTEGER_INTRINSIC(name) \ + void ompi_mpi_op_##name##_fortran_integer OMPI_OP_PROTO; +#if OMPI_HAVE_FORTRAN_INTEGER1 +#define OMPI_OP_HANDLER_FORTRAN_INTEGER1(name) \ + void ompi_mpi_op_##name##_fortran_integer1 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FORTRAN_INTEGER1(name) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER2 +#define OMPI_OP_HANDLER_FORTRAN_INTEGER2(name) \ + void ompi_mpi_op_##name##_fortran_integer2 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FORTRAN_INTEGER2(name) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER4 +#define OMPI_OP_HANDLER_FORTRAN_INTEGER4(name) \ + void ompi_mpi_op_##name##_fortran_integer4 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FORTRAN_INTEGER4(name) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER8 +#define OMPI_OP_HANDLER_FORTRAN_INTEGER8(name) \ + void ompi_mpi_op_##name##_fortran_integer8 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FORTRAN_INTEGER8(name) +#endif +#if OMPI_HAVE_FORTRAN_INTEGER16 +#define OMPI_OP_HANDLER_FORTRAN_INTEGER16(name) \ + void ompi_mpi_op_##name##_fortran_integer16 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FORTRAN_INTEGER16(name) +#endif #define OMPI_OP_HANDLER_FORTRAN_INTEGER(name) \ - void ompi_mpi_op_##name##_fortran_integer OMPI_OP_PROTO + OMPI_OP_HANDLER_FORTRAN_INTEGER_INTRINSIC(name) \ + OMPI_OP_HANDLER_FORTRAN_INTEGER1(name) \ + OMPI_OP_HANDLER_FORTRAN_INTEGER2(name) \ + OMPI_OP_HANDLER_FORTRAN_INTEGER4(name) \ + OMPI_OP_HANDLER_FORTRAN_INTEGER8(name) \ + OMPI_OP_HANDLER_FORTRAN_INTEGER16(name) -#define OMPI_OP_HANDLER_FLOATING_POINT(name) \ +/* Floating point */ + +#define OMPI_OP_HANDLER_FLOATING_POINT_INTRINSIC(name) \ void ompi_mpi_op_##name##_float OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_double OMPI_OP_PROTO; \ 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 + void ompi_mpi_op_##name##_long_double OMPI_OP_PROTO; +#if OMPI_HAVE_FORTRAN_REAL4 +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name) \ + void ompi_mpi_op_##name##_fortran_real4 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name) +#endif +#if OMPI_HAVE_FORTRAN_REAL8 +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL8(name) \ + void ompi_mpi_op_##name##_fortran_real8 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL8(name) +#endif +#if OMPI_HAVE_FORTRAN_REAL16 +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL16(name) \ + void ompi_mpi_op_##name##_fortran_real16 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_FLOATING_POINT_REAL16(name) +#endif +#define OMPI_OP_HANDLER_FLOATING_POINT(name) \ + OMPI_OP_HANDLER_FLOATING_POINT_INTRINSIC(name) \ + OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name) \ + OMPI_OP_HANDLER_FLOATING_POINT_REAL8(name) \ + OMPI_OP_HANDLER_FLOATING_POINT_REAL16(name) \ + +/* Logical */ #define OMPI_OP_HANDLER_LOGICAL(name) \ - void ompi_mpi_op_##name##_fortran_logical OMPI_OP_PROTO + void ompi_mpi_op_##name##_fortran_logical OMPI_OP_PROTO; +/* Complex */ + +#define OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \ + void ompi_mpi_op_##name##_fortran_complex OMPI_OP_PROTO; +#if OMPI_HAVE_FORTRAN_REAL4 +#define OMPI_OP_HANDLER_COMPLEX8(name) \ + void ompi_mpi_op_##name##_fortran_complex8 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_COMPLEX8(name) +#endif +#if OMPI_HAVE_FORTRAN_REAL8 +#define OMPI_OP_HANDLER_COMPLEX16(name) \ + void ompi_mpi_op_##name##_fortran_complex16 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_COMPLEX16(name) +#endif +#if OMPI_HAVE_FORTRAN_REAL16 +#define OMPI_OP_HANDLER_COMPLEX32(name) \ + void ompi_mpi_op_##name##_fortran_complex32 OMPI_OP_PROTO; +#else +#define OMPI_OP_HANDLER_COMPLEX32(name) +#endif #define OMPI_OP_HANDLER_COMPLEX(name) \ - void ompi_mpi_op_##name##_fortran_complex OMPI_OP_PROTO + OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \ + OMPI_OP_HANDLER_COMPLEX8(name) \ + OMPI_OP_HANDLER_COMPLEX16(name) \ + OMPI_OP_HANDLER_COMPLEX32(name) + +/* Byte */ #define OMPI_OP_HANDLER_BYTE(name) \ - void ompi_mpi_op_##name##_byte OMPI_OP_PROTO + void ompi_mpi_op_##name##_byte OMPI_OP_PROTO; + +/* "2 type" */ #define OMPI_OP_HANDLER_2TYPE(name) \ void ompi_mpi_op_##name##_2real OMPI_OP_PROTO; \ @@ -60,7 +169,7 @@ void ompi_mpi_op_##name##_long_int OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_2int OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_short_int OMPI_OP_PROTO; \ - void ompi_mpi_op_##name##_long_double_int OMPI_OP_PROTO + void ompi_mpi_op_##name##_long_double_int OMPI_OP_PROTO; #if defined(c_plusplus) || defined(__cplusplus) extern "C" { @@ -69,91 +178,91 @@ extern "C" { /** * Handler functions for MPI_MAX */ - OMPI_OP_HANDLER_C_INTEGER(max); - OMPI_OP_HANDLER_FORTRAN_INTEGER(max); - OMPI_OP_HANDLER_FLOATING_POINT(max); + OMPI_OP_HANDLER_C_INTEGER(max) + OMPI_OP_HANDLER_FORTRAN_INTEGER(max) + OMPI_OP_HANDLER_FLOATING_POINT(max) /** * Handler functions for MPI_MIN */ - OMPI_OP_HANDLER_C_INTEGER(min); - OMPI_OP_HANDLER_FORTRAN_INTEGER(min); - OMPI_OP_HANDLER_FLOATING_POINT(min); + OMPI_OP_HANDLER_C_INTEGER(min) + OMPI_OP_HANDLER_FORTRAN_INTEGER(min) + OMPI_OP_HANDLER_FLOATING_POINT(min) /** * Handler functions for MPI_SUM */ - OMPI_OP_HANDLER_C_INTEGER(sum); - OMPI_OP_HANDLER_FORTRAN_INTEGER(sum); - OMPI_OP_HANDLER_FLOATING_POINT(sum); - OMPI_OP_HANDLER_COMPLEX(sum); + OMPI_OP_HANDLER_C_INTEGER(sum) + OMPI_OP_HANDLER_FORTRAN_INTEGER(sum) + OMPI_OP_HANDLER_FLOATING_POINT(sum) + OMPI_OP_HANDLER_COMPLEX(sum) /** * Handler functions for MPI_PROD */ - OMPI_OP_HANDLER_C_INTEGER(prod); - OMPI_OP_HANDLER_FORTRAN_INTEGER(prod); - OMPI_OP_HANDLER_FLOATING_POINT(prod); - OMPI_OP_HANDLER_COMPLEX(prod); + OMPI_OP_HANDLER_C_INTEGER(prod) + OMPI_OP_HANDLER_FORTRAN_INTEGER(prod) + OMPI_OP_HANDLER_FLOATING_POINT(prod) + OMPI_OP_HANDLER_COMPLEX(prod) /** * Handler functions for MPI_LAND */ - OMPI_OP_HANDLER_C_INTEGER(land); - OMPI_OP_HANDLER_LOGICAL(land); + OMPI_OP_HANDLER_C_INTEGER(land) + OMPI_OP_HANDLER_LOGICAL(land) /** * Handler functions for MPI_BAND */ - OMPI_OP_HANDLER_C_INTEGER(band); - OMPI_OP_HANDLER_FORTRAN_INTEGER(band); - OMPI_OP_HANDLER_BYTE(band); + OMPI_OP_HANDLER_C_INTEGER(band) + OMPI_OP_HANDLER_FORTRAN_INTEGER(band) + OMPI_OP_HANDLER_BYTE(band) /** * Handler functions for MPI_LOR */ - OMPI_OP_HANDLER_C_INTEGER(lor); - OMPI_OP_HANDLER_LOGICAL(lor); + OMPI_OP_HANDLER_C_INTEGER(lor) + OMPI_OP_HANDLER_LOGICAL(lor) /** * Handler functions for MPI_BOR */ - OMPI_OP_HANDLER_C_INTEGER(bor); - OMPI_OP_HANDLER_FORTRAN_INTEGER(bor); - OMPI_OP_HANDLER_BYTE(bor); + OMPI_OP_HANDLER_C_INTEGER(bor) + OMPI_OP_HANDLER_FORTRAN_INTEGER(bor) + OMPI_OP_HANDLER_BYTE(bor) /** * Handler functions for MPI_LXOR */ - OMPI_OP_HANDLER_C_INTEGER(lxor); - OMPI_OP_HANDLER_LOGICAL(lxor); + OMPI_OP_HANDLER_C_INTEGER(lxor) + OMPI_OP_HANDLER_LOGICAL(lxor) /** * Handler functions for MPI_BXOR */ - OMPI_OP_HANDLER_C_INTEGER(bxor); - OMPI_OP_HANDLER_FORTRAN_INTEGER(bxor); - OMPI_OP_HANDLER_BYTE(bxor); + OMPI_OP_HANDLER_C_INTEGER(bxor) + OMPI_OP_HANDLER_FORTRAN_INTEGER(bxor) + OMPI_OP_HANDLER_BYTE(bxor) /** * Handler functions for MPI_MAXLOC */ - OMPI_OP_HANDLER_2TYPE(maxloc); + OMPI_OP_HANDLER_2TYPE(maxloc) /** * Handler functions for MPI_MINLOC */ - OMPI_OP_HANDLER_2TYPE(minloc); + OMPI_OP_HANDLER_2TYPE(minloc) /** * Handler functions for MPI_REPLACE (only for MPI_ACCUMULATE) */ - OMPI_OP_HANDLER_C_INTEGER(replace); - OMPI_OP_HANDLER_FORTRAN_INTEGER(replace); - OMPI_OP_HANDLER_FLOATING_POINT(replace); - OMPI_OP_HANDLER_LOGICAL(replace); - OMPI_OP_HANDLER_COMPLEX(replace); - OMPI_OP_HANDLER_BYTE(replace); + OMPI_OP_HANDLER_C_INTEGER(replace) + OMPI_OP_HANDLER_FORTRAN_INTEGER(replace) + OMPI_OP_HANDLER_FLOATING_POINT(replace) + OMPI_OP_HANDLER_LOGICAL(replace) + OMPI_OP_HANDLER_COMPLEX(replace) + OMPI_OP_HANDLER_BYTE(replace) #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/src/tools/ompi_info/param.cc b/src/tools/ompi_info/param.cc index a2aa5db86a..30f8725755 100644 --- a/src/tools/ompi_info/param.cc +++ b/src/tools/ompi_info/param.cc @@ -371,11 +371,36 @@ void ompi_info::do_config(bool want_all) // Will always have the size of Fortran integer out("Fort integer size", "compiler:fortran:sizeof:integer", - OMPI_SIZEOF_FORTRAN_INT); + OMPI_SIZEOF_FORTRAN_INTEGER); // May or may not have the other Fortran sizes if (OMPI_WANT_F77_BINDINGS || OMPI_WANT_F90_BINDINGS) { + out("Fort have integer1", "compiler:fortran:have:integer1", + OMPI_HAVE_FORTRAN_INTEGER1 ? "yes" : "no"); + out("Fort have integer2", "compiler:fortran:have:integer2", + OMPI_HAVE_FORTRAN_INTEGER2 ? "yes" : "no"); + out("Fort have integer4", "compiler:fortran:have:integer4", + OMPI_HAVE_FORTRAN_INTEGER4 ? "yes" : "no"); + out("Fort have integer8", "compiler:fortran:have:integer8", + OMPI_HAVE_FORTRAN_INTEGER8 ? "yes" : "no"); + out("Fort have integer16", "compiler:fortran:have:integer16", + OMPI_HAVE_FORTRAN_INTEGER16 ? "yes" : "no"); + + out("Fort have real4", "compiler:fortran:have:real4", + OMPI_HAVE_FORTRAN_REAL4 ? "yes" : "no"); + out("Fort have real8", "compiler:fortran:have:real8", + OMPI_HAVE_FORTRAN_REAL8 ? "yes" : "no"); + out("Fort have real16", "compiler:fortran:have:real16", + OMPI_HAVE_FORTRAN_REAL16 ? "yes" : "no"); + + out("Fort have complex8", "compiler:fortran:have:complex8", + OMPI_HAVE_FORTRAN_COMPLEX8 ? "yes" : "no"); + out("Fort have complex16", "compiler:fortran:have:complex16", + OMPI_HAVE_FORTRAN_COMPLEX16 ? "yes" : "no"); + out("Fort have complex32", "compiler:fortran:have:complex32", + OMPI_HAVE_FORTRAN_COMPLEX32 ? "yes" : "no"); + out("Fort real size", "compiler:fortran:sizeof:real", OMPI_SIZEOF_FORTRAN_REAL); out("Fort dbl prec size", @@ -388,7 +413,7 @@ void ompi_info::do_config(bool want_all) OMPI_SIZEOF_FORTRAN_REAL); out("Fort integer align", "compiler:fortran:align:integer", - OMPI_ALIGNMENT_FORTRAN_INT); + OMPI_ALIGNMENT_FORTRAN_INTEGER); out("Fort real align", "compiler:fortran:align:real", OMPI_ALIGNMENT_FORTRAN_REAL); out("Fort dbl prec align",