1
1

Fortran: Fix MPI_SIZEOF. What a disaster. :-(

What started as a simple ticket ended up reaching the way up to the
MPI Forum.
    
It turns out that we are supposed to have MPI_SIZEOF for all Fortran
interfaces: mpif.h, the mpi module, and the mpi_f08 module.
    
It further turns out that to properly support MPI_SIZEOF, your Fortran
compiler *has* support the INTERFACE keyword and ISO_FORTRAN_ENV.  We
can't use "ignore TKR" functionality, because the whole point of
MPI_SIZEOF is that the implementation knows what type was passed to it
("ignore TKR" functionality, by definition, throws that information
away).  Hence, we have to have an MPI_SIZEOF interface+implementation
for all intrinsic types, kinds, and ranks.

This commit therefore adds a perl script that generates both the
interfaces and implementations for MPI_SIZEOF in each of mpif.h, the
mpi module, and mpi_f08 module (yay consolidation!).

The perl script uses the results of some new configure tests:

* check if the Fortran compiler supports the INTERFACE keyword
* check if the Fortran compiler supports ISO_FORTRAN_ENV
* find the max array rank (i.e., dimension) that the compiler supports

If the Fortran compiler supports both INTERFACE and ISO_FORTRAN_ENV,
then we'll build the MPI_SIZEOF interfaces.  If not, we'll skip
MPI_SIZEOF in mpif.h and the mpi module.  Note that we won't build the
mpi_f08 module -- to include the MPI_SIZEOF interfaces -- if the
Fortran compiler doesn't support INTERFACE, ISO_FORTRAN_ENV, and a
whole bunch of ther modern Fortran stuff.

Since MPI_SIZEOF interfaces are now generated by the perl script, this
commit also removes all the old MPI_SIZEOF implementations (which were
laden with a zillion #if blocks).

cmr=v1.8.3

This commit was SVN r32764.
Этот коммит содержится в:
Jeff Squyres 2014-09-19 13:44:52 +00:00
родитель 0c98cf709e
Коммит d7eaca83fa
22 изменённых файлов: 666 добавлений и 1974 удалений

Просмотреть файл

@ -47,3 +47,7 @@ ompi__v_LN_S_0 = @echo " LN_S " `basename $@`;
OMPI_V_MKDIR = $(ompi__v_MKDIR_$V)
ompi__v_MKDIR_ = $(ompi__v_MKDIR_$AM_DEFAULT_VERBOSITY)
ompi__v_MKDIR_0 = @echo " MKDIR " $@;
OMPI_V_GEN = $(ompi__v_GEN_$V)
ompi__v_GEN_ = $(ompi__v_GEN_$AM_DEFAULT_VERBOSITY)
ompi__v_GEN_0 = @echo " GENERATE" $@;

15
README
Просмотреть файл

@ -362,7 +362,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.
@ -383,6 +387,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 >= 4.9. Other modern Fortran
compilers may also work (but are, as yet, only lightly tested).
@ -392,6 +399,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
------------------------------

51
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
])

Просмотреть файл

@ -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])
])

69
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
])

Просмотреть файл

@ -28,15 +28,21 @@ 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_ISO_C_BINDING=0
OMPI_FORTRAN_HAVE_BIND_C_SUB=0
OMPI_FORTRAN_HAVE_BIND_C_TYPE=0
@ -202,6 +208,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,15 +255,39 @@ 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
#--------------------------------------------------------
OMPI_FORTRAN_CHECK_INTERFACE([OMPI_FORTRAN_HAVE_INTERFACE=1], [])
AC_MSG_CHECKING([if building Fortran mpif.h bindings])
AS_IF([test $ompi_fortran_happy -eq 1],
[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)
# We need both INTERFACE and iso_fortran_env to build MPI_SIZEOF
# support
AS_IF([test $OMPI_FORTRAN_HAVE_INTERFACE -eq 1 && \
test $OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV -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 +547,22 @@ 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])
# 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.

Просмотреть файл

@ -52,6 +52,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
@ -72,12 +73,31 @@ 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:

Просмотреть файл

@ -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'

Просмотреть файл

@ -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
#-----------------------------------------------------------------------------

221
ompi/mpi/fortran/base/gen-mpi-sizeof.pl Исполняемый файл
Просмотреть файл

@ -0,0 +1,221 @@
#!/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 (lc($ierror_arg) ne "optional" && lc($ierror_arg) ne "mandatory");
die "max array rank must be >= 4 and <=15"
if (!defined($maxrank_arg) || $maxrank_arg < 4 || $maxrank_arg > 15);
die "Must specify --pmpi and/or --mpi if --impl is specified"
if (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 and
! ISO_FORTRAN_ENV. 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);

Просмотреть файл

@ -21,6 +21,8 @@
# $HEADER$
#
include $(top_srcdir)/Makefile.ompi-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,22 @@ headers = \
#
libmpi_mpifh_la_SOURCES =
# sizeof_f.f90 is generated based on some results from configure tests.
CLEANFILES += sizeof_f.f90
nodist_libmpi_mpifh_la_SOURCES =
if BUILD_FORTRAN_SIZEOF
nodist_libmpi_mpifh_la_SOURCES += sizeof_f.f90
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 \

Просмотреть файл

@ -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

Просмотреть файл

@ -15,6 +15,8 @@
# $HEADER$
#
include $(top_srcdir)/Makefile.ompi-rules
# This Makefile is only relevant if we're building the "use mpi_f08"
# MPI bindings.
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
@ -36,6 +38,45 @@ 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
#
# *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 \
@ -731,9 +772,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.
#
@ -756,11 +811,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
@ -773,7 +824,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 = \

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -9,6 +9,8 @@
# $HEADER$
#
include $(top_srcdir)/Makefile.ompi-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
#
# Clean up all module files
# 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 generated and module files
#
CLEANFILES += mpi-ignore-tkr-sizeof.h mpi-ignore-tkr-sizeof.f90
MOSTLYCLEANFILES = *.mod
CLEANFILES += *.i90

Просмотреть файл

@ -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, &

Просмотреть файл

@ -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

Просмотреть файл

@ -22,6 +22,8 @@
# $HEADER$
#
include $(top_srcdir)/Makefile.ompi-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)

Просмотреть файл

@ -3458,5 +3458,3 @@ subroutine MPI_Win_flush_local_all(win, ierror)
end subroutine MPI_Win_flush_local_all
end interface

Просмотреть файл

@ -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

Просмотреть файл

@ -87,6 +87,8 @@ 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_bind_c;
char *fortran_have_iso_c_binding;
char *fortran_have_bind_c_sub;
@ -98,6 +100,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 +169,9 @@ 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_bind_c = OMPI_FORTRAN_HAVE_BIND_C ? "yes" : "no";
fortran_have_iso_c_binding = OMPI_FORTRAN_HAVE_ISO_C_BINDING ?
"yes" : "no";
@ -180,6 +186,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 +384,12 @@ 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 BIND(C) (all)",
"compiler:fortran:bind_c",
fortran_have_bind_c);
@ -409,6 +423,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) {