From 514ea9f6cc59bcd6426ec3f524ffdfb4279491e0 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 2 Oct 2014 15:50:21 -0700 Subject: [PATCH 1/2] fortran: fix the MPI_SIZEOF problems in the Fortran interfaces This PR is the union of several commits on master; I squashed them down to a single commit here, for simplicity. Refs open-mpi/ompi#198 --- Makefile.man-page-rules | 11 +- README | 15 +- config/ompi_fortran_check_interface.m4 | 51 ++ config/ompi_fortran_check_iso_fortran_env.m4 | 42 + config/ompi_fortran_check_max_array_rank.m4 | 69 ++ config/ompi_fortran_check_storage_size.m4 | 106 +++ config/ompi_setup_mpi_fortran.m4 | 64 +- ompi/include/Makefile.am | 24 +- ompi/include/mpif.h.in | 3 +- ompi/mpi/fortran/base/Makefile.am | 3 +- ompi/mpi/fortran/base/gen-mpi-sizeof.pl | 225 +++++ ompi/mpi/fortran/mpif-h/Makefile.am | 43 + ompi/mpi/fortran/mpif-h/profile/Makefile.am | 24 +- ompi/mpi/fortran/use-mpi-f08/Makefile.am | 63 +- .../fortran/use-mpi-f08/mpi-f08-sizeof.F90 | 420 --------- ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 | 5 +- .../fortran/use-mpi-ignore-tkr/Makefile.am | 38 +- .../mpi-ignore-tkr-interfaces.h.in | 711 +-------------- .../use-mpi-ignore-tkr/mpi-ignore-tkr.F90 | 2 + ompi/mpi/fortran/use-mpi-tkr/Makefile.am | 36 +- .../fortran/use-mpi-tkr/mpi-f90-interfaces.h | 2 - ompi/mpi/fortran/use-mpi-tkr/mpi_sizeof.f90 | 825 ------------------ ompi/tools/ompi_info/param.c | 22 + 23 files changed, 826 insertions(+), 1978 deletions(-) create mode 100644 config/ompi_fortran_check_interface.m4 create mode 100644 config/ompi_fortran_check_iso_fortran_env.m4 create mode 100644 config/ompi_fortran_check_max_array_rank.m4 create mode 100644 config/ompi_fortran_check_storage_size.m4 create mode 100755 ompi/mpi/fortran/base/gen-mpi-sizeof.pl delete mode 100644 ompi/mpi/fortran/use-mpi-f08/mpi-f08-sizeof.F90 delete mode 100644 ompi/mpi/fortran/use-mpi-tkr/mpi_sizeof.f90 diff --git a/Makefile.man-page-rules b/Makefile.man-page-rules index 4da26a213a..5dce44225f 100644 --- a/Makefile.man-page-rules +++ b/Makefile.man-page-rules @@ -1,5 +1,5 @@ # -*- makefile -*- -# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. # $COPYRIGHT$ # @@ -28,3 +28,12 @@ -e 's/#PACKAGE_VERSION#/@PACKAGE_VERSION@/g' \ -e 's/#OMPI_DATE#/@OMPI_RELEASE_DATE@/g' \ > $@ < $< + +# A little verbosity magic; "make" will show the terse output. "make +# V=1" will show the actual commands used (just like the other +# Automake-generated compilation/linker rules). +V=0 + +OMPI_V_GEN = $(ompi__v_GEN_$V) +ompi__v_GEN_ = $(ompi__v_GEN_$AM_DEFAULT_VERBOSITY) +ompi__v_GEN_0 = @echo " GENERATE" $@; diff --git a/README b/README index 9dc16e4366..6a7933612a 100644 --- a/README +++ b/README @@ -360,7 +360,11 @@ Compiler Notes The following notes apply to the above-listed Fortran bindings: - - All Fortran compilers support the mpif.h/shmem.fh-based bindings. + - All Fortran compilers support the mpif.h/shmem.fh-based bindings, + with one exception: the MPI_SIZEOF interfaces will only be present + when Open MPI is built with a Fortran compiler that support the + INTERFACE keyword and ISO_FORTRAN_ENV. Most notably, this + excludes the GNU Fortran compiler suite before version 4.9. - The level of support provided by the mpi module is based on your Fortran compiler. @@ -381,6 +385,9 @@ Compiler Notes parameter type checking at run-time (e.g., MPI_INIT, MPI_COMM_RANK, etc.). + Similar to the mpif.h interface, MPI_SIZEOF is only supported on + Fortran compilers that support INTERFACE and ISO_FORTRAN_ENV. + - The mpi_f08 module is new and has been tested with the Intel Fortran compiler and gfortran >= v4.9. Other modern Fortran compilers may also work (but are, as yet, only lightly tested). @@ -390,6 +397,12 @@ Compiler Notes features to support the mpi_f08 module. For example, gfortran < v4.9 does provide enough support for the mpi_f08 module. + You can examine the output of the following command to see all + the Fortran features that are/are not enabled in your Open MPI + installation: + + shell$ ompi_info | grep -i fort + General Run-Time Support Notes ------------------------------ diff --git a/config/ompi_fortran_check_interface.m4 b/config/ompi_fortran_check_interface.m4 new file mode 100644 index 0000000000..bc18492b27 --- /dev/null +++ b/config/ompi_fortran_check_interface.m4 @@ -0,0 +1,51 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl University of Stuttgart. All rights reserved. +dnl Copyright (c) 2004-2005 The Regents of the University of California. +dnl All rights reserved. +dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +# Check whether or not the Fortran compiler supports the "interface" +# keyword or not. + +# OMPI_FORTRAN_CHECK_INTERFACE([action if found], +# [action if not found]) +# ---------------------------------------------------- +AC_DEFUN([OMPI_FORTRAN_CHECK_INTERFACE],[ + AS_VAR_PUSHDEF([interface_var], [ompi_cv_fortran_interface]) + + AC_CACHE_CHECK([if Fortran compiler supports INTERFACE], interface_var, + [AC_LANG_PUSH([Fortran]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[MODULE my_module +INTERFACE MPI_Foo +SUBROUTINE inky(a) + DOUBLE PRECISION A +END SUBROUTINE inky +SUBROUTINE blinky(a) + INTEGER A +END SUBROUTINE blinky +END INTERFACE MPI_Foo +END MODULE my_module]])], + [AS_VAR_SET(interface_var, yes)], + [AS_VAR_SET(interface_var, no)]) + touch conftest_foo.mod + rm -rf *.mod 2>/dev/null + AC_LANG_POP([Fortran]) + ]) + + AS_VAR_IF(interface_var, [yes], [$1], [$2]) + AS_VAR_POPDEF([interface_var])dnl +]) diff --git a/config/ompi_fortran_check_iso_fortran_env.m4 b/config/ompi_fortran_check_iso_fortran_env.m4 new file mode 100644 index 0000000000..4b96705898 --- /dev/null +++ b/config/ompi_fortran_check_iso_fortran_env.m4 @@ -0,0 +1,42 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl University of Stuttgart. All rights reserved. +dnl Copyright (c) 2004-2005 The Regents of the University of California. +dnl All rights reserved. +dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +# Check whether or not the Fortran compiler supports iso_fortran_env or not +# +# OMPI_FORTRAN_CHECK_ISO_FORTRAN_ENV([action if found], [action if not found]) +# ---------------------------------------------------- +AC_DEFUN([OMPI_FORTRAN_CHECK_ISO_FORTRAN_ENV],[ + AS_VAR_PUSHDEF([iso_fortran_env_var], [ompi_cv_fortran_have_iso_fortran_env]) + + AC_CACHE_CHECK([if Fortran compiler supports ISO_FORTRAN_ENV], iso_fortran_env_var, + [AC_LANG_PUSH([Fortran]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program check_for_iso_fortran_env + use, intrinsic :: iso_fortran_env + real(real32) :: var + var = 12.34 +end program]])], + [AS_VAR_SET(iso_fortran_env_var, yes)], + [AS_VAR_SET(iso_fortran_env_var, no)]) + AC_LANG_POP([Fortran]) + ]) + + AS_VAR_IF(iso_fortran_env_var, [yes], [$1], [$2]) + AS_VAR_POPDEF([iso_fortran_env_var]) +]) diff --git a/config/ompi_fortran_check_max_array_rank.m4 b/config/ompi_fortran_check_max_array_rank.m4 new file mode 100644 index 0000000000..095b5b4906 --- /dev/null +++ b/config/ompi_fortran_check_max_array_rank.m4 @@ -0,0 +1,69 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl University of Stuttgart. All rights reserved. +dnl Copyright (c) 2004-2005 The Regents of the University of California. +dnl All rights reserved. +dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +# Check the max array rank that the Fortran compiler supports. +# +# OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK +# +# Sets $OMPI_FORTRAN_MAX_ARRAY_RANK, AC_SUBSTs it, and AC_DEFINEs +# OMPI_FORTRAN_MAX_ARRAY_RANK. +# ---------------------------------------------------- +AC_DEFUN([OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK],[ + AS_VAR_PUSHDEF([max_array_rank_var], [ompi_cv_fortran_max_array_rank]) + + OPAL_VAR_SCOPE_PUSH([f_max_rank f_fail f_rank f_i f_dim]) + AC_CACHE_CHECK([max supported Fortran array rank], max_array_rank_var, + [AC_LANG_PUSH([Fortran]) + f_max_rank=0 + f_fail=0 + + # Realistically, this will only be 7 or 15. But what the heck + # -- try them all. Note that we don't test above 15, because + # that's the max value from the F2008 spec (and some compilers + # will let you go above rank=16, e.g., Intel ifort). + for f_rank in 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do + if test $f_fail -eq 0; then + f_i=1 + f_dim=2 + while test `expr $f_i + 1` -le $f_rank; do + f_dim="$f_dim,2" + f_i=`expr $f_i + 1` + done + OPAL_LOG_MSG([testing Fortran dimension $f_rank / $f_dim]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[PROGRAM test_program + INTEGER, DIMENSION($f_dim) :: var + var($f_dim) = 3 +END PROGRAM test_program]])], + [f_max_rank=$f_rank], [f_fail=1]) + fi + done + AS_VAR_SET(max_array_rank_var, $f_max_rank) + AC_LANG_POP([Fortran]) + ]) + + AS_VAR_COPY([OMPI_FORTRAN_MAX_ARRAY_RANK], [max_array_rank_var]) + AC_SUBST(OMPI_FORTRAN_MAX_ARRAY_RANK) + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_MAX_ARRAY_RANK], + [$OMPI_FORTRAN_MAX_ARRAY_RANK], + [Max dimension rank of Fortran arrays]) + + OPAL_VAR_SCOPE_POP + AS_VAR_POPDEF([max_array_rank_var])dnl +]) diff --git a/config/ompi_fortran_check_storage_size.m4 b/config/ompi_fortran_check_storage_size.m4 new file mode 100644 index 0000000000..330ac7ce6e --- /dev/null +++ b/config/ompi_fortran_check_storage_size.m4 @@ -0,0 +1,106 @@ +dnl -*- shell-script -*- +dnl +dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana +dnl University Research and Technology +dnl Corporation. All rights reserved. +dnl Copyright (c) 2004-2005 The University of Tennessee and The University +dnl of Tennessee Research Foundation. All rights +dnl reserved. +dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +dnl University of Stuttgart. All rights reserved. +dnl Copyright (c) 2004-2005 The Regents of the University of California. +dnl All rights reserved. +dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved. +dnl $COPYRIGHT$ +dnl +dnl Additional copyrights may follow +dnl +dnl $HEADER$ +dnl + +# Check whether or not the Fortran compiler supports storage_size() +# for all relevant types or not. E.g., gfortran 4.8 supports +# storage_size() on some types, not but all. +# +# OMPI_FORTRAN_CHECK_STORAGE_SIZE([action if found], [action if not found]) +# ---------------------------------------------------- +AC_DEFUN([OMPI_FORTRAN_CHECK_STORAGE_SIZE],[ + AS_VAR_PUSHDEF([fortran_storage_size_var], [ompi_cv_fortran_have_storage_size]) + + AC_CACHE_CHECK([if Fortran compiler supports STORAGE_SIZE for relevant types], + fortran_storage_size_var, + [AC_LANG_PUSH([Fortran]) + AC_LINK_IFELSE([AC_LANG_SOURCE([[program check_for_storage_size + USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32, INT32 + integer size + complex(real32) :: c32 + complex(real32), dimension(5) :: c32_array + real(real32) :: r32 + real(real32), dimension(5) :: r32_array + integer(int32) :: i32 + integer(int32), dimension(5) :: i32_array + + call storage_size_complex32_scalar(c32, size) + call storage_size_complex32_r1(c32_array, size) + call storage_size_int32_scalar(i32, size) + call storage_size_int32_r1(i32_array, size) + call storage_size_real32_scalar(r32, size) + call storage_size_real32_r1(r32_array, size) +end program + +SUBROUTINE storage_size_complex32_scalar(x, size) + USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32 + COMPLEX(REAL32) ::x + INTEGER, INTENT(OUT) :: size + + size = storage_size(x) / 8 +END SUBROUTINE storage_size_complex32_scalar + +SUBROUTINE storage_size_complex32_r1(x, size) + USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32 + COMPLEX(REAL32), DIMENSION(*)::x + INTEGER, INTENT(OUT) :: size + + size = storage_size(x) / 8 +END SUBROUTINE storage_size_complex32_r1 + +SUBROUTINE storage_size_int32_scalar(x, size) + USE, INTRINSIC :: iso_fortran_env, ONLY: INT32 + INTEGER(INT32) ::x + INTEGER, INTENT(OUT) :: size + + size = storage_size(x) / 8 +END SUBROUTINE storage_size_int32_scalar + +SUBROUTINE storage_size_int32_r1(x, size) + USE, INTRINSIC :: iso_fortran_env, ONLY: INT32 + INTEGER(INT32), DIMENSION(*)::x + INTEGER, INTENT(OUT) :: size + + size = storage_size(x) / 8 +END SUBROUTINE storage_size_int32_r1 + +SUBROUTINE storage_size_real32_scalar(x, size) + USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32 + REAL(REAL32) ::x + INTEGER, INTENT(OUT) :: size + + size = storage_size(x) / 8 +END SUBROUTINE storage_size_real32_scalar + +SUBROUTINE storage_size_real32_r1(x, size) + USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32 + REAL(REAL32), DIMENSION(*)::x + INTEGER, INTENT(OUT) :: size + + size = storage_size(x) / 8 +END SUBROUTINE storage_size_real32_r1 +]])], + [AS_VAR_SET(fortran_storage_size_var, yes)], + [AS_VAR_SET(fortran_storage_size_var, no)]) + AC_LANG_POP([Fortran]) + ]) + + AS_VAR_IF(fortran_storage_size_var, [yes], [$1], [$2]) + AS_VAR_POPDEF([fortran_storage_size_var]) +]) diff --git a/config/ompi_setup_mpi_fortran.m4 b/config/ompi_setup_mpi_fortran.m4 index c38e0f6e29..e0b8c19b2c 100644 --- a/config/ompi_setup_mpi_fortran.m4 +++ b/config/ompi_setup_mpi_fortran.m4 @@ -28,15 +28,22 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ OMPI_BUILD_FORTRAN_USEMPI_BINDINGS=0 OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS=0 + OMPI_FORTRAN_BUILD_SIZEOF=0 + OMPI_FORTRAN_USEMPI_DIR= OMPI_FORTRAN_USEMPI_LIB= OMPI_FORTRAN_USEMPIF08_DIR= OMPI_FORTRAN_USEMPIF08_LIB= + OMPI_FORTRAN_MAX_ARRAY_RANK=0 + + OMPI_FORTRAN_HAVE_INTERFACE=0 OMPI_FORTRAN_HAVE_IGNORE_TKR=0 OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0 OMPI_FORTRAN_HAVE_BIND_C=0 + OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV=0 + OMPI_FORTRAN_HAVE_STORAGE_SIZE=0 OMPI_FORTRAN_HAVE_ISO_C_BINDING=0 OMPI_FORTRAN_HAVE_BIND_C_SUB=0 OMPI_FORTRAN_HAVE_BIND_C_TYPE=0 @@ -202,6 +209,9 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ # a true value. OMPI_FORTRAN_GET_VALUE_TRUE OMPI_FORTRAN_CHECK_LOGICAL_ARRAY + + # Find out how many array ranks this compiler supports. + OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK # How big should MPI_STATUS_SIZE be? (i.e., the size of # MPI_STATUS, expressed in units of Fortran INTEGERs). The C @@ -246,7 +256,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ OMPI_FORTRAN_GET_KIND_VALUE([C_INT64_T], 18, [OMPI_FORTRAN_C_INT64_T_KIND]) #-------------------------------------------------------- - # This is all we need for the Fortran mpif.h MPI bindings + # Fortran mpif.h MPI bindings #-------------------------------------------------------- AC_MSG_CHECKING([if building Fortran mpif.h bindings]) @@ -254,7 +264,38 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ [AC_MSG_RESULT([yes]) OMPI_BUILD_FORTRAN_MPIFH_BINDINGS=1], [AC_MSG_RESULT([no])]) - + + # "INTERFACE" is needed for MPI_SIZEOF + AS_IF([test $ompi_fortran_happy -eq 1], + [OMPI_FORTRAN_CHECK_INTERFACE( + [OMPI_FORTRAN_HAVE_INTERFACE=1], + [OMPI_FORTRAN_HAVE_INTERFACE=0])]) + AC_SUBST(OMPI_FORTRAN_HAVE_INTERFACE) + + # The iso_fortran_env module is needed for MPI_SIZEOF + AS_IF([test $ompi_fortran_happy -eq 1], + [OMPI_FORTRAN_CHECK_ISO_FORTRAN_ENV( + [OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV=1], + [OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV=0])]) + AC_SUBST(OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV) + + # Ensure that the fortran compiler supports STORAGE_SIZE for + # enough relevant types. + AS_IF([test $ompi_fortran_happy -eq 1], + [OMPI_FORTRAN_CHECK_STORAGE_SIZE( + [OMPI_FORTRAN_HAVE_STORAGE_SIZE=1], + [OMPI_FORTRAN_HAVE_STORAGE_SIZE=0])]) + AC_SUBST(OMPI_FORTRAN_HAVE_STORAGE_SIZE) + + # We need INTERFACE, ISO_FORTRAN_ENV, and STORAGE_SIZE() support + # to build MPI_SIZEOF support + AS_IF([test $OMPI_FORTRAN_HAVE_INTERFACE -eq 1 && \ + test $OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV -eq 1 && \ + test $OMPI_FORTRAN_HAVE_STORAGE_SIZE -eq 1], + [OMPI_FORTRAN_BUILD_SIZEOF=1], + [OMPI_FORTRAN_BUILD_SIZEOF=0]) + AC_SUBST(OMPI_FORTRAN_BUILD_SIZEOF) + #-------------------------------------------- # Fortran use mpi or use mpi_f08 MPI bindings #-------------------------------------------- @@ -514,6 +555,25 @@ end type test_mpi_handle], AC_DEFINE_UNQUOTED(OMPI_FC_ABSOLUTE, ["$OMPI_FC_ABSOLUTE"], [Absolutey path to the underlying Fortran compiler found by configure]) + # These go into ompi/info/param.c + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_BUILD_SIZEOF], + [$OMPI_FORTRAN_BUILD_SIZEOF], + [Whether the mpif.h interface supports the MPI_SIZEOF interface or not]) + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_INTERFACE], + [$OMPI_FORTRAN_HAVE_INTERFACE], + [Whether the compiler supports INTERFACE or not]) + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV], + [$OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV], + [Whether the compiler supports ISO_FORTRAN_ENV or not]) + AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_STORAGE_SIZE], + [$OMPI_FORTRAN_HAVE_STORAGE_SIZE], + [Whether the compiler supports STORAGE_SIZE on relevant types]) + + # This conditional is used to determine whether we compile the + # various .f90 files that contain MPI_SIZEOF implementations. + AM_CONDITIONAL([BUILD_FORTRAN_SIZEOF], + [test $OMPI_FORTRAN_BUILD_SIZEOF -eq 1]) + # There are 2 layers to the MPI mpif.h layer. The only extra thing # that determine mpif.h bindings is that fortran can be disabled # by user. In such cases, we need to not build the target at all. diff --git a/ompi/include/Makefile.am b/ompi/include/Makefile.am index e77eef5920..c38eb47972 100644 --- a/ompi/include/Makefile.am +++ b/ompi/include/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved. # Copyright (c) 2014 Research Organization for Information Science # and Technology (RIST). All rights reserved. @@ -50,6 +50,7 @@ nodist_include_HEADERS = \ mpi-ext.h \ mpif.h \ mpif-ext.h \ + mpif-sizeof.h \ mpi_portable_platform.h if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS @@ -70,16 +71,35 @@ include ompi/Makefile.am EXTRA_DIST = $(headers) mpif-values.pl +# +# mpif-sizeof.h is generated based on some results from configure tests. +# + +sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl +mpif-sizeof.h: $(top_builddir)/config.status +mpif-sizeof.h: $(sizeof_pl) +mpif-sizeof.h: + $(OMPI_V_GEN) $(sizeof_pl) \ + --header=$@ --ierror=mandatory \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + if WANT_INSTALL_HEADERS ompidir = $(ompiincludedir) nobase_dist_ompi_HEADERS = $(headers) nobase_nodist_ompi_HEADERS = $(nodist_headers) endif +# +# Clean up the generated file +# + +CLEANFILES = mpif-sizeof.f90 + # Remove the auto-generated files (they are generated by configure) # Since there is no mpi-ext.h.in, autogen does not know to cleanup this file. distclean-local: - rm -f mpi-ext.h mpif-ext.h mpi_portable_platform.h + rm -f mpi-ext.h mpif-ext.h mpi_portable_platform.h mpif-sizeof.h mpi_portable_platform.h: $(top_srcdir)/opal/include/opal/opal_portable_platform.h $(LN_S) $(top_srcdir)/opal/include/opal/opal_portable_platform.h mpi_portable_platform.h diff --git a/ompi/include/mpif.h.in b/ompi/include/mpif.h.in index e6c7ede71b..d9b825e4b3 100644 --- a/ompi/include/mpif.h.in +++ b/ompi/include/mpif.h.in @@ -10,7 +10,7 @@ ! University of Stuttgart. All rights reserved. ! Copyright (c) 2004-2005 The Regents of the University of California. ! All rights reserved. -! Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. ! $COPYRIGHT$ ! ! Additional copyrights may follow @@ -58,3 +58,4 @@ @OMPI_MPIF_IO_HANDLES_INCLUDE@ include 'mpif-externals.h' include 'mpif-sentinels.h' + include 'mpif-sizeof.h' diff --git a/ompi/mpi/fortran/base/Makefile.am b/ompi/mpi/fortran/base/Makefile.am index 7c2e63ead2..bb7a9c233c 100644 --- a/ompi/mpi/fortran/base/Makefile.am +++ b/ompi/mpi/fortran/base/Makefile.am @@ -21,7 +21,8 @@ noinst_LTLIBRARIES = EXTRA_DIST = \ attr-fn-int-callback-interfaces.h \ - conversion-fn-null-int-interface.h + conversion-fn-null-int-interface.h \ + gen-mpi-sizeof.pl #----------------------------------------------------------------------------- diff --git a/ompi/mpi/fortran/base/gen-mpi-sizeof.pl b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl new file mode 100755 index 0000000000..797c42b327 --- /dev/null +++ b/ompi/mpi/fortran/base/gen-mpi-sizeof.pl @@ -0,0 +1,225 @@ +#!/usr/bin/env perl +# +# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Script to generate the overloaded MPI_SIZEOF interfaces and +# subroutine bodies for both the mpi and mpi_f08 modules. +# +# This script won't really be necessary (i.e., be a whole lot simpler) +# when Fortran compilers uniformly supprort TS 29113 -- i.e., they +# support dimension(..). Using dimension(..), you can have just *one* +# procedure for every type, and dimension(..) will resolve to both +# scalars and all possible ranks. +# +# But for the meantime, we generate for all ranks so that we support +# as many compilers as possible. :-\ (we don't check the compiler and +# see if it supports dimension(..) and do a different generation based +# on that, because we already have a zillion different options in the +# Fortran support -- let's just do MPI_Sizeof this one way in the name +# of simplicity...). +# + +use strict; + +use Getopt::Long; + +my $header_arg; +my $impl_arg; +my $ierror_arg; +my $maxrank_arg; +my $generate_arg; +my $mpi_arg; +my $pmpi_arg; +my $help_arg = 0; + +&Getopt::Long::Configure("bundling"); +my $ok = Getopt::Long::GetOptions("header=s" => \$header_arg, + "impl=s" => \$impl_arg, + "ierror=s" => \$ierror_arg, + "maxrank=s" => \$maxrank_arg, + "generate=i" => \$generate_arg, + "mpi" => \$mpi_arg, + "pmpi" => \$pmpi_arg, + "help|h" => \$help_arg); + +die "Must specify header and/or impl filenames to output" + if (!defined($header_arg) && !defined($impl_arg)); +die "ierror handling must be optional or mandatory" + if (defined($generate_arg) && $generate_arg && + (lc($ierror_arg) ne "optional" && lc($ierror_arg) ne "mandatory")); +die "max array rank must be >= 4 and <=15" + if (defined($generate_arg) && $generate_arg && + (!defined($maxrank_arg) || $maxrank_arg < 4 || $maxrank_arg > 15)); +die "Must specify --pmpi and/or --mpi if --impl is specified" + if (defined($generate_arg) && $generate_arg && + (defined($impl_arg) && !defined($mpi_arg) && !defined($pmpi_arg))); + +############################################################################# + +my $optional_ierror_param; +my $optional_ierror_statement; +if (lc($ierror_arg) eq "optional") { + $optional_ierror_param = ", OPTIONAL"; + $optional_ierror_statement = "IF (present(ierror)) "; +} + +my $indent = " "; + +############################################################################# + +my $subs; + +sub queue_sub { + my ($f_type, $suffix, $import_type) = @_; + + # Leave off the MPI/PMI prefix; we'll add that when outputting + my $sub_name = "Sizeof_$suffix"; + + # Make a hash for this subroutine + my $subr; + $subr->{name} = $sub_name; + my $start = "${indent}SUBROUTINE ^PREFIX^$sub_name^RANK^(x, size, ierror)\n"; + $start .= "${indent} USE, INTRINSIC :: iso_fortran_env, ONLY: " . uc($import_type) . "\n" + if (defined($import_type)); + # For long type names and large ranks, this first line gets very + # long and only narrowly squeezed in before 72 columns. Use no + # whitespace. + $start .= $indent . uc($f_type) . "^DIMENSION^::x +${indent} INTEGER, INTENT(OUT) :: size +${indent} INTEGER$optional_ierror_param, INTENT(OUT) :: ierror"; + $subr->{start} = $start; + $subr->{middle} = "${indent} size = storage_size(x) / 8 +${indent} ${optional_ierror_statement}ierror = 0"; + $subr->{end} = "${indent}END SUBROUTINE ^PREFIX^$sub_name^RANK^"; + + # Save it in the overall hash + $subs->{$sub_name} = $subr; +} + +sub generate { + my ($prefix, $sub_name, $rank, $want_body) = @_; + + my $subr; + # Deep copy + %{$subr} = %{$subs->{$sub_name}}; + + # Make the initial version + my $str = $subr->{start} . "\n"; + $str .= "\n" . $subr->{middle} . "\n" + if ($want_body); + $str .= $subr->{end} . "\n"; + + # Substitute in the relevant parameters + $str =~ s/\^PREFIX\^/$prefix/g; + + # If rank is 0, generate a scalar version. Otherwise, generate an + # array version. + if (0 == $rank) { + $str =~ s/\^RANK\^/_scalar/g; + $str =~ s/\^DIMENSION\^//; + } else { + $str =~ s/\^RANK\^/_r$rank/g; + my $dim; + my $d = $rank; + while ($d > 1) { + $dim .= "1,"; + --$d; + } + $str =~ s/\^DIMENSION\^/, DIMENSION($dim*)/; + } + + # All done + return $str; +} + +############################################################################# +# Main +############################################################################# + +for my $size (qw/8 16 32 64/) { + queue_sub("integer(int${size})", "int${size}", "int${size}"); +} +for my $size (qw/32 64 128/) { + queue_sub("real(real${size})", "real${size}", "real${size}"); + queue_sub("complex(real${size})", "complex${size}", "real${size}"); +} + +####################################################### + +sub output_content { + my ($prefix, $want_bodies) = @_; + + print OUT "${indent}INTERFACE ${prefix}Sizeof\n\n" + if (!$want_bodies); + + # Print all the module procedure lines + foreach my $sub_name (sort(keys(%{$subs}))) { + my $rank = 0; + while ($rank <= $maxrank_arg) { + my $str = generate($prefix, $sub_name, $rank, $want_bodies); + print OUT $str . "\n"; + ++$rank; + } + } + + print OUT "${indent}END INTERFACE ${prefix}Sizeof\n\n" + if (!$want_bodies); +} + +# Output each file +sub output_file { + my ($filename, $want_bodies) = @_; + + unlink($filename); + open(OUT, ">$filename") || die "Can't open $filename for writing"; + print OUT "! -*- f90 -*- +! WARNING: This is a generated file! Edits will be lost! +! +! Copyright (c) 2014 Cisco Systems, Inc. All rights reserved. +! \$COPYRIGHT\$ +! +! This file was generated by gen-mpi-sizeof.pl for all the MPI_SIZEOF +! interface possibilities for intrinsic types. Once TS 29113 is +! supported in all compilers, we can simply have *one* procedure for +! each type and use dimension(..) to indicate scalars+all array ranks. +! But until more compilers support this, we simply generate a +! procedure for scalars and all possible ranks in an attempt to +! support lots of Fortran compilers.\n\n"; + + # Only output if the generate arg is 0. Otherwise, output an + # empty .h file (that is still safe to include by mpif.h, but + # won't include the MPI_SIZEOF interface block). + if ($generate_arg) { + output_content("MPI_", $want_bodies) + if (!$want_bodies || + ($want_bodies && $mpi_arg)); + output_content("PMPI_", $want_bodies) + if (!$want_bodies || + ($want_bodies && $pmpi_arg)); + } else { + print OUT "! *** ATTENTION! +! +! Sad panda. +! +! This compiler does not support the Right Stuff to enable MPI_SIZEOF. +! Specifically: we need support for the INTERFACE keyword, +! ISO_FORTRAN_ENV, and the STORAGE_SIZE() intrinsic on all types. +! Apparently, this compiler does not support both of those things, so +! this file will be blank (i.e., we didn't bother generating the +! necessary stuff for MPI_SIZEOF because the compiler doesn't support +! it). +! +! If you want support for MPI_SIZEOF, please use a different Fortran +! compiler to build Open MPI.\n\n"; + } + + close(OUT); +} + +output_file($header_arg, 0) + if (defined($header_arg)); +output_file($impl_arg, 1) + if (defined($impl_arg)); + +exit(0); diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index 5e3db4519c..83f3f2ca86 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -21,6 +21,8 @@ # $HEADER$ # +include $(top_srcdir)/Makefile.man-page-rules + SUBDIRS = profile # @@ -50,6 +52,7 @@ AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1 # lib_LTLIBRARIES = +CLEANFILES = libmpi_mpifh_la_LIBADD = $(top_builddir)/ompi/libmpi.la $(OMPI_MPIEXT_MPIFH_LIBS) libmpi_mpifh_la_LDFLAGS = -version-info $(libmpi_mpifh_so_version) @@ -75,6 +78,46 @@ headers = \ # libmpi_mpifh_la_SOURCES = +# sizeof_f.f90 is generated based on some results from configure tests. +CLEANFILES += sizeof_f.f90 + +# If we're building the MPI_SIZEOF interfaces, generate the source +# code in sizeof_f.f90 (via a perl script). Normally, we'd just add +# sizeof_f.f90 to the libmpi_mpif_la_SOURCES and be done with it. +# However, since this is the first *actual Fortran* source that we've +# added to libmpi_mpif_la_SOURCEs, this causes Libtool to use the +# *Fortran* linker to create the final libmpi_mpif.la library +# (vs. using the C linker, as it has done for years). This exposes an +# unfortunate bug in the Absoft linker: it does not honor the order of +# -Wl arguments, which basically causes the resulting libmpi_mpif.so +# to be borked. +# +# To get around this, we compile sizeof_f.f90 into its own LT +# convenience library, and then we LIBADD that convenience library +# into the main libmpi_mpifh.la. In this way, we basically trick +# Libtool into still using the C linker to create libmpi_mpif.la, and +# our -Wl flags therefore don't get re-ordered. +# +# All this being said, we can't rely on Automake/Libtool not figuring +# out this workaround indefinitely. So Jeff advised Absoft to fix +# this bug in Sep 2014. +noinst_LTLIBRARIES= +if BUILD_FORTRAN_SIZEOF +noinst_LTLIBRARIES += libmpi_mpifh_sizeof.la +libmpi_mpifh_sizeof_la_SOURCES = sizeof_f.f90 +libmpi_mpifh_la_LIBADD += libmpi_mpifh_sizeof.la +endif + +sizeof_pl = $(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl + +sizeof_f.f90: $(top_builddir)/config.status +sizeof_f.f90: $(sizeof_pl) +sizeof_f.f90: + $(OMPI_V_GEN) $(sizeof_pl) \ + --impl=$@ --ierror=mandatory --mpi \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + if BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER libmpi_mpifh_la_SOURCES += \ abort_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 6636ce6985..25e2689863 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -47,7 +47,7 @@ endif headers = \ defines.h -nodist_libmpi_mpifh_pmpi_la_SOURCES = \ +linked_files = \ pabort_f.c \ padd_error_class_f.c \ padd_error_code_f.c \ @@ -348,7 +348,7 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ if OMPI_PROVIDE_MPI_FILE_INTERFACE -nodist_libmpi_mpifh_pmpi_la_SOURCES += \ +linked_files += \ pfile_call_errhandler_f.c \ pfile_close_f.c \ pfile_create_errhandler_f.c \ @@ -410,12 +410,30 @@ endif # # Sym link in the sources from the real MPI directory # -$(nodist_libmpi_mpifh_pmpi_la_SOURCES): +$(linked_files): $(OMPI_V_LN_S) if test ! -r $@ ; then \ pname=`echo $@ | cut -b '2-'` ; \ $(LN_S) $(top_srcdir)/ompi/mpi/fortran/mpif-h/$$pname $@ ; \ fi +# psizeof_f.f90 is generated based on some results from configure tests. +CLEANFILES += psizeof_f.f90 +sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl +psizeof_f.f90: $(top_builddir)/config.status +psizeof_f.f90: $(sizeof_pl) +psizeof_f.f90: + $(OMPI_V_GEN) $(sizeof_pl) \ + --impl=$@ --ierror=mandatory --pmpi \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + +# +# The library itself +# +nodist_libmpi_mpifh_pmpi_la_SOURCES = \ + psizeof_f.f90 \ + $(linked_files) + # Conditionally install the header files if WANT_INSTALL_HEADERS diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 739022a291..54bfc6dc32 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -15,6 +15,8 @@ # $HEADER$ # +include $(top_srcdir)/Makefile.man-page-rules + # This Makefile is only relevant if we're building the "use mpi_f08" # MPI bindings. if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS @@ -34,6 +36,46 @@ module_sentinel_file = \ noinst_LTLIBRARIES = $(module_sentinel_file) +mpi-f08.lo: $(module_sentinel_file) +mpi-f08.lo: mpi-f08.F90 +mpi-f08.lo: mpi-f-interfaces-bind.h pmpi-f-interfaces-bind.h +mpi-f08.lo: attr-fn-f08-callback-interfaces.h +mpi-f08.lo: conversion-fn-null-f08-interface.h +mpi-f08.lo: sizeof_f08.h + +# +# *sizeof_f08.* are generated based on some results from +# configure tests. +# + +sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl + +sizeof_f08.h: $(top_builddir)/config.status +sizeof_f08.h: $(sizeof_pl) +sizeof_f08.h: + $(OMPI_V_GEN) $(sizeof_pl) \ + --header=$@ --ierror=optional \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + +sizeof_f08.f90: $(top_builddir)/config.status +sizeof_f08.f90: $(sizeof_pl) +sizeof_f08.f90: + $(OMPI_V_GEN) $(sizeof_pl) \ + --impl=$@ --ierror=optional --mpi \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + +profile/psizeof_f08.f90: $(top_builddir)/config.status +profile/psizeof_f08.f90: $(sizeof_pl) +profile/psizeof_f08.f90: + $(OMPI_V_GEN) $(sizeof_pl) \ + --impl=$@ --ierror=optional --pmpi \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + +CLEANFILES += sizeof_f08.h sizeof_f08.f90 profile/psizeof_f08.f90 + mpi_api_files = \ abort_f08.F90 \ accumulate_f08.F90 \ @@ -729,9 +771,23 @@ libmpi_usempif08_la_SOURCES = \ attr-fn-f08-callback-interfaces.h \ conversion-fn-null-f08-interface.h \ mpi-f08.F90 \ + mpi-f-interfaces-bind.h pmpi-f-interfaces-bind.h \ + attr-fn-f08-callback-interfaces.h \ + conversion-fn-null-f08-interface.h \ constants.h \ constants.c +# These are generated; do not ship them +nodist_libmpi_usempif08_la_SOURCES = + +if BUILD_FORTRAN_SIZEOF +SIZEOF_H = sizeof_f08.h +nodist_libmpi_usempif08_la_SOURCES += \ + sizeof_f08.h \ + sizeof_f08.f90 \ + profile/psizeof_f08.f90 +endif + # # Include the mpi_f08-based MPI extensions in libmpi_usempif08, too. # @@ -754,11 +810,7 @@ pmpi_api_lo_files = $(pmpi_api_files:.F90=.lo) $(mpi_api_lo_files): mpi-f08.lo $(pmpi_api_lo_files): mpi-f08.lo -mpi-f08-sizeof.lo: mpi-f08-sizeof.F90 - -mpi-f08.lo: $(module_sentinel_file) -mpi-f08.lo: mpi-f08-sizeof.lo -mpi-f08.lo: mpi-f08.F90 +mpi-f08.lo: $(module_sentinel_file) $(SIZEOF_H) mpi-f08.lo: mpi-f-interfaces-bind.h pmpi-f-interfaces-bind.h mpi-f08.lo: attr-fn-f08-callback-interfaces.h mpi-f08.lo: conversion-fn-null-f08-interface.h @@ -771,7 +823,6 @@ libforce_usempif08_internal_modules_to_be_built_la_SOURCES = \ mpi-f08-types.F90 \ mpi-f08-interfaces.F90 \ mpi-f08-interfaces-callbacks.F90 \ - mpi-f08-sizeof.F90 \ pmpi-f08-interfaces.F90 config_h = \ diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-sizeof.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-sizeof.F90 deleted file mode 100644 index 2caf2799ed..0000000000 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-sizeof.F90 +++ /dev/null @@ -1,420 +0,0 @@ -! -*- f90 -*- -! -! Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved. -! Copyright (c) 2009-2012 Los Alamos National Security, LLC. -! All rights reserved. -! -! $COPYRIGHT$ -! -! Additional copyrights may follow -! -! $HEADER$ -! - -#include "ompi/mpi/fortran/configure-fortran-output.h" - - -MODULE mpi_f08_sizeof - use, intrinsic :: ISO_C_BINDING - -interface MPI_Sizeof - -#if OMPI_HAVE_FORTRAN_INTEGER1 - module procedure MPI_Sizeof_integer_s_1, MPI_Sizeof_integer_a_1 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER2 - module procedure MPI_Sizeof_integer_s_2, MPI_Sizeof_integer_a_2 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER4 - module procedure MPI_Sizeof_integer_s_4, MPI_Sizeof_integer_a_4 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER8 - module procedure MPI_Sizeof_integer_s_8, MPI_Sizeof_integer_a_8 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER16 - module procedure MPI_Sizeof_integer_s_16, MPI_Sizeof_integer_a_16 -#endif - -#if OMPI_HAVE_FORTRAN_REAL2 - module procedure MPI_Sizeof_real_s_2, MPI_Sizeof_real_a_2 -#endif - -#if OMPI_HAVE_FORTRAN_REAL4 - module procedure MPI_Sizeof_real_s_4, MPI_Sizeof_real_a_4 -#endif - -#if OMPI_HAVE_FORTRAN_REAL8 - module procedure MPI_Sizeof_real_s_8, MPI_Sizeof_real_a_8 -#endif - -#if OMPI_HAVE_FORTRAN_REAL16 - module procedure MPI_Sizeof_real_s_16, MPI_Sizeof_real_a_16 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX4 - module procedure MPI_Sizeof_complex_s_4, MPI_Sizeof_complex_a_4 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX8 - module procedure MPI_Sizeof_complex_s_8, MPI_Sizeof_complex_a_8 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX16 - module procedure MPI_Sizeof_complex_s_16, MPI_Sizeof_complex_a_16 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX32 - module procedure MPI_Sizeof_complex_s_32, MPI_Sizeof_complex_a_32 -#endif - -end interface MPI_Sizeof - - -CONTAINS - - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! Sizes of integers -! - -#if OMPI_HAVE_FORTRAN_INTEGER1 - subroutine MPI_Sizeof_integer_s_1(x, size, ierror) - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER1), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER1 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_s_1 - - subroutine MPI_Sizeof_integer_a_1(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER1), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER1 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_a_1 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER2 - subroutine MPI_Sizeof_integer_s_2(x, size, ierror) - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER2), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER2 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_s_2 - - subroutine MPI_Sizeof_integer_a_2(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER2), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER2 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_a_2 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER4 - subroutine MPI_Sizeof_integer_s_4(x, size, ierror) - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER4), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER4 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_s_4 - - subroutine MPI_Sizeof_integer_a_4(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER4), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER4 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_a_4 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER8 - subroutine MPI_Sizeof_integer_s_8(x, size, ierror) - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER8), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER8 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_s_8 - - subroutine MPI_Sizeof_integer_a_8(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER8), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER8 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_a_8 -#endif - -#if OMPI_HAVE_FORTRAN_INTEGER16 - subroutine MPI_Sizeof_integer_s_16(x, size, ierror) - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER16), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER16 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_s_16 - - subroutine MPI_Sizeof_integer_a_16(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - INTEGER(KIND=OMPI_KIND_FORTRAN_INTEGER16), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_INTEGER16 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_integer_a_16 -#endif - - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! Sizes of reals -! - -#if OMPI_HAVE_FORTRAN_REAL2 - subroutine MPI_Sizeof_real_s_2(x, size, ierror) - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL2), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL2 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_s_2 - - subroutine MPI_Sizeof_real_a_2(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL2), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL2 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_a_2 -#endif - -#if OMPI_HAVE_FORTRAN_REAL4 - subroutine MPI_Sizeof_real_s_4(x, size, ierror) - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL4), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL4 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_s_4 - - subroutine MPI_Sizeof_real_a_4(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL4), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL4 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_a_4 -#endif - -#if OMPI_HAVE_FORTRAN_REAL8 - subroutine MPI_Sizeof_real_s_8(x, size, ierror) - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL8), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL8 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_s_8 - - subroutine MPI_Sizeof_real_a_8(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL8), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL8 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_a_8 -#endif - -#if OMPI_HAVE_FORTRAN_REAL16 - subroutine MPI_Sizeof_real_s_16(x, size, ierror) - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL16), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL16 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_s_16 - - subroutine MPI_Sizeof_real_a_16(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - REAL(KIND=OMPI_KIND_FORTRAN_REAL16), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_REAL16 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_real_a_16 -#endif - - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! Sizes of complex -! - -#if OMPI_HAVE_FORTRAN_COMPLEX4 - subroutine MPI_Sizeof_complex_s_4(x, size, ierror) - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX4), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX4 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_s_4 - - subroutine MPI_Sizeof_complex_a_4(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX4), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX4 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_a_4 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX8 - subroutine MPI_Sizeof_complex_s_8(x, size, ierror) - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX8), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX8 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_s_8 - - subroutine MPI_Sizeof_complex_a_8(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX8), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX8 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_a_8 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX16 - subroutine MPI_Sizeof_complex_s_16(x, size, ierror) - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX16), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX16 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_s_16 - - subroutine MPI_Sizeof_complex_a_16(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX16), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX16 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_a_16 -#endif - -#if OMPI_HAVE_FORTRAN_COMPLEX32 - subroutine MPI_Sizeof_complex_s_32(x, size, ierror) - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX32), INTENT(IN) :: x - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX32 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_s_32 - - subroutine MPI_Sizeof_complex_a_32(x, size, ierror) - use, intrinsic :: ISO_C_BINDING - implicit none - COMPLEX(KIND=OMPI_KIND_FORTRAN_COMPLEX32), INTENT(IN) :: x(*) - INTEGER, INTENT(OUT) :: size - INTEGER, OPTIONAL, INTENT(OUT) :: ierror - - size = OMPI_SIZEOF_FORTRAN_COMPLEX32 - if (present(ierror)) ierror = 0 - - end subroutine MPI_Sizeof_complex_a_32 -#endif - - -END MODULE mpi_f08_sizeof diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 index 3277d41878..180f4fc84a 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08.F90 @@ -27,7 +27,6 @@ module mpi_f08 use mpi_f08_types use mpi_f08_interfaces ! this module contains the mpi_f08 interface declarations use pmpi_f08_interfaces ! this module contains the pmpi_f08 interface declarations - use mpi_f08_sizeof ! this module from sizeof.F90 ! ! Declaration of the interfaces to the ompi impl files @@ -44,4 +43,8 @@ module mpi_f08 include "conversion-fn-null-f08-interface.h" +! The sizeof interfaces + + include "sizeof_f08.h" + end module mpi_f08 diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am index 872bdf1e24..4226d6e030 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am @@ -9,6 +9,8 @@ # $HEADER$ # +include $(top_srcdir)/Makefile.man-page-rules + # This Makefile is only relevant if we're building the ignore-TKR "use # mpi" MPI bindings. if OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS @@ -27,19 +29,51 @@ mpi-ignore-tkr.lo: $(top_srcdir)/ompi/mpi/fortran/base/attr-fn-int-callback-inte mpi-ignore-tkr.lo: $(top_srcdir)/ompi/mpi/fortran/base/conversion-fn-null-int-interface.h mpi-ignore-tkr.lo: mpi-ignore-tkr-interfaces.h mpi-ignore-tkr.lo: mpi-ignore-tkr-file-interfaces.h +mpi-ignore-tkr.lo: mpi-ignore-tkr-sizeof.h +mpi-ignore-tkr.lo: mpi-ignore-tkr-sizeof.f90 mpi-ignore-tkr.lo: mpi-ignore-tkr.F90 libmpi_usempi_ignore_tkr_la_SOURCES = \ mpi-ignore-tkr.F90 -# These files are generated; do not distribute them nodist_libmpi_usempi_ignore_tkr_la_SOURCES = \ mpi-ignore-tkr-interfaces.h \ mpi-ignore-tkr-file-interfaces.h +if BUILD_FORTRAN_SIZEOF +# These files are generated; do not distribute them +nodist_libmpi_usempi_ignore_tkr_la_SOURCES += \ + mpi-ignore-tkr-sizeof.h \ + mpi-ignore-tkr-sizeof.f90 +endif + +# +# mpi-ignore-tkr-sizeof.* are generated based on some results from +# configure tests. +# + +sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl + +mpi-ignore-tkr-sizeof.h: $(top_builddir)/config.status +mpi-ignore-tkr-sizeof.h: $(sizeof_pl) +mpi-ignore-tkr-sizeof.h: + $(OMPI_V_GEN) $(sizeof_pl) \ + --header=$@ --ierror=mandatory \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + +mpi-ignore-tkr-sizeof.f90: $(top_builddir)/config.status +mpi-ignore-tkr-sizeof.f90: $(sizeof_pl) +mpi-ignore-tkr-sizeof.f90: + $(OMPI_V_GEN) $(sizeof_pl) \ + --impl=$@ --ierror=mandatory --mpi --pmpi \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + # -# Clean up all module files +# Clean up generated and module files # +CLEANFILES += mpi-ignore-tkr-sizeof.h mpi-ignore-tkr-sizeof.f90 MOSTLYCLEANFILES = *.mod # Install the generated .mod files. Unfortunately, each F90 compiler diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 8b2bc240fa..caf6921710 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -1,6 +1,6 @@ ! -*- fortran -*- ! -! Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2007 Los Alamos National Security, LLC. All rights ! reserved. ! Copyright (c) 2012 The University of Tennessee and The University @@ -5812,715 +5812,6 @@ end subroutine PMPI_Sendrecv_replace end interface -interface MPI_Sizeof - -! JMS choice -subroutine MPI_Sizeof(x, size, ierror) - character, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof - - -subroutine MPI_Sizeof0DL(x, size, ierror) - logical, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DL - - -subroutine MPI_Sizeof0DI1(x, size, ierror) - integer*1, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DI1 - - -subroutine MPI_Sizeof0DI2(x, size, ierror) - integer*2, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DI2 - - -subroutine MPI_Sizeof0DI4(x, size, ierror) - integer*4, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DI4 - - -subroutine MPI_Sizeof0DI8(x, size, ierror) - integer*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DI8 - - -subroutine MPI_Sizeof0DR4(x, size, ierror) - real*4, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DR4 - - -subroutine MPI_Sizeof0DR8(x, size, ierror) - real*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DR8 - - -subroutine MPI_Sizeof0DC8(x, size, ierror) - complex*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DC8 - - -subroutine MPI_Sizeof0DC16(x, size, ierror) - complex*16, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof0DC16 - - -subroutine MPI_Sizeof1DCH(x, size, ierror) - character, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DCH - - -subroutine MPI_Sizeof1DL(x, size, ierror) - logical, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DL - - -subroutine MPI_Sizeof1DI1(x, size, ierror) - integer*1, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DI1 - - -subroutine MPI_Sizeof1DI2(x, size, ierror) - integer*2, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DI2 - - -subroutine MPI_Sizeof1DI4(x, size, ierror) - integer*4, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DI4 - - -subroutine MPI_Sizeof1DI8(x, size, ierror) - integer*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DI8 - - -subroutine MPI_Sizeof1DR4(x, size, ierror) - real*4, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DR4 - - -subroutine MPI_Sizeof1DR8(x, size, ierror) - real*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DR8 - - -subroutine MPI_Sizeof1DC8(x, size, ierror) - complex*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DC8 - - -subroutine MPI_Sizeof1DC16(x, size, ierror) - complex*16, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof1DC16 - - -subroutine MPI_Sizeof2DCH(x, size, ierror) - character, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DCH - - -subroutine MPI_Sizeof2DL(x, size, ierror) - logical, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DL - - -subroutine MPI_Sizeof2DI1(x, size, ierror) - integer*1, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DI1 - - -subroutine MPI_Sizeof2DI2(x, size, ierror) - integer*2, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DI2 - - -subroutine MPI_Sizeof2DI4(x, size, ierror) - integer*4, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DI4 - - -subroutine MPI_Sizeof2DI8(x, size, ierror) - integer*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DI8 - - -subroutine MPI_Sizeof2DR4(x, size, ierror) - real*4, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DR4 - - -subroutine MPI_Sizeof2DR8(x, size, ierror) - real*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DR8 - - -subroutine MPI_Sizeof2DC8(x, size, ierror) - complex*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DC8 - - -subroutine MPI_Sizeof2DC16(x, size, ierror) - complex*16, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof2DC16 - - -subroutine MPI_Sizeof3DCH(x, size, ierror) - character, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DCH - - -subroutine MPI_Sizeof3DL(x, size, ierror) - logical, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DL - - -subroutine MPI_Sizeof3DI1(x, size, ierror) - integer*1, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DI1 - - -subroutine MPI_Sizeof3DI2(x, size, ierror) - integer*2, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DI2 - - -subroutine MPI_Sizeof3DI4(x, size, ierror) - integer*4, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DI4 - - -subroutine MPI_Sizeof3DI8(x, size, ierror) - integer*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DI8 - - -subroutine MPI_Sizeof3DR4(x, size, ierror) - real*4, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DR4 - - -subroutine MPI_Sizeof3DR8(x, size, ierror) - real*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DR8 - - -subroutine MPI_Sizeof3DC8(x, size, ierror) - complex*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DC8 - - -subroutine MPI_Sizeof3DC16(x, size, ierror) - complex*16, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof3DC16 - - -subroutine MPI_Sizeof4DCH(x, size, ierror) - character, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DCH - - -subroutine MPI_Sizeof4DL(x, size, ierror) - logical, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DL - - -subroutine MPI_Sizeof4DI1(x, size, ierror) - integer*1, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DI1 - - -subroutine MPI_Sizeof4DI2(x, size, ierror) - integer*2, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DI2 - - -subroutine MPI_Sizeof4DI4(x, size, ierror) - integer*4, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DI4 - - -subroutine MPI_Sizeof4DI8(x, size, ierror) - integer*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DI8 - - -subroutine MPI_Sizeof4DR4(x, size, ierror) - real*4, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DR4 - - -subroutine MPI_Sizeof4DR8(x, size, ierror) - real*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DR8 - - -subroutine MPI_Sizeof4DC8(x, size, ierror) - complex*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DC8 - - -subroutine MPI_Sizeof4DC16(x, size, ierror) - complex*16, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine MPI_Sizeof4DC16 - -end interface - -interface PMPI_Sizeof - -! JMS choice -subroutine PMPI_Sizeof(x, size, ierror) - character, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof - - -subroutine PMPI_Sizeof0DL(x, size, ierror) - logical, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DL - - -subroutine PMPI_Sizeof0DI1(x, size, ierror) - integer*1, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DI1 - - -subroutine PMPI_Sizeof0DI2(x, size, ierror) - integer*2, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DI2 - - -subroutine PMPI_Sizeof0DI4(x, size, ierror) - integer*4, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DI4 - - -subroutine PMPI_Sizeof0DI8(x, size, ierror) - integer*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DI8 - - -subroutine PMPI_Sizeof0DR4(x, size, ierror) - real*4, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DR4 - - -subroutine PMPI_Sizeof0DR8(x, size, ierror) - real*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DR8 - - -subroutine PMPI_Sizeof0DC8(x, size, ierror) - complex*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DC8 - - -subroutine PMPI_Sizeof0DC16(x, size, ierror) - complex*16, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof0DC16 - - -subroutine PMPI_Sizeof1DCH(x, size, ierror) - character, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DCH - - -subroutine PMPI_Sizeof1DL(x, size, ierror) - logical, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DL - - -subroutine PMPI_Sizeof1DI1(x, size, ierror) - integer*1, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DI1 - - -subroutine PMPI_Sizeof1DI2(x, size, ierror) - integer*2, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DI2 - - -subroutine PMPI_Sizeof1DI4(x, size, ierror) - integer*4, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DI4 - - -subroutine PMPI_Sizeof1DI8(x, size, ierror) - integer*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DI8 - - -subroutine PMPI_Sizeof1DR4(x, size, ierror) - real*4, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DR4 - - -subroutine PMPI_Sizeof1DR8(x, size, ierror) - real*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DR8 - - -subroutine PMPI_Sizeof1DC8(x, size, ierror) - complex*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DC8 - - -subroutine PMPI_Sizeof1DC16(x, size, ierror) - complex*16, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof1DC16 - - -subroutine PMPI_Sizeof2DCH(x, size, ierror) - character, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DCH - - -subroutine PMPI_Sizeof2DL(x, size, ierror) - logical, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DL - - -subroutine PMPI_Sizeof2DI1(x, size, ierror) - integer*1, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DI1 - - -subroutine PMPI_Sizeof2DI2(x, size, ierror) - integer*2, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DI2 - - -subroutine PMPI_Sizeof2DI4(x, size, ierror) - integer*4, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DI4 - - -subroutine PMPI_Sizeof2DI8(x, size, ierror) - integer*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DI8 - - -subroutine PMPI_Sizeof2DR4(x, size, ierror) - real*4, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DR4 - - -subroutine PMPI_Sizeof2DR8(x, size, ierror) - real*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DR8 - - -subroutine PMPI_Sizeof2DC8(x, size, ierror) - complex*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DC8 - - -subroutine PMPI_Sizeof2DC16(x, size, ierror) - complex*16, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof2DC16 - - -subroutine PMPI_Sizeof3DCH(x, size, ierror) - character, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DCH - - -subroutine PMPI_Sizeof3DL(x, size, ierror) - logical, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DL - - -subroutine PMPI_Sizeof3DI1(x, size, ierror) - integer*1, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DI1 - - -subroutine PMPI_Sizeof3DI2(x, size, ierror) - integer*2, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DI2 - - -subroutine PMPI_Sizeof3DI4(x, size, ierror) - integer*4, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DI4 - - -subroutine PMPI_Sizeof3DI8(x, size, ierror) - integer*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DI8 - - -subroutine PMPI_Sizeof3DR4(x, size, ierror) - real*4, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DR4 - - -subroutine PMPI_Sizeof3DR8(x, size, ierror) - real*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DR8 - - -subroutine PMPI_Sizeof3DC8(x, size, ierror) - complex*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DC8 - - -subroutine PMPI_Sizeof3DC16(x, size, ierror) - complex*16, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof3DC16 - - -subroutine PMPI_Sizeof4DCH(x, size, ierror) - character, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DCH - - -subroutine PMPI_Sizeof4DL(x, size, ierror) - logical, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DL - - -subroutine PMPI_Sizeof4DI1(x, size, ierror) - integer*1, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DI1 - - -subroutine PMPI_Sizeof4DI2(x, size, ierror) - integer*2, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DI2 - - -subroutine PMPI_Sizeof4DI4(x, size, ierror) - integer*4, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DI4 - - -subroutine PMPI_Sizeof4DI8(x, size, ierror) - integer*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DI8 - - -subroutine PMPI_Sizeof4DR4(x, size, ierror) - real*4, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DR4 - - -subroutine PMPI_Sizeof4DR8(x, size, ierror) - real*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DR8 - - -subroutine PMPI_Sizeof4DC8(x, size, ierror) - complex*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DC8 - - -subroutine PMPI_Sizeof4DC16(x, size, ierror) - complex*16, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror -end subroutine PMPI_Sizeof4DC16 - -end interface - - interface MPI_Ssend subroutine MPI_Ssend(buf, count, datatype, dest, tag, & diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 index 05d8a66747..605eddbca3 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr.F90 @@ -46,4 +46,6 @@ module mpi include "ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h" #endif + include 'mpi-ignore-tkr-sizeof.h' + end module mpi diff --git a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am index cdceeb6bd9..549ac1d4a5 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-tkr/Makefile.am @@ -22,6 +22,8 @@ # $HEADER$ # +include $(top_srcdir)/Makefile.man-page-rules + # THIS MAKEFILE IS OLD AND ONLY TO SUPPORT FORTRAN COMPILERS THAT DO # NOT SUPPORT "IGNORE TKR" FUNCTIONALITY (i.e., gfortran before v4.9). # All other Fortran compilers support ignore TKR and don't compile @@ -66,7 +68,6 @@ mpi.lo: mpi-f90-cptr-interfaces.F90 libmpi_usempi_la_SOURCES = \ mpi.F90 \ mpi_comm_spawn_multiple_f90.f90 \ - mpi_sizeof.f90 \ mpi_testall_f90.f90 \ mpi_testsome_f90.f90 \ mpi_waitall_f90.f90 \ @@ -76,15 +77,48 @@ libmpi_usempi_la_SOURCES = \ libmpi_usempi_la_LIBADD = \ $(top_builddir)/ompi/mpi/fortran/mpif-h/libmpi_mpifh.la +# Don't distribute mpi-tkr-sizeof-*; they're generated. + +nodist_libmpi_usempi_la_SOURCES = +if BUILD_FORTRAN_SIZEOF +nodist_libmpi_usempi_la_SOURCES += \ + mpi-tkr-sizeof.h \ + mpi-tkr-sizeof.f90 +endif + # Set the library version libmpi_usempi_la_LDFLAGS = \ -version-info $(libmpi_usempi_tkr_so_version) \ $(OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS) +# +# mpi-ignore-tkr-sizeof.* are generated based on some results from +# configure tests. +# + +sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl + +mpi-tkr-sizeof.h: $(top_builddir)/config.status +mpi-tkr-sizeof.h: $(sizeof_pl) +mpi-tkr-sizeof.h: + $(OMPI_V_GEN) $(sizeof_pl) \ + --header=$@ --ierror=mandatory \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + +mpi-tkr-sizeof.f90: $(top_builddir)/config.status +mpi-tkr-sizeof.f90: $(sizeof_pl) +mpi-tkr-sizeof.f90: + $(OMPI_V_GEN) $(sizeof_pl) \ + --impl=$@ --ierror=mandatory --mpi --pmpi \ + --maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \ + --generate=$(OMPI_FORTRAN_BUILD_SIZEOF) + # # Clean up all F90 module files and all generated files # +CLEANFILES += mpi-tkr-sizeof.h mpi-tkr-sizeof.f90 MOSTLYCLEANFILES = *.mod DISTCLEANFILES = $(nodist_libmpi_usempi_la_SOURCES) diff --git a/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h b/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h index 4dccb4bf5f..5dcbe1df49 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h +++ b/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h @@ -3458,5 +3458,3 @@ subroutine MPI_Win_flush_local_all(win, ierror) end subroutine MPI_Win_flush_local_all end interface - - diff --git a/ompi/mpi/fortran/use-mpi-tkr/mpi_sizeof.f90 b/ompi/mpi/fortran/use-mpi-tkr/mpi_sizeof.f90 deleted file mode 100644 index 86937d5696..0000000000 --- a/ompi/mpi/fortran/use-mpi-tkr/mpi_sizeof.f90 +++ /dev/null @@ -1,825 +0,0 @@ -! -*- fortran -*- -! -! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana -! University Research and Technology -! Corporation. All rights reserved. -! 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, -! University of Stuttgart. All rights reserved. -! Copyright (c) 2004-2005 The Regents of the University of California. -! All rights reserved. -! Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved. -! $COPYRIGHT$ -! -! Additional copyrights may follow -! -! $HEADER$ -! - -subroutine MPI_Sizeof0DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof0DCH - -subroutine MPI_Sizeof0DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof0DL - -subroutine MPI_Sizeof0DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof0DI1 - -subroutine MPI_Sizeof0DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof0DI2 - -subroutine MPI_Sizeof0DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof0DI4 - -subroutine MPI_Sizeof0DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof0DI8 - -subroutine MPI_Sizeof0DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof0DR4 - -subroutine MPI_Sizeof0DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof0DR8 - -subroutine MPI_Sizeof0DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof0DC8 - -subroutine MPI_Sizeof0DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof0DC16 - -subroutine MPI_Sizeof1DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof1DCH - -subroutine MPI_Sizeof1DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof1DL - -subroutine MPI_Sizeof1DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof1DI1 - -subroutine MPI_Sizeof1DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof1DI2 - -subroutine MPI_Sizeof1DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof1DI4 - -subroutine MPI_Sizeof1DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof1DI8 - -subroutine MPI_Sizeof1DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof1DR4 - -subroutine MPI_Sizeof1DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof1DR8 - -subroutine MPI_Sizeof1DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof1DC8 - -subroutine MPI_Sizeof1DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof1DC16 - - -subroutine MPI_Sizeof2DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof2DCH - -subroutine MPI_Sizeof2DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof2DL - -subroutine MPI_Sizeof2DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof2DI1 - -subroutine MPI_Sizeof2DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof2DI2 - -subroutine MPI_Sizeof2DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof2DI4 - -subroutine MPI_Sizeof2DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof2DI8 - -subroutine MPI_Sizeof2DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof2DR4 - -subroutine MPI_Sizeof2DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof2DR8 - -subroutine MPI_Sizeof2DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof2DC8 - -subroutine MPI_Sizeof2DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof2DC16 - - -subroutine MPI_Sizeof3DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof3DCH - -subroutine MPI_Sizeof3DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof3DL - -subroutine MPI_Sizeof3DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof3DI1 - -subroutine MPI_Sizeof3DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof3DI2 - -subroutine MPI_Sizeof3DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof3DI4 - -subroutine MPI_Sizeof3DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof3DI8 - -subroutine MPI_Sizeof3DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof3DR4 - -subroutine MPI_Sizeof3DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof3DR8 - -subroutine MPI_Sizeof3DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof3DC8 - -subroutine MPI_Sizeof3DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof3DC16 - - -subroutine MPI_Sizeof4DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof4DCH - -subroutine MPI_Sizeof4DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof4DL - -subroutine MPI_Sizeof4DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof4DI1 - -subroutine MPI_Sizeof4DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof4DI2 - -subroutine MPI_Sizeof4DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof4DI4 - -subroutine MPI_Sizeof4DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof4DI8 - -subroutine MPI_Sizeof4DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof4DR4 - -subroutine MPI_Sizeof4DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof4DR8 - -subroutine MPI_Sizeof4DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof4DC8 - -subroutine MPI_Sizeof4DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof4DC16 - - -subroutine MPI_Sizeof5DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof5DCH - -subroutine MPI_Sizeof5DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof5DL - -subroutine MPI_Sizeof5DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof5DI1 - -subroutine MPI_Sizeof5DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof5DI2 - -subroutine MPI_Sizeof5DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof5DI4 - -subroutine MPI_Sizeof5DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof5DI8 - -subroutine MPI_Sizeof5DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof5DR4 - -subroutine MPI_Sizeof5DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof5DR8 - -subroutine MPI_Sizeof5DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof5DC8 - -subroutine MPI_Sizeof5DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof5DC16 - - -subroutine MPI_Sizeof6DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof6DCH - -subroutine MPI_Sizeof6DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof6DL - -subroutine MPI_Sizeof6DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof6DI1 - -subroutine MPI_Sizeof6DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof6DI2 - -subroutine MPI_Sizeof6DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof6DI4 - -subroutine MPI_Sizeof6DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof6DI8 - -subroutine MPI_Sizeof6DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof6DR4 - -subroutine MPI_Sizeof6DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof6DR8 - -subroutine MPI_Sizeof6DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof6DC8 - -subroutine MPI_Sizeof6DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof6DC16 - - -subroutine MPI_Sizeof7DCH(x, size, ierror) - implicit none - include 'fortran_sizes.h' - character, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_CHARACTER - ierror = 0 -end subroutine MPI_Sizeof7DCH - -subroutine MPI_Sizeof7DL(x, size, ierror) - implicit none - include 'fortran_sizes.h' - logical, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_LOGICAL - ierror = 0 -end subroutine MPI_Sizeof7DL - -subroutine MPI_Sizeof7DI1(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*1, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT1 - ierror = 0 -end subroutine MPI_Sizeof7DI1 - -subroutine MPI_Sizeof7DI2(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*2, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT2 - ierror = 0 -end subroutine MPI_Sizeof7DI2 - -subroutine MPI_Sizeof7DI4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*4, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT4 - ierror = 0 -end subroutine MPI_Sizeof7DI4 - -subroutine MPI_Sizeof7DI8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - integer*8, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_INT8 - ierror = 0 -end subroutine MPI_Sizeof7DI8 - -subroutine MPI_Sizeof7DR4(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*4, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL4 - ierror = 0 -end subroutine MPI_Sizeof7DR4 - -subroutine MPI_Sizeof7DR8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - real*8, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_REAL8 - ierror = 0 -end subroutine MPI_Sizeof7DR8 - -subroutine MPI_Sizeof7DC8(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*8, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX8 - ierror = 0 -end subroutine MPI_Sizeof7DC8 - -subroutine MPI_Sizeof7DC16(x, size, ierror) - implicit none - include 'fortran_sizes.h' - complex*16, dimension(1,1,1,1,1,1,*), intent(in) :: x - integer, intent(out) :: size - integer, intent(out) :: ierror - size = OMPI_SIZEOF_F90_COMPLEX16 - ierror = 0 -end subroutine MPI_Sizeof7DC16 diff --git a/ompi/tools/ompi_info/param.c b/ompi/tools/ompi_info/param.c index 5d1db0236f..9fc6c9442a 100644 --- a/ompi/tools/ompi_info/param.c +++ b/ompi/tools/ompi_info/param.c @@ -87,6 +87,9 @@ void ompi_info_do_config(bool want_all) char *fortran_have_f08_assumed_rank; char *fortran_build_f08_subarrays; char *fortran_have_optional_args; + char *fortran_have_interface; + char *fortran_have_iso_fortran_env; + char *fortran_have_storage_size; char *fortran_have_bind_c; char *fortran_have_iso_c_binding; char *fortran_have_bind_c_sub; @@ -98,6 +101,7 @@ void ompi_info_do_config(bool want_all) char *fortran_have_asynchronous; char *fortran_have_procedure; char *fortran_08_using_wrappers_for_choice_buffer_functions; + char *fortran_build_sizeof; char *java; char *heterogeneous; char *memprofile; @@ -166,6 +170,10 @@ void ompi_info_do_config(bool want_all) "yes" : "no"; fortran_have_optional_args = OMPI_FORTRAN_HAVE_OPTIONAL_ARGS ? "yes" : "no"; + fortran_have_interface = OMPI_FORTRAN_HAVE_INTERFACE ? "yes" : "no"; + fortran_have_iso_fortran_env = OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV ? + "yes" : "no"; + fortran_have_storage_size = OMPI_FORTRAN_HAVE_STORAGE_SIZE ? "yes" : "no"; fortran_have_bind_c = OMPI_FORTRAN_HAVE_BIND_C ? "yes" : "no"; fortran_have_iso_c_binding = OMPI_FORTRAN_HAVE_ISO_C_BINDING ? "yes" : "no"; @@ -180,6 +188,8 @@ void ompi_info_do_config(bool want_all) fortran_have_procedure = OMPI_FORTRAN_HAVE_PROCEDURE ? "yes" : "no"; fortran_08_using_wrappers_for_choice_buffer_functions = OMPI_FORTRAN_NEED_WRAPPER_ROUTINES ? "yes" : "no"; + fortran_build_sizeof = OMPI_FORTRAN_BUILD_SIZEOF ? + "yes" : "no"; /* Build a string describing what level of compliance the mpi_f08 module has */ @@ -376,6 +386,15 @@ void ompi_info_do_config(bool want_all) opal_info_out("Fort optional args", "compiler:fortran:optional_arguments", fortran_have_optional_args); + opal_info_out("Fort INTERFACE", + "compiler:fortran:interface", + fortran_have_interface); + opal_info_out("Fort ISO_FORTRAN_ENV", + "compiler:fortran:iso_fortran_env", + fortran_have_iso_fortran_env); + opal_info_out("Fort STORAGE_SIZE", + "compiler:fortran:storage_size", + fortran_have_storage_size); opal_info_out("Fort BIND(C) (all)", "compiler:fortran:bind_c", fortran_have_bind_c); @@ -409,6 +428,9 @@ void ompi_info_do_config(bool want_all) opal_info_out("Fort f08 using wrappers", "compiler:fortran:08_wrappers", fortran_08_using_wrappers_for_choice_buffer_functions); + opal_info_out("Fort MPI_SIZEOF", + "compiler:fortran:mpi_sizeof", + fortran_build_sizeof); if (want_all) { From e7a268e19f79834fd29ba00bdf79738634e647c1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 2 Oct 2014 16:00:10 -0700 Subject: [PATCH 2/2] .gitignore: rename .gitignore_global and add in new Fortran ignores --- .gitignore_global => .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) rename .gitignore_global => .gitignore (98%) diff --git a/.gitignore_global b/.gitignore similarity index 98% rename from .gitignore_global rename to .gitignore index aa56a5d21b..da4baa0c1b 100644 --- a/.gitignore_global +++ b/.gitignore @@ -268,6 +268,7 @@ ompi/include/mpif-constants.h ompi/include/mpif-io-handles.h ompi/include/mpif-handles.h ompi/include/mpif-io-constants.h +ompi/include/mpif-sizeof.h ompi/include/mpi_portable_platform.h ompi/include/ompi/version.h ompi/include/ompi/frameworks.h @@ -379,10 +380,17 @@ ompi/mpi/fortran/base/*.mod ompi/mpi/fortran/mpiext/mpi-ext-module.F90 ompi/mpi/fortran/mpiext/mpi-f08-ext-module.F90 ompi/mpi/fortran/mpiext/*.mod +ompi/mpi/fortran/mpif-h/sizeof_f.f90 ompi/mpi/fortran/mpif-h/profile/p*.c +ompi/mpi/fortran/mpif-h/profile/psizeof_f.f90 ompi/mpi/fortran/use-mpi-f08/constants.h ompi/mpi/fortran/use-mpi-f08/*.mod +ompi/mpi/fortran/use-mpi-f08/sizeof_f08.f90 +ompi/mpi/fortran/use-mpi-f08/sizeof_f08.h +ompi/mpi/fortran/use-mpi-f08/profile/psizeof_f08.f90 ompi/mpi/fortran/use-mpi-f08-desc/*.mod +ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-sizeof.f90 +ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-sizeof.h ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h ompi/mpi/fortran/use-mpi-ignore-tkr/*.mod