1
1

Bring over /tmp/f90-stuff branch to the trunk.

svn merge -r 9453:9609 https://svn.open-mpi.org/svn/ompi/tmp/f90-stuff .

Several improvements over the current F90 MPI bindings:

- The capability to make 4 sizes of the F90 bindings:
  - trivial: only the F90-specific MPI functions (sizeof and a few
    others)
  - small: (this is the default) all MPI functions that do not take
    choice buffers
  - medium: small + all MPI functions that take one choice buffer
    (e.g., MPI_SEND)
  - large: all MPI functions, but those that take 2 choice buffers
    (e.g., MPI_GATHER) only allow both buffers to be of the same type
- Remove all non-standard MPI types (LOGICAL*x, CHARACTER*x)
- Remove use of selected_*_kind() and only use MPI-defined types
  (INTEGER*x, etc.)
- Decrease complexity of the F90 configure and build system

This commit was SVN r9610.
Этот коммит содержится в:
Jeff Squyres 2006-04-11 03:33:38 +00:00
родитель ba0aa46220
Коммит f8e634d6ca
103 изменённых файлов: 17020 добавлений и 23490 удалений

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

@ -10,6 +10,7 @@ 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) 2006 Cisco Systems, Inc. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -182,6 +183,48 @@ if test "$OMPI_WANT_F90_BINDINGS" = "1" -a -z "$enable_mpi_f90" -a -d .svn; then
fi
#################### Early development override ####################
AC_MSG_CHECKING([desired Fortran 90 bindings "size"])
AC_ARG_WITH(mpi-f90-size,
AC_HELP_STRING([--with-mpi-f90-size=SIZE],
[specify the types of functions in the Fortran 90 MPI module, where size is one of: trivial (MPI-2 F90-specific functions only), small (trivial + all MPI functions without choice buffers), medium (small + all MPI functions with one choice buffer), large (medium + all MPI functions with 2 choice buffers, but only when both buffers are the same type)]))
if test "$OMPI_WANT_F90_BINDINGS" = "0"; then
AC_MSG_RESULT([disabled (Fortran 90 bindings disabled)])
elif test "$with_mpi_f90_size" = "no"; then
OMPI_WANT_F90_BINDINGS=0
AC_MSG_RESULT([disabling F90 MPI module (used specified)])
else
# Default value
if test "$with_mpi_f90_size" = ""; then
with_mpi_f90_size=small
fi
# Check for each of the sizes
if test "$with_mpi_f90_size" = "trivial"; then
OMPI_F90_BUILD_SIZE=trivial
elif test "$with_mpi_f90_size" = "small"; then
OMPI_F90_BUILD_SIZE=small
elif test "$with_mpi_f90_size" = "medium"; then
OMPI_F90_BUILD_SIZE=medium
elif test "$with_mpi_f90_size" = "large"; then
OMPI_F90_BUILD_SIZE=large
else
AC_MSG_RESULT([Unrecognized size: $with_mpi_f90_size])
AC_MSG_ERROR([Cannot continue])
fi
fi
AM_CONDITIONAL([OMPI_WANT_BUILD_F90_TRIVIAL],
[test "$OMPI_F90_BUILD_SIZE" = "trivial"])
AM_CONDITIONAL([OMPI_WANT_BUILD_F90_SMALL],
[test "$OMPI_F90_BUILD_SIZE" = "small"])
AM_CONDITIONAL([OMPI_WANT_BUILD_F90_MEDIUM],
[test "$OMPI_F90_BUILD_SIZE" = "medium"])
AM_CONDITIONAL([OMPI_WANT_BUILD_F90_LARGE],
[test "$OMPI_F90_BUILD_SIZE" = "large"])
AC_SUBST(OMPI_F90_BUILD_SIZE)
AC_MSG_RESULT([$OMPI_F90_BUILD_SIZE])
#
# MPI profiling

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

@ -10,6 +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 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -482,18 +483,12 @@ OMPI_SETUP_F90
OMPI_F90_FIND_MODULE_INCLUDE_FLAG
# Look for all the types
OMPI_F90_LKINDS=""
OMPI_F90_IKINDS=""
OMPI_F90_RKINDS=""
OMPI_F90_CKINDS=""
# LOGICAL and friends
OMPI_F90_CHECK([LOGICAL])
OMPI_F90_CHECK([LOGICAL*1], [1])
OMPI_F90_CHECK([LOGICAL*2], [2])
OMPI_F90_CHECK([LOGICAL*4], [4])
OMPI_F90_CHECK([LOGICAL*8], [8])
OMPI_F90_CHECK([LOGICAL*16], [16])
# INTEGER and friends
OMPI_F90_CHECK([INTEGER])
@ -517,27 +512,25 @@ OMPI_F90_CHECK([COMPLEX*16], [16])
OMPI_F90_CHECK([COMPLEX*32], [32])
OMPI_F90_CHECK([DOUBLE COMPLEX])
# The OMPI_F90_CKINDS list represents the overall size of the complex
# types -- not the size of the REAL's that make them up. For the
# scripts in ompi/mpi/f90/scripts/*, variables are expressed in terms
# of the REAL's that make up the COMPLEX variables, so we need to cut
# all the sizes here in half.
new_sizes=
for size in $OMPI_F90_CKINDS; do
new_size=`expr $size / 2`
new_sizes="$new_sizes $new_size"
done
OMPI_F90_CKINDS=$new_sizes
unset new_size new_sizes
AC_SUBST(OMPI_F90_LKINDS)
AC_SUBST(OMPI_F90_IKINDS)
AC_SUBST(OMPI_F90_RKINDS)
AC_SUBST(OMPI_F90_CKINDS)
# get kind value for Fortran MPI_OFFSET_KIND (corresponding to INTEGER*8)
OMPI_F90_GET_INT_KIND(MPI_OFFSET_KIND, 18, OMPI_MPI_OFFSET_KIND)
AC_SUBST(OMPI_MPI_OFFSET_KIND)
# get kind value for Fortran MPI_INTEGER_KIND (corresponding to
# whatever is the same size as a F77 INTEGER -- for the
# most-likely-will-never-occur case where F77 INTEGER is smaller than
# an F90 INTEGER; see MPI-2 4.12.6.5
if test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "2"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 4, OMPI_MPI_INTEGER_KIND)
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "4"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 9, OMPI_MPI_INTEGER_KIND)
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "8"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 18, OMPI_MPI_INTEGER_KIND)
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "16"; then
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 19, OMPI_MPI_INTEGER_KIND)
AC_MSG_ERROR([Cannot support Fortran MPI_INTEGER_KIND!])
fi
AC_SUBST(OMPI_MPI_INTEGER_KIND)
# get kind value for Fortran MPI_ADDRESS_KIND (corresponding to
# whatever is big enough to hold (void*))
@ -554,6 +547,10 @@ else
fi
AC_SUBST(OMPI_MPI_ADDRESS_KIND)
# get kind value for Fortran MPI_OFFSET_KIND (corresponding to INTEGER*8)
OMPI_F90_GET_INT_KIND(MPI_OFFSET_KIND, 18, OMPI_MPI_OFFSET_KIND)
AC_SUBST(OMPI_MPI_OFFSET_KIND)
# checkpoint results
AC_CACHE_SAVE

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

@ -73,9 +73,10 @@
!
! kind parameters
!
integer MPI_OFFSET_KIND, MPI_ADDRESS_KIND
parameter (MPI_OFFSET_KIND=@OMPI_MPI_OFFSET_KIND@)
integer MPI_OFFSET_KIND, MPI_ADDRESS_KIND, MPI_INTEGER_KIND
parameter (MPI_INTEGER_KIND=@OMPI_MPI_INTEGER_KIND@)
parameter (MPI_ADDRESS_KIND=@OMPI_MPI_ADDRESS_KIND@)
parameter (MPI_OFFSET_KIND=@OMPI_MPI_OFFSET_KIND@)
!
! misc. constants
!

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

@ -31,7 +31,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_ADDRESS,
pmpi_address_,
pmpi_address__,
pmpi_address_f,
(char *location, MPI_Aint *address, MPI_Fint *ierr),
(char *location, MPI_Fint *address, MPI_Fint *ierr),
(location, address, ierr) )
#endif
@ -48,7 +48,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ADDRESS,
mpi_address_,
mpi_address__,
mpi_address_f,
(char *location, MPI_Aint *address, MPI_Fint *ierr),
(char *location, MPI_Fint *address, MPI_Fint *ierr),
(location, address, ierr) )
#endif
@ -57,7 +57,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ADDRESS,
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_address_f(char *location, MPI_Aint *address, MPI_Fint *ierr)
void mpi_address_f(char *location, MPI_Fint *address, MPI_Fint *ierr)
{
MPI_Aint addr;

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

@ -59,7 +59,7 @@ PN(void, mpi_accumulate, MPI_ACCUMULATE, (char *origin_addr, MPI_Fint *origin_co
PN(void, mpi_add_error_class, MPI_ADD_ERROR_CLASS, (MPI_Fint *errorclass, MPI_Fint *ierr));
PN(void, mpi_add_error_code, MPI_ADD_ERROR_CODE, (MPI_Fint *errorclass, MPI_Fint *errorcode, MPI_Fint *ierr));
PN(void, mpi_add_error_string, MPI_ADD_ERROR_STRING, (MPI_Fint *errorcode, char *string, MPI_Fint *ierr, int l));
PN(void, mpi_address, MPI_ADDRESS, (char *location, MPI_Aint *address, MPI_Fint *ierr));
PN(void, mpi_address, MPI_ADDRESS, (char *location, MPI_Fint *address, MPI_Fint *ierr));
PN(void, mpi_allgather, MPI_ALLGATHER, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *ierr));
PN(void, mpi_allgatherv, MPI_ALLGATHERV, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *ierr));
PN(void, mpi_alloc_mem, MPI_ALLOC_MEM, (MPI_Fint *size, MPI_Fint *info, char *baseptr, MPI_Fint *ierr));

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

@ -10,6 +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 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -31,13 +32,11 @@
# | |
# \|/ |
# generates mpi-f90-interfaces.h |
# / |
# mpi_kinds.f90 --------> generates mpi_kinds module |
# / (exact filename unknown) |
# \/ / \ |
# mpi-f90-interfaces.h / \ |
# | / \ |
# \|/ \/ \/ \|/
# / |
# \/ |
# mpi-f90-interfaces.h |
# | |
# \|/ \|/
# used by mpi.f90 used by mpi_*.f90
# / | |
# / \|/ \|/
@ -49,17 +48,10 @@
# Once you understand this diagram, this Makefile is much more clear.
#
SUBDIRS = scripts
AM_FCFLAGS = -I$(top_builddir)/ompi/include $(OMPI_FC_MODULE_FLAG).
# We have to EXTRA_DIST mpi_kinds.f90 because there is no explicit
# Automake rule to compile this file.
EXTRA_DIST = mpi_kinds.f90
# Override the default f90 rules because we have to insert
# $(FCFLAGS_f90) right before the source filename. This is necessary
# for cases where the compiler expects source files to end in .f, and
@ -82,10 +74,6 @@ EXTRA_DIST = mpi_kinds.f90
lib_LIBRARIES =
if OMPI_WANT_F90_BINDINGS
# We have to build this before the other ones.
BUILT_SOURCES = mpi_kinds.ompi_module
# Add the f90 library to the list of libraries to build
lib_LIBRARIES += libmpi_f90.a
@ -97,22 +85,6 @@ mpi-f90-interfaces.h: fortran_kinds.sh
CLEANFILES += mpi-f90-interfaces.h
# SIDENOTE: We currently have code in mpi-f90-interfaces.h.sh to
# generate interface declarations for all the "two buffer" functions
# (e.g., MPI_Reduce). This actually creates a problem for most
# compilers, because it results in an exponential explosion of
# functions generated -- most compilers will segv (particularly with
# --with-f90-mcx-array-dim values of >2). But this code is useful,
# and I don't want to delete it (yes, we could get it back from SVN
# history, but I don't want to re-integrate it) -- f90 compilers *may*
# someday be able to handle this (i.e., our *code* is not wrong -- the
# *compilers* are wrong). So I'm simply adding a hard-coded value
# here to disable the interface generation stuff in the script; it can
# be made a condition (e.g., via configure test or --enable option, or
# somesuch) later if necessary.
WANT_2BUFFER_FUNCTIONS=0
# Run scripts to generate the f90 source files. We only need to
# generate the .f90 files once, so the "test" checks to see if the
# file exists before running the script. However, the
@ -121,23 +93,10 @@ WANT_2BUFFER_FUNCTIONS=0
# and changes the value fortran_kinds.sh (which is taken care of by
# the mpi-f90-interfaces.h dependency on fortran_kinds.sh, above).
mpi-f90-interfaces.h:
mpi-f90-interfaces.h: $(srcdir)/scripts/mpi-f90-interfaces.h.sh
@ p="`pwd`"; \
echo $(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p $(WANT_2BUFFER_FUNCTIONS) \> $@; \
$(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p $(WANT_2BUFFER_FUNCTIONS) > $@
# Ensure that the mpi_kinds F90 module is generated before compiling
# any of the sources (because many/all of these sources "use
# mpi_kinds"). We unfortunately can't know ahead of time the exact
# filename of the generated F90 module file (because F90 compilers
# have not standardized on the output filename format), so we have to
# add our own explicit dependency to compile the module. :-(
$(libmpi_f90_a_SOURCES) $(nodist_libmpi_f90_a_SOURCES): mpi_kinds.ompi_module
mpi_kinds.ompi_module: mpi_kinds.f90
$(FCCOMPILE) -c $(FCFLAGS_f90) $<
@ touch mpi_kinds.ompi_module
echo $(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p \> $@; \
$(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p > $@
# Unbelievably, some versions of sh (cough cough Solaris 9 cough
# cough) actually seem to internally perform a "cd" into a
@ -148,12 +107,10 @@ mpi_kinds.ompi_module: mpi_kinds.f90
# So we have to pass in the pwd to the scripts so that they know where
# some_script is.
$(nodist_libmpi_f90_a_SOURCES):
@ if test ! -r $@ -o "$@" = "mpi-f90-interfaces.h"; then \
p="`pwd`"; \
echo $(srcdir)/scripts/$@.sh $$p \> $@; \
$(srcdir)/scripts/$@.sh $$p > $@ ; \
fi
$(nodist_libmpi_f90_a_SOURCES): fortran_kinds.sh
@ p="`pwd`"; \
echo $(srcdir)/scripts/$@.sh $$p \> $@; \
$(srcdir)/scripts/$@.sh $$p > $@ ;
# Automake doesn't know how to do F90 dependency analysis, so manually
# list this here (i.e., "mpi-f90-interfaces.h" is included in
@ -187,15 +144,16 @@ lib_LIBRARIES +=
endif
# mpi.f90 is the only f90 source file directly in libmpif90 that gets
# distributed (mpi_kinds.f90 is also distributed, but it's only
# indirectly included in libmpif90 -- via "use mpi_kinds").
# distributed. This file is always in the library, regardless of the
# size that we're building.
libmpi_f90_a_SOURCES = mpi.f90
# These files are all generated by scripts in the scripts/ directory.
nodist_libmpi_f90_a_SOURCES = \
medium_sources = \
mpi_address_f90.f90 \
mpi_accumulate_f90.f90 \
mpi_bcast_f90.f90 \
mpi_bsend_f90.f90 \
mpi_bsend_init_f90.f90 \
@ -232,11 +190,13 @@ nodist_libmpi_f90_a_SOURCES = \
mpi_file_write_ordered_begin_f90.f90 \
mpi_file_write_ordered_end_f90.f90 \
mpi_file_write_shared_f90.f90 \
mpi_get_f90.f90 \
mpi_ibsend_f90.f90 \
mpi_irecv_f90.f90 \
mpi_irsend_f90.f90 \
mpi_isend_f90.f90 \
mpi_issend_f90.f90 \
mpi_put_f90.f90 \
mpi_recv_f90.f90 \
mpi_recv_init_f90.f90 \
mpi_rsend_f90.f90 \
@ -246,11 +206,39 @@ nodist_libmpi_f90_a_SOURCES = \
mpi_sendrecv_replace_f90.f90 \
mpi_ssend_f90.f90 \
mpi_ssend_init_f90.f90 \
mpi_accumulate_f90.f90 \
mpi_get_f90.f90 \
mpi_put_f90.f90 \
mpi_win_create_f90.f90
large_sources = \
mpi_allgather_f90.f90 \
mpi_allgatherv_f90.f90 \
mpi_allreduce_f90.f90 \
mpi_alltoall_f90.f90 \
mpi_alltoallv_f90.f90 \
mpi_alltoallw_f90.f90 \
mpi_exscan_f90.f90 \
mpi_gather_f90.f90 \
mpi_gatherv_f90.f90 \
mpi_pack_f90.f90 \
mpi_pack_external_f90.f90 \
mpi_reduce_f90.f90 \
mpi_reduce_scatter_f90.f90 \
mpi_scan_f90.f90 \
mpi_scatter_f90.f90 \
mpi_scatterv_f90.f90 \
mpi_sendrecv_f90.f90 \
mpi_unpack_f90.f90 \
mpi_unpack_external_f90.f90
# The rest of the files that are in the library depend on which size
# we're building.
nodist_libmpi_f90_a_SOURCES =
if OMPI_WANT_BUILD_F90_MEDIUM
nodist_libmpi_f90_a_SOURCES += $(medium_sources)
endif
if OMPI_WANT_BUILD_F90_LARGE
nodist_libmpi_f90_a_SOURCES += $(medium_sources) $(large_sources)
endif
#
# Clean up all F90 module files and all generated files

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

@ -10,6 +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 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -19,10 +20,10 @@
max_array_rank="@OMPI_FORTRAN_MAX_ARRAY_RANK@"
lkinds="@OMPI_F90_LKINDS@"
ikinds="@OMPI_F90_IKINDS@"
rkinds="@OMPI_F90_RKINDS@"
ckinds="@OMPI_F90_CKINDS@"
size="@OMPI_F90_BUILD_SIZE@"
# fix up for broken generation scripts that don't properly compute the
# ranks variable before using it
@ -33,3 +34,41 @@ while test "`expr $rank \\<= $max_array_rank`" = "1"; do
rank="`expr $rank + 1`"
done
unset rank
#
# Helper function
#
check_size() {
# Sanity check
if test "$1" != "trivial" -a "$1" != "small" -a "$1" != "medium" -a \
"$1" != "large"; then
echo "WARNING: unrecognized size: $1" >&2
fi
# Check the value
output=0
if test "$1" = "trivial"; then
# Since we've got a trivial source, always build it (since
# trivial is the smallest allowable size to build, and we
# already verified above that the size is valid).
output=1
elif test "$1" = "small"; then
# If we've got a small source, build it unless the user only
# requested trivial.
if test "$size" != "trivial"; then
output=1
fi
elif test "$1" = "medium"; then
# If we've got a medium source, build it only if the user
# requested medium or large.
if test "$size" = "medium" -o "$size" = "large"; then
output=1
fi
elif test "$1" = "large"; then
# If we've got a large source, build it only if the user
# requested large.
if test "$size" = "large"; then
output=1
fi
fi
}

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

@ -9,6 +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 Cisco Systems, Inc. All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
@ -16,11 +17,9 @@
! $HEADER$
!
integer :: OMPI_SIZEOF_F90_LOGICAL1
integer :: OMPI_SIZEOF_F90_LOGICAL2
integer :: OMPI_SIZEOF_F90_LOGICAL4
integer :: OMPI_SIZEOF_F90_LOGICAL8
integer :: OMPI_SIZEOF_F90_LOGICAL16
! This file is used by scripts/mpi_sizeof.f90.sh (and therefore mpi_sizeof.f90)
integer :: OMPI_SIZEOF_F90_LOGICAL
integer :: OMPI_SIZEOF_F90_INT1
integer :: OMPI_SIZEOF_F90_INT2
@ -36,11 +35,7 @@ integer :: OMPI_SIZEOF_F90_COMPLEX8
integer :: OMPI_SIZEOF_F90_COMPLEX16
integer :: OMPI_SIZEOF_F90_COMPLEX32
parameter(OMPI_SIZEOF_F90_LOGICAL1 = @OMPI_SIZEOF_F90_LOGICAL1@)
parameter(OMPI_SIZEOF_F90_LOGICAL2 = @OMPI_SIZEOF_F90_LOGICAL2@)
parameter(OMPI_SIZEOF_F90_LOGICAL4 = @OMPI_SIZEOF_F90_LOGICAL4@)
parameter(OMPI_SIZEOF_F90_LOGICAL8 = @OMPI_SIZEOF_F90_LOGICAL8@)
parameter(OMPI_SIZEOF_F90_LOGICAL16 = @OMPI_SIZEOF_F90_LOGICAL16@)
parameter(OMPI_SIZEOF_F90_LOGICAL = @OMPI_SIZEOF_F90_LOGICAL@)
parameter(OMPI_SIZEOF_F90_INT1 = @OMPI_SIZEOF_F90_INT1@)
parameter(OMPI_SIZEOF_F90_INT2 = @OMPI_SIZEOF_F90_INT2@)

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

@ -18,7 +18,7 @@
module mpi
use mpi_kinds
include "mpif.h"
! This file is generated, and is *huge*. Its size is directly related
! to the --with-f90-max-array-dim configure parameter.

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

@ -1,46 +0,0 @@
!
! Copyright (c) 2004-2005 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$
!
! Additional copyrights may follow
!
! $HEADER$
!
module mpi_kinds
include "mpif.h"
!
! integer kinds
!
integer :: MPI_INTEGER1_KIND, MPI_INTEGER2_KIND, MPI_INTEGER4_KIND
integer :: MPI_INTEGER8_KIND, MPI_INTEGER16_KIND
parameter(MPI_INTEGER1_KIND = selected_int_kind(2))
parameter(MPI_INTEGER2_KIND = selected_int_kind(4))
parameter(MPI_INTEGER4_KIND = selected_int_kind(9))
parameter(MPI_INTEGER8_KIND = selected_int_kind(18))
parameter(MPI_INTEGER16_KIND = selected_int_kind(19))
!
! real kinds
!
integer :: MPI_REAL4_KIND, MPI_REAL8_KIND
integer :: MPI_REAL16_KIND, MPI_REAL32_KIND
parameter(MPI_REAL4_KIND = selected_real_kind(6))
parameter(MPI_REAL8_KIND = selected_real_kind(15))
parameter(MPI_REAL16_KIND = selected_real_kind(31))
parameter(MPI_REAL32_KIND = selected_real_kind(32))
end module mpi_kinds

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -1,208 +1,94 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Accumulate'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)
include "mpif.h"
${type}, intent(in) :: origin_addr
integer, intent(in) :: origin_count
integer, intent(in) :: origin_datatype
integer, intent(in) :: target_rank
integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp
integer, intent(in) :: target_count
integer, intent(in) :: target_datatype
integer, intent(in) :: op
integer, intent(in) :: win
integer, intent(out) :: ierr
call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Accumulate ${rank} CH "character${dim}"
output MPI_Accumulate ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Accumulate ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Accumulate ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Accumulate ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,136 +1,85 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Address'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(location, address, ierr)
include "mpif.h"
${type}, intent(in) :: location
integer, intent(out) :: address
integer, intent(out) :: ierr
call ${procedure}(location, address, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Address ${rank} CH "character${dim}"
output MPI_Address ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Address ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Address ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(location, address, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: location"
echo " integer(kind=MPI_ADDRESS_KIND), intent(out) :: address"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(location, address, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Address ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

92
ompi/mpi/f90/scripts/mpi_allgather_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcount
integer, intent(in) :: recvtype
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Allgather ${rank} CH "character${dim}"
output MPI_Allgather ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Allgather ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Allgather ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Allgather ${rank} C${kind} "complex*${kind}${dim}"
done
done

93
ompi/mpi/f90/scripts/mpi_allgatherv_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,93 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, recvbuf, recvcounts, &
displs, recvtype, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, dimension(*), intent(in) :: recvcounts
integer, dimension(*), intent(in) :: displs
integer, intent(in) :: recvtype
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, recvbuf, recvcounts, &
displs, recvtype, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Allgatherv ${rank} CH "character${dim}"
output MPI_Allgatherv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Allgatherv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Allgatherv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Allgatherv ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,209 +0,0 @@
#! /bin/sh
. "$1/fortran_kinds.sh"
procedure='MPI_Accumulate'
rank=0
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, op, win, ierr)"
echo "end subroutine ${proc}"
echo
done
echo
done
echo
echo
echo

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

@ -1,185 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Allreduce'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
${type}, intent(out) :: recvbuf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: op
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: sendbuf"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: sendbuf"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: sendbuf"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: sendbuf"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: sendbuf"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Allreduce ${rank} CH "character${dim}"
output MPI_Allreduce ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: sendbuf"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Allreduce ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: sendbuf"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Allreduce ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: sendbuf"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: recvbuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: op"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Allreduce ${rank} C${kind} "complex*${kind}${dim}"
done
echo
done
echo
echo
echo

92
ompi/mpi/f90/scripts/mpi_alltoall_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcount
integer, intent(in) :: recvtype
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Alltoall ${rank} CH "character${dim}"
output MPI_Alltoall ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Alltoall ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Alltoall ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Alltoall ${rank} C${kind} "complex*${kind}${dim}"
done
done

94
ompi/mpi/f90/scripts/mpi_alltoallv_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,94 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcounts, sdispls, sendtype, recvbuf, &
recvcounts, rdispls, recvtype, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, dimension(*), intent(in) :: sendcounts
integer, dimension(*), intent(in) :: sdispls
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, dimension(*), intent(in) :: recvcounts
integer, dimension(*), intent(in) :: rdispls
integer, intent(in) :: recvtype
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcounts, sdispls, sendtype, recvbuf, &
recvcounts, rdispls, recvtype, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Alltoallv ${rank} CH "character${dim}"
output MPI_Alltoallv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Alltoallv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Alltoallv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Alltoallv ${rank} C${kind} "complex*${kind}${dim}"
done
done

94
ompi/mpi/f90/scripts/mpi_alltoallw_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,94 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, &
recvcounts, rdispls, recvtypes, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, dimension(*), intent(in) :: sendcounts
integer, dimension(*), intent(in) :: sdispls
integer, dimension(*), intent(in) :: sendtypes
${type}, intent(out) :: recvbuf
integer, dimension(*), intent(in) :: recvcounts
integer, dimension(*), intent(in) :: rdispls
integer, dimension(*), intent(in) :: recvtypes
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, &
recvcounts, rdispls, recvtypes, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Alltoallw ${rank} CH "character${dim}"
output MPI_Alltoallw ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Alltoallw ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Alltoallw ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Alltoallw ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Bcast'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)
include "mpif.h"
${type}, intent(in) :: buffer
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: root
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(buffer, count, datatype, root, comm&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Bcast ${rank} CH "character${dim}"
output MPI_Bcast ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bcast ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bcast ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buffer, count, datatype, root, comm&
, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: root"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, count, datatype, root, comm&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bcast ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Bsend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Bsend ${rank} CH "character${dim}"
output MPI_Bsend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bsend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bsend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bsend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Bsend_init'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Bsend_init ${rank} CH "character${dim}"
output MPI_Bsend_init ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bsend_init ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bsend_init ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Bsend_init ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,136 +1,85 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Buffer_attach'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buffer, size, ierr)
include "mpif.h"
${type}, intent(in) :: buffer
integer, intent(in) :: size
integer, intent(out) :: ierr
call ${procedure}(buffer, size, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Buffer_attach ${rank} CH "character${dim}"
output MPI_Buffer_attach ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Buffer_attach ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Buffer_attach ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buffer"
echo " integer, intent(in) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Buffer_attach ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,136 +1,85 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Buffer_detach'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buffer, size, ierr)
include "mpif.h"
${type}, intent(out) :: buffer
integer, intent(out) :: size
integer, intent(out) :: ierr
call ${procedure}(buffer, size, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Buffer_detach ${rank} CH "character${dim}"
output MPI_Buffer_detach ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Buffer_detach ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Buffer_detach ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buffer, size, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buffer"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buffer, size, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Buffer_detach ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,7 +1,40 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in small or larger modules. So
# if we're not at least small, bail now.
check_size small
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
output() {
procedure=$1
proc="$1$2"
@ -11,7 +44,7 @@ output() {
subroutine ${proc}(count, array_of_commands, array_of_argv, &
array_of_maxprocs, array_of_info, &
root, comm, intercomm, array_of_errcodes, ierr)
use mpi_kinds
include 'mpif.h'
integer, intent(in) :: count
character(len=*), dimension(*), intent(in) :: array_of_commands
$type, intent(in) :: array_of_argv

91
ompi/mpi/f90/scripts/mpi_exscan_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
${type}, intent(out) :: recvbuf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: op
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Exscan ${rank} CH "character${dim}"
output MPI_Exscan ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Exscan ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Exscan ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Exscan ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_iread_at'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)
include "mpif.h"
integer, intent(in) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_iread_at ${rank} CH "character${dim}"
output MPI_File_iread_at ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread_at ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread_at ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread_at ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_iread'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, request&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_iread ${rank} CH "character${dim}"
output MPI_File_iread ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_iread_shared'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, request&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_iread_shared ${rank} CH "character${dim}"
output MPI_File_iread_shared ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread_shared ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread_shared ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iread_shared ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_iwrite_at'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)
include "mpif.h"
integer, intent(inout) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_iwrite_at ${rank} CH "character${dim}"
output MPI_File_iwrite_at ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite_at ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite_at ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
request, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite_at ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_iwrite'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, request&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_iwrite ${rank} CH "character${dim}"
output MPI_File_iwrite ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_iwrite_shared'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, request&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_iwrite_shared ${rank} CH "character${dim}"
output MPI_File_iwrite_shared ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite_shared ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite_shared ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, request&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, request&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_iwrite_shared ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,152 +1,87 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_all_begin'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_all_begin ${rank} CH "character${dim}"
output MPI_File_read_all_begin ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all_begin ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all_begin ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all_begin ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,144 +1,86 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_all_end'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_all_end ${rank} CH "character${dim}"
output MPI_File_read_all_end ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all_end ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all_end ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all_end ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_all'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_all ${rank} CH "character${dim}"
output MPI_File_read_all ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_all ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_at_all_begin'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)
include "mpif.h"
integer, intent(in) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_at_all_begin ${rank} CH "character${dim}"
output MPI_File_read_at_all_begin ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all_begin ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all_begin ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all_begin ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,144 +1,86 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_at_all_end'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, status, ierr)
include "mpif.h"
integer, intent(in) :: fh
${type}, intent(out) :: buf
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_at_all_end ${rank} CH "character${dim}"
output MPI_File_read_at_all_end ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all_end ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all_end ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all_end ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_at_all'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)
include "mpif.h"
integer, intent(in) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_at_all ${rank} CH "character${dim}"
output MPI_File_read_at_all ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at_all ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_at'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)
include "mpif.h"
integer, intent(in) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_at ${rank} CH "character${dim}"
output MPI_File_read_at ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(in) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_at ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read ${rank} CH "character${dim}"
output MPI_File_read ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,159 +1,87 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_ordered_begin'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
# JMS: Override -- need to make the back-end function less than 31
# characters because F90 standard says that symbol max lengths are 31
# characters. So change the value of $procedure to something slightly
# shorter. $proc, hard code it to something slightly different.
# #$%@#$%@#$%
short=MPI_File_read_ord_begin
check_size medium
if test "$output" = "0"; then
exit 0
fi
rank=0
for kind in $lkinds
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${short}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${short}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${short}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${short}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${short}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_ordered_begin ${rank} CH "character${dim}"
output MPI_File_read_ordered_begin ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${short}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered_begin ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${short}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered_begin ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${short}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered_begin ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,144 +1,86 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_ordered_end'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_ordered_end ${rank} CH "character${dim}"
output MPI_File_read_ordered_end ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered_end ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered_end ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered_end ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_ordered'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_ordered ${rank} CH "character${dim}"
output MPI_File_read_ordered ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_ordered ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_read_shared'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_read_shared ${rank} CH "character${dim}"
output MPI_File_read_shared ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_shared ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_shared ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_read_shared ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,152 +1,87 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_all_begin'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_all_begin ${rank} CH "character${dim}"
output MPI_File_write_all_begin ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all_begin ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all_begin ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all_begin ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,144 +1,86 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_all_end'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_all_end ${rank} CH "character${dim}"
output MPI_File_write_all_end ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all_end ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all_end ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all_end ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_all'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_all ${rank} CH "character${dim}"
output MPI_File_write_all ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_all ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,183 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_at_all_begin'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
# JMS: Override -- need to make the back-end function less than 31
# characters because F90 standard says that symbol max lengths are 31
# characters. So change the value of $procedure to something slightly
# shorter. $proc, hard code it to something slightly different.
# #$%@#$%@#$%
short=MPI_File_wr_at_all_begin
check_size medium
if test "$output" = "0"; then
exit 0
fi
rank=0
for kind in $lkinds
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${short}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${short}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${short}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${short}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${short}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_at_all_begin ${rank} CH "character${dim}"
output MPI_File_write_at_all_begin ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${short}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all_begin ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${short}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all_begin ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${short}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all_begin ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,144 +1,86 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_at_all_end'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_at_all_end ${rank} CH "character${dim}"
output MPI_File_write_at_all_end ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all_end ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all_end ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all_end ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_at_all'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_at_all ${rank} CH "character${dim}"
output MPI_File_write_at_all ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at_all ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_at'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
integer(kind=MPI_OFFSET_KIND), intent(in) :: offset
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_at ${rank} CH "character${dim}"
output MPI_File_write_at ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, offset, buf, count, datatype, &
status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_OFFSET_KIND), intent(in) :: offset"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, offset, buf, count, datatype, &
status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_at ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write ${rank} CH "character${dim}"
output MPI_File_write ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,155 +1,87 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_ordered_begin'
# allow for 2 char rank, 2 char for type, 2 char for kind and
# still be 31 characters or less
procedure="`echo ${procedure} | cut -c1-25`"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_ordered_begin ${rank} CH "character${dim}"
output MPI_File_write_ordered_begin ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered_begin ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered_begin ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered_begin ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,144 +1,86 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_ordered_end'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, status, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_ordered_end ${rank} CH "character${dim}"
output MPI_File_write_ordered_end ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered_end ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered_end ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, status, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered_end ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_ordered'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_ordered ${rank} CH "character${dim}"
output MPI_File_write_ordered ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_ordered ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,176 +1,90 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_File_write_shared'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)
include "mpif.h"
integer, intent(inout) :: fh
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, dimension(MPI_STATUS_SIZE), intent(out) :: status
integer, intent(out) :: ierr
call ${procedure}(fh, buf, count, datatype, status&
, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_File_write_shared ${rank} CH "character${dim}"
output MPI_File_write_shared ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_shared ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_shared ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(fh, buf, count, datatype, status&
, ierr)"
echo " use mpi_kinds"
echo " integer, intent(inout) :: fh"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, dimension(MPI_STATUS_SIZE), intent(out) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(fh, buf, count, datatype, status&
, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_File_write_shared ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

93
ompi/mpi/f90/scripts/mpi_gather_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,93 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, root, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcount
integer, intent(in) :: recvtype
integer, intent(in) :: root
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, root, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Gather ${rank} CH "character${dim}"
output MPI_Gather ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Gather ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Gather ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Gather ${rank} C${kind} "complex*${kind}${dim}"
done
done

94
ompi/mpi/f90/scripts/mpi_gatherv_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,94 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, recvbuf, recvcounts, &
displs, recvtype, root, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, dimension(*), intent(in) :: recvcounts
integer, dimension(*), intent(in) :: displs
integer, intent(in) :: recvtype
integer, intent(in) :: root
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, recvbuf, recvcounts, &
displs, recvtype, root, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Gatherv ${rank} CH "character${dim}"
output MPI_Gatherv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Gatherv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Gatherv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Gatherv ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,200 +1,93 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Get'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)
include "mpif.h"
${type}, intent(in) :: origin_addr
integer, intent(in) :: origin_count
integer, intent(in) :: origin_datatype
integer, intent(in) :: target_rank
integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp
integer, intent(in) :: target_count
integer, intent(in) :: target_datatype
integer, intent(in) :: win
integer, intent(out) :: ierr
call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Get ${rank} CH "character${dim}"
output MPI_Get ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Get ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Get ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Get ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Ibsend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Ibsend ${rank} CH "character${dim}"
output MPI_Ibsend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ibsend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ibsend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ibsend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Irecv'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Irecv ${rank} CH "character${dim}"
output MPI_Irecv ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Irecv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Irecv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Irecv ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Irsend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Irsend ${rank} CH "character${dim}"
output MPI_Irsend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Irsend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Irsend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Irsend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Isend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Isend ${rank} CH "character${dim}"
output MPI_Isend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Isend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Isend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Isend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Issend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Issend ${rank} CH "character${dim}"
output MPI_Issend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Issend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Issend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Issend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

92
ompi/mpi/f90/scripts/mpi_pack_external_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(datarep, inbuf, incount, datatype, outbuf, &
outsize, position, ierr)
include "mpif.h"
character(len=*), intent(in) :: datarep
${type}, intent(in) :: inbuf
integer, intent(in) :: incount
integer, intent(in) :: datatype
${type}, intent(out) :: outbuf
integer(kind=MPI_ADDRESS_KIND), intent(in) :: outsize
integer(kind=MPI_ADDRESS_KIND), intent(inout) :: position
integer, intent(out) :: ierr
call ${procedure}(datarep, inbuf, incount, datatype, outbuf, &
outsize, position, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Pack_external ${rank} CH "character${dim}"
output MPI_Pack_external ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Pack_external ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Pack_external ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Pack_external ${rank} C${kind} "complex*${kind}${dim}"
done
done

92
ompi/mpi/f90/scripts/mpi_pack_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(inbuf, incount, datatype, outbuf, outsize, &
position, comm, ierr)
include "mpif.h"
${type}, intent(in) :: inbuf
integer, intent(in) :: incount
integer, intent(in) :: datatype
${type}, intent(out) :: outbuf
integer, intent(out) :: outsize
integer, intent(inout) :: position
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(inbuf, incount, datatype, outbuf, outsize, &
position, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Pack ${rank} CH "character${dim}"
output MPI_Pack ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Pack ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Pack ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Pack ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,200 +1,93 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Put'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)
include "mpif.h"
${type}, intent(in) :: origin_addr
integer, intent(in) :: origin_count
integer, intent(in) :: origin_datatype
integer, intent(in) :: target_rank
integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp
integer, intent(in) :: target_count
integer, intent(in) :: target_datatype
integer, intent(in) :: win
integer, intent(out) :: ierr
call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Put ${rank} CH "character${dim}"
output MPI_Put ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Put ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Put ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Put ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Recv'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)
include "mpif.h"
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Recv ${rank} CH "character${dim}"
output MPI_Recv ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Recv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Recv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Recv ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Recv_init'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(out) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: source
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Recv_init ${rank} CH "character${dim}"
output MPI_Recv_init ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Recv_init ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Recv_init ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(out) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, source, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Recv_init ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

92
ompi/mpi/f90/scripts/mpi_reduce_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
root, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
${type}, intent(out) :: recvbuf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: op
integer, intent(in) :: root
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
root, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Reduce ${rank} CH "character${dim}"
output MPI_Reduce ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Reduce ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Reduce ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Reduce ${rank} C${kind} "complex*${kind}${dim}"
done
done

91
ompi/mpi/f90/scripts/mpi_reduce_scatter_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, recvbuf, recvcounts, datatype, op, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcounts
integer, intent(in) :: datatype
integer, intent(in) :: op
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, recvbuf, recvcounts, datatype, op, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Reduce_scatter ${rank} CH "character${dim}"
output MPI_Reduce_scatter ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Reduce_scatter ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Reduce_scatter ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Reduce_scatter ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Rsend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: ibuf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Rsend ${rank} CH "character${dim}"
output MPI_Rsend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Rsend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Rsend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: ibuf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(ibuf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Rsend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Rsend_init'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Rsend_init ${rank} CH "character${dim}"
output MPI_Rsend_init ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Rsend_init ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Rsend_init ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Rsend_init ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

91
ompi/mpi/f90/scripts/mpi_scan_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
${type}, intent(out) :: recvbuf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: op
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, recvbuf, count, datatype, op, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Scan ${rank} CH "character${dim}"
output MPI_Scan ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Scan ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Scan ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Scan ${rank} C${kind} "complex*${kind}${dim}"
done
done

93
ompi/mpi/f90/scripts/mpi_scatter_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,93 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, root, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcount
integer, intent(in) :: recvtype
integer, intent(in) :: root
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, recvbuf, recvcount, &
recvtype, root, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Scatter ${rank} CH "character${dim}"
output MPI_Scatter ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Scatter ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Scatter ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Scatter ${rank} C${kind} "complex*${kind}${dim}"
done
done

94
ompi/mpi/f90/scripts/mpi_scatterv_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,94 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcounts, displs, sendtype, recvbuf, &
recvcount, recvtype, root, comm, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcounts
integer, intent(in) :: displs
integer, intent(in) :: sendtype
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcount
integer, intent(in) :: recvtype
integer, intent(in) :: root
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcounts, displs, sendtype, recvbuf, &
recvcount, recvtype, root, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Scatterv ${rank} CH "character${dim}"
output MPI_Scatterv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Scatterv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Scatterv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Scatterv ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Send'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Send ${rank} CH "character${dim}"
output MPI_Send ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Send ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Send ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Send ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Send_init'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Send_init ${rank} CH "character${dim}"
output MPI_Send_init ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Send_init ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Send_init ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Send_init ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

97
ompi/mpi/f90/scripts/mpi_sendrecv_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,97 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(sendbuf, sendcount, sendtype, dest, sendtag, &
recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr)
include "mpif.h"
${type}, intent(in) :: sendbuf
integer, intent(in) :: sendcount
integer, intent(in) :: sendtype
integer, intent(in) :: dest
integer, intent(in) :: sendtag
${type}, intent(out) :: recvbuf
integer, intent(in) :: recvcount
integer, intent(in) :: recvtype
integer, intent(in) :: source
integer, intent(in) :: recvtag
integer, intent(in) :: comm
integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status
integer, intent(out) :: ierr
call ${procedure}(sendbuf, sendcount, sendtype, dest, sendtag, &
recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Sendrecv ${rank} CH "character${dim}"
output MPI_Sendrecv ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Sendrecv ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Sendrecv ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Sendrecv ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,208 +1,94 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Sendrecv_replace'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)
include "mpif.h"
${type}, intent(inout) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: sendtag
integer, intent(in) :: source
integer, intent(in) :: recvtag
integer, intent(in) :: comm
integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Sendrecv_replace ${rank} CH "character${dim}"
output MPI_Sendrecv_replace ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Sendrecv_replace ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Sendrecv_replace ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(inout) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: sendtag"
echo " integer, intent(in) :: source"
echo " integer, intent(in) :: recvtag"
echo " integer, intent(in) :: comm"
echo " integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, sendtag, &
source, recvtag, comm, status, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Sendrecv_replace ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -9,10 +9,10 @@ for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: x"
echo " logical*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_LOGICAL${kind}"
@ -25,10 +25,10 @@ for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: x"
echo " integer*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_INT${kind}"
@ -41,10 +41,10 @@ for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: x"
echo " real*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_REAL${kind}"
@ -60,10 +60,10 @@ do
case "$kind" in 16) size_kind='32' ; esac
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: x"
echo " complex*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_COMPLEX${size_kind}"
@ -87,10 +87,10 @@ do
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: x"
echo " logical*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_LOGICAL${kind}"
@ -103,10 +103,10 @@ do
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: x"
echo " integer*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_INT${kind}"
@ -119,10 +119,10 @@ do
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: x"
echo " real*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_REAL${kind}"
@ -138,10 +138,10 @@ do
case "$kind" in 16) size_kind='32' ; esac
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " use mpi_kinds"
echo " include 'mpif.h'"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: x"
echo " complex*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OMPI_SIZEOF_F90_COMPLEX${size_kind}"

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Ssend'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Ssend ${rank} CH "character${dim}"
output MPI_Ssend ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ssend ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ssend ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ssend ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,192 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Ssend_init'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)
include "mpif.h"
${type}, intent(in) :: buf
integer, intent(in) :: count
integer, intent(in) :: datatype
integer, intent(in) :: dest
integer, intent(in) :: tag
integer, intent(in) :: comm
integer, intent(out) :: request
integer, intent(out) :: ierr
call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Ssend_init ${rank} CH "character${dim}"
output MPI_Ssend_init ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ssend_init ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ssend_init ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: buf"
echo " integer, intent(in) :: count"
echo " integer, intent(in) :: datatype"
echo " integer, intent(in) :: dest"
echo " integer, intent(in) :: tag"
echo " integer, intent(in) :: comm"
echo " integer, intent(out) :: request"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(buf, count, datatype, dest, tag, &
comm, request, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Ssend_init ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

92
ompi/mpi/f90/scripts/mpi_unpack_external_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(datarep, inbuf, insize, position, outbuf, &
outcount, datatype, ierr)
include "mpif.h"
character(len=*), intent(in) :: datarep
${type}, intent(in) :: inbuf
integer(kind=MPI_ADDRESS_KIND), intent(in) :: insize
integer(kind=MPI_ADDRESS_KIND), intent(inout) :: position
${type}, intent(out) :: outbuf
integer, intent(in) :: outcount
integer, intent(in) :: datatype
integer, intent(out) :: ierr
call ${procedure}(datarep, inbuf, insize, position, outbuf, &
outcount, datatype, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Unpack_external ${rank} CH "character${dim}"
output MPI_Unpack_external ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Unpack_external ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Unpack_external ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Unpack_external ${rank} C${kind} "complex*${kind}${dim}"
done
done

92
ompi/mpi/f90/scripts/mpi_unpack_f90.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,92 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
check_size large
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(inbuf, insize, position, outbuf, outcount, &
datatype, comm, ierr)
include "mpif.h"
${type}, intent(in) :: inbuf
integer, intent(in) :: insize
integer, intent(inout) :: position
${type}, intent(out) :: outbuf
integer, intent(in) :: outcount
integer, intent(in) :: datatype
integer, intent(in) :: comm
integer, intent(out) :: ierr
call ${procedure}(inbuf, insize, position, outbuf, outcount, &
datatype, comm, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Unpack ${rank} CH "character${dim}"
output MPI_Unpack ${rank} L "logical${dim}"
for kind in $ikinds
do
output MPI_Unpack ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
output MPI_Unpack ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
output MPI_Unpack ${rank} C${kind} "complex*${kind}${dim}"
done
done

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

@ -1,184 +1,91 @@
#! /bin/sh
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
. "$1/fortran_kinds.sh"
procedure='MPI_Win_create'
# This entire file is only generated in medium/large modules. So if
# we're not at least medium, bail now.
rank=0
for kind in $lkinds
check_size medium
if test "$output" = "0"; then
exit 0
fi
# Ok, we should continue.
allranks="0 $ranks"
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat <<EOF
subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)
include "mpif.h"
${type}, intent(in) :: base
integer(kind=MPI_ADDRESS_KIND), intent(in) :: size
integer, intent(in) :: disp_unit
integer, intent(in) :: info
integer, intent(in) :: comm
integer, intent(in) :: win
integer, intent(out) :: ierr
call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)
end subroutine ${proc}
EOF
}
for rank in $allranks
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
done
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
output MPI_Win_create ${rank} CH "character${dim}"
output MPI_Win_create ${rank} L "logical${dim}"
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Win_create ${rank} I${kind} "integer*${kind}${dim}"
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Win_create ${rank} R${kind} "real*${kind}${dim}"
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(base, size, disp_unit, info, comm, &
win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: base"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: size"
echo " integer, intent(in) :: disp_unit"
echo " integer, intent(in) :: info"
echo " integer, intent(in) :: comm"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(base, size, disp_unit, info, comm, &
win, ierr)"
echo "end subroutine ${proc}"
echo
output MPI_Win_create ${rank} C${kind} "complex*${kind}${dim}"
done
done
echo
echo

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

@ -1,19 +1,12 @@
<!-- LANL:license
<!--
...........................................................................
- This SOFTWARE has been authored by an employee or employees of the
- University of California, operator of the Los Alamos National Laboratory
- under Contract No. W-7405-ENG-36 with the U.S. Department of Energy.
- The U.S. Government has rights to use, reproduce, and distribute this
- SOFTWARE. The public may copy, distribute, prepare derivative works and
- publicly display this SOFTWARE without charge, provided that this Notice
- and any statement of authorship are reproduced on all copies. Neither
- the Government nor the University makes any warranty, express or implied,
- or assumes any liability or responsibility for the use of this SOFTWARE.
- If SOFTWARE is modified to produce derivative works, such modified
- SOFTWARE should be clearly marked, so as not to confuse it with the
- version available from LANL.
...........................................................................
- LANL:license
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
@ -33,7 +26,7 @@
<!-- global variables -->
<xsl:param name="test_function" select="unkown_function"/>
<xsl:param name="test_function" select="unknown_function"/>
<!--
@ -193,6 +186,16 @@
<xsl:choose>
<!-- idl types (annotate xml to specify what this type is) -->
<xsl:when test="@idl = 'MPI_Aint'">
<xsl:text> != MPI_AINT_VAL)</xsl:text>
</xsl:when>
<xsl:when test="@idl = 'MPI_Fint'">
<xsl:text> != INT_VAL)</xsl:text>
</xsl:when>
<!-- C++ types -->
<xsl:when test="@kind = 'void'">

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

@ -1,19 +1,12 @@
<!-- LANL:license
<!--
...........................................................................
- This SOFTWARE has been authored by an employee or employees of the
- University of California, operator of the Los Alamos National Laboratory
- under Contract No. W-7405-ENG-36 with the U.S. Department of Energy.
- The U.S. Government has rights to use, reproduce, and distribute this
- SOFTWARE. The public may copy, distribute, prepare derivative works and
- publicly display this SOFTWARE without charge, provided that this Notice
- and any statement of authorship are reproduced on all copies. Neither
- the Government nor the University makes any warranty, express or implied,
- or assumes any liability or responsibility for the use of this SOFTWARE.
- If SOFTWARE is modified to produce derivative works, such modified
- SOFTWARE should be clearly marked, so as not to confuse it with the
- version available from LANL.
...........................................................................
- LANL:license
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
@ -33,7 +26,7 @@
<!-- global variables -->
<xsl:param name="test_function" select="unkown_function"/>
<xsl:param name="test_function" select="unknown_function"/>
<!--
@ -51,14 +44,14 @@
-->
<xsl:template match="method">
<xsl:choose>
<xsl:when test="@template = 'yes'">
<xsl:call-template name="defineArrayFunctionBody"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="defineFunctionBody"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@template = 'yes'">
<xsl:call-template name="defineArrayFunctionBody"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="defineFunctionBody"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@ -88,31 +81,6 @@
- defineArrayFunctionBody
-->
<xsl:template name="defineArrayFunctionBody">
<xsl:text>
for rank in $ranks
do
case "$rank" in 1) dim=':' ; esac
case "$rank" in 2) dim=':,:' ; esac
case "$rank" in 3) dim=':,:,:' ; esac
case "$rank" in 4) dim=':,:,:,:' ; esac
case "$rank" in 5) dim=':,:,:,:,:' ; esac
case "$rank" in 6) dim=':,:,:,:,:,:' ; esac
case "$rank" in 7) dim=':,:,:,:,:,:,:' ; esac
</xsl:text>
<xsl:text> for kind in $ikinds</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> do</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> proc="${procedure}${rank}DI${kind}"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> echo "subroutine ${proc}(</xsl:text>
<xsl:call-template name="arg-list"/> <xsl:text>)"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> echo " use mpi_kinds"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:call-template name="decl-construct-list">
<xsl:with-param name="ws" select="' '"/>
</xsl:call-template>
@ -210,8 +178,17 @@ echo
<xsl:param name="ws" select="' '"/>
<xsl:for-each select="type[1]">
<xsl:value-of select="$ws"/>
<xsl:call-template name="decl-type-spec"/>
<xsl:choose>
<xsl:when test="@idl = 'choice'">
<xsl:call-template name="type-decl-stmt-choice">
<xsl:with-param name="arg" select="../@name"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$ws"/>
<xsl:call-template name="decl-type-spec"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:value-of select="concat(' :: ', @name)"/>
<xsl:for-each select="type[1]">
@ -229,6 +206,16 @@ echo
<xsl:choose>
<!-- idl types (annotate xml to specify what this type is) -->
<xsl:when test="@idl = 'MPI_Aint'">
<xsl:text>integer(kind=MPI_ADDRESS_KIND)</xsl:text>
</xsl:when>
<xsl:when test="@idl = 'MPI_Fint'">
<xsl:text>integer</xsl:text>
</xsl:when>
<!-- C++ types -->
<xsl:when test="@kind = 'void'">
@ -299,7 +286,7 @@ echo
<xsl:text>integer(kind=MPI_OFFSET_KIND)</xsl:text>
</xsl:when>
<xsl:when test="@usertype = 'MPI_Status'">
<xsl:text>integer(MPI_STATUS_SIZE)</xsl:text>
<xsl:text>integer, dimension(MPI_STATUS_SIZE)</xsl:text>
</xsl:when>
<xsl:when test="@usertype = 'MPI_Comm_errhandler_fn'">
<xsl:text>external</xsl:text>
@ -374,6 +361,31 @@ echo
</xsl:template>
<!--
- type-decl-stmt-choice <type>
-->
<xsl:template name="type-decl-stmt-choice">
<xsl:param name="arg"/>
<xsl:text> integer(kind=MPI_INTEGER4_KIND), dimension(8) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>1DI4
integer(kind=MPI_INTEGER4_KIND), dimension(2,4) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>2DI4
integer(kind=MPI_INTEGER4_KIND), dimension(2,1,4) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>3DI4
integer(kind=MPI_INTEGER4_KIND), dimension(2,1,1,4) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>4DI4
integer(kind=MPI_INTEGER4_KIND), dimension(2,1,1,1,4) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>5DI4
integer(kind=MPI_INTEGER4_KIND), dimension(2,1,1,1,1,4) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>6DI4
integer(kind=MPI_INTEGER4_KIND), dimension(2,1,1,1,1,1,4) :: </xsl:text>
<xsl:value-of select="$arg"/> <xsl:text>7DI4</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- type-spec-assign-val <type>
-->
@ -381,6 +393,16 @@ echo
<xsl:choose>
<!-- idl types (annotate xml to specify what this type is) -->
<xsl:when test="@idl = 'MPI_Aint'">
<xsl:text> = MPI_AINT_VAL</xsl:text>
</xsl:when>
<xsl:when test="@idl = 'MPI_Fint'">
<xsl:text> = INT_VAL</xsl:text>
</xsl:when>
<!-- C++ types -->
<xsl:when test="@kind = 'void'">

477
ompi/mpi/f90/xml/chasm-mpi.f90.sh.xsl Обычный файл
Просмотреть файл

@ -0,0 +1,477 @@
<!--
...........................................................................
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
<!--
- chasm-mpi.f90.xsl: creates F90 functions that call MPI equivalent
-
- Output should be directed to the file, Method_f90.f90
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="common.xsl"/>
<xsl:import href="common-C.xsl"/>
<xsl:import href="common-f90.xsl"/>
<xsl:output method="text"/>
<!-- global variables -->
<xsl:param name="test_function" select="unknown_function"/>
<xsl:param name="interface_size" select="medium"/>
<xsl:variable name="filename">
<xsl:call-template name="lower-case">
<xsl:with-param name="symbol" select="/library/scope/@name"/>
</xsl:call-template>
<xsl:text>_C.c</xsl:text>
</xsl:variable>
<xsl:variable name="header_file">
<xsl:call-template name="lower-case">
<xsl:with-param name="symbol" select="/library/scope/@name"/>
</xsl:call-template>
<xsl:text>_C.h</xsl:text>
</xsl:variable>
<!--
- root level
-->
<xsl:template match="/">
<xsl:call-template name="openFile">
<xsl:with-param name="filename" select="$filename"/>
</xsl:call-template>
<!-- output all include files -->
<xsl:call-template name="include-files">
<xsl:with-param name="filename" select="$filename"/>
</xsl:call-template>
<!-- define C bridging functions -->
<xsl:apply-templates select="/library/scope/method[@name=$test_function]"/>
<!--xsl:for-each select="library/scope">
<xsl:call-template name="defineFunctions"/>
</xsl:for-each-->
<xsl:call-template name="closeFile">
<xsl:with-param name="filename" select="$filename"/>
</xsl:call-template>
</xsl:template>
<!--
- method level: define program to call Fortran procedures>
-->
<xsl:template match="method">
<xsl:param name="module" select="../@name"/>
<xsl:value-of select="$nl"/>
<xsl:if test="@kind != 'No_F90'">
<xsl:if test="@template = 'yes'">
<xsl:call-template name="defineFunction"/>
</xsl:if>
</xsl:if>
</xsl:template>
<!--
- defineFunctions: define functions to call Fortran procedures <scope>
-->
<xsl:template name="defineFunctions">
<xsl:param name="module" select="@name"/>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:if test="@kind != 'No_F90'">
<xsl:if test="@template = 'yes'">
<xsl:call-template name="defineFunction"/>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
- defineFunction: define function to call Fortran procedures <method>
-->
<xsl:template name="defineFunction">
<xsl:param name="method" select="@name"/>
<xsl:text>
output() {
procedure=$1
rank=$2
type=$4
proc="$1$2D$3"
cat &lt;&lt;EOF
</xsl:text>
<xsl:call-template name="defineArrayFunctionBody"/>
<xsl:text>
EOF
}
for rank in $allranks
do
case "$rank" in 0) dim='' ; esac
case "$rank" in 1) dim=', dimension(:)' ; esac
case "$rank" in 2) dim=', dimension(:,:)' ; esac
case "$rank" in 3) dim=', dimension(:,:,:)' ; esac
case "$rank" in 4) dim=', dimension(:,:,:,:)' ; esac
case "$rank" in 5) dim=', dimension(:,:,:,:,:)' ; esac
case "$rank" in 6) dim=', dimension(:,:,:,:,:,:)' ; esac
case "$rank" in 7) dim=', dimension(:,:,:,:,:,:,:)' ; esac
</xsl:text>
<xsl:text> output </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> ${rank} CH "character${dim}"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> output </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> ${rank} L "logical${dim}"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> for kind in $ikinds</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> do</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> output </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> ${rank} I${kind} "integer*${kind}${dim}"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> done</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> for kind in $rkinds</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> do</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> output </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> ${rank} R${kind} "real*${kind}${dim}"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> done</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> for kind in $ckinds</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> do</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> output </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> ${rank} C${kind} "complex*${kind}${dim}"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> done</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text>done</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- defineArrayFunctionBody
-->
<xsl:template name="defineArrayFunctionBody">
<xsl:text>subroutine ${proc}(</xsl:text>
<xsl:call-template name="arg-list"/> <xsl:text>)</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> use mpi_kinds</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:call-template name="decl-construct-list">
<xsl:with-param name="ws" select="''"/>
<xsl:with-param name="void_type" select="'${type}'"/>
<xsl:with-param name="void_kind" select="''"/>
<xsl:with-param name="has_dim" select="0"/>
</xsl:call-template>
<xsl:for-each select="return[1]">
<xsl:if test="@name = 'ierr'">
<xsl:text> integer, intent(out) :: ierr</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:value-of select="$nl"/>
<xsl:text> call ${procedure}(</xsl:text>
<xsl:call-template name="arg-list"/> <xsl:text>)</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text>end subroutine ${proc}</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- arg-list <method>
-->
<xsl:template name="arg-list">
<xsl:for-each select="arg">
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:if test="position() = 5">
<xsl:text>&amp;</xsl:text>
<xsl:value-of select="concat($nl, ' ')"/>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="return[1]">
<xsl:if test="@name = 'ierr'">
<xsl:if test="../arg[1]">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="@name"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
- decl-construct-list <method>
-->
<xsl:template name="decl-construct-list">
<xsl:param name="ws" select="' '"/>
<xsl:param name="void_type"/>
<xsl:param name="void_kind"/>
<xsl:param name="has_dim" select="1"/>
<xsl:for-each select="arg">
<xsl:call-template name="type-decl-stmt">
<xsl:with-param name="ws" select="$ws"/>
<xsl:with-param name="void_type" select="$void_type"/>
<xsl:with-param name="void_kind" select="$void_kind"/>
<xsl:with-param name="has_dim" select="$has_dim"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- type-decl-stmt <arg>
-->
<xsl:template name="type-decl-stmt">
<xsl:param name="ws" select="' '"/>
<xsl:param name="void_type"/>
<xsl:param name="void_kind"/>
<xsl:param name="has_dim" select="1"/>
<xsl:value-of select="$ws"/>
<xsl:text> </xsl:text>
<xsl:for-each select="type[1]">
<xsl:call-template name="decl-type-spec">
<xsl:with-param name="void_type" select="$void_type"/>
<xsl:with-param name="void_kind" select="$void_kind"/>
<xsl:with-param name="has_dim" select="$has_dim"/>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="type/@kind != 'void'">
<xsl:value-of select="concat(', intent(', @intent, ')')"/>
</xsl:if>
<xsl:value-of select="concat(' :: ', @name, $nl)"/>
</xsl:template>
<!--
- decl-type-spec <arg>
-->
<xsl:template name="decl-type-spec">
<xsl:param name="void_type"/>
<xsl:param name="void_kind"/>
<xsl:param name="has_dim" select="1"/>
<xsl:choose>
<!-- C++ types -->
<xsl:when test="@kind = 'void'">
<xsl:value-of select="$void_type"/>
</xsl:when>
<xsl:when test="@kind = 'bool'">
<xsl:text>integer</xsl:text>
</xsl:when>
<xsl:when test="@kind = 'int'">
<xsl:choose>
<xsl:when test="@ikind = 'int'">
<xsl:text>integer</xsl:text>
</xsl:when>
<xsl:when test="@ikind = 'char'">
<xsl:text>character</xsl:text>
<xsl:if test="../../@kind = 'ptr'">
<xsl:text>(len=*)</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:text>UNSUPPORTED</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@kind = 'float'">
<xsl:text>UNSUPPORTED</xsl:text>
</xsl:when>
<xsl:when test="@kind = 'ptr'">
<xsl:for-each select="indirect[1]/type[1]">
<xsl:call-template name="decl-type-spec">
<xsl:with-param name="void_type" select="$void_type"/>
<xsl:with-param name="void_kind" select="$void_kind"/>
<xsl:with-param name="has_dim" select="$has_dim"/>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:when test="@kind = 'array'">
<xsl:for-each select="array[1]/type[1]">
<xsl:call-template name="decl-type-spec"/>
</xsl:for-each>
<xsl:text>, dimension(</xsl:text>
<xsl:for-each select="array[1]/dimension">
<xsl:value-of select="@extent"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:when test="@kind = 'ref'">
<xsl:for-each select="indirect/type">
<xsl:call-template name="type-spec">
<xsl:with-param name="depth" select="../@depth"/>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:when test="@kind = 'usertype'">
<xsl:choose>
<xsl:when test="@usertype = 'default_integer'">
<xsl:text>integer</xsl:text>
</xsl:when>
<xsl:when test="@usertype = 'MPI_Aint'">
<xsl:text>integer(kind=MPI_ADDRESS_KIND)</xsl:text>
</xsl:when>
<xsl:when test="@usertype = 'int64_t'">
<xsl:text>integer(kind=MPI_OFFSET_KIND)</xsl:text>
</xsl:when>
<xsl:when test="@usertype = 'MPI_Status'">
<xsl:text>integer, dimension(MPI_STATUS_SIZE)</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:param name="prefix" select="substring-before(@usertype, '_')"/>
<xsl:if test="$prefix = 'MPI'">
<xsl:text>integer</xsl:text>
</xsl:if>
<xsl:if test="$prefix != 'MPI'">
<xsl:text>UNSUPPORTED</xsl:text>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:text>UNSUPPORTED</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
- copyright: print copyright
-->
<xsl:template name="copyright">
<xsl:text>
#
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
</xsl:text>
</xsl:template>
<!--
- info: print information about file
-->
<xsl:template name="info">
<xsl:text>
#
# This file generates a Fortran code to bridge between an explicit F90
# generic interface and the F77 implementation.
#
# This file is automatically generated by either of the scripts
# ../xml/create_mpi_f90_medium.f90.sh or
# ../xml/create_mpi_f90_large.f90.sh
#
</xsl:text>
</xsl:template>
<!--
- openFile: print file header information
-->
<xsl:template name="openFile">
<xsl:param name="filename" select="''"/>
<xsl:text>#! /bin/sh</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:call-template name="copyright"/>
<xsl:call-template name="info"/>
<xsl:text>. "$1/fortran_kinds.sh"</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:text># This entire file is only generated in medium/large </xsl:text>
<xsl:text>modules. So if</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text># we're not at least medium, bail now.</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:text>check_size </xsl:text> <xsl:value-of select="$interface_size"/>
<xsl:value-of select="$nl"/>
<xsl:text>if test "$output" = "0"; then</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> exit 0</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text>fi</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:text># Ok, we should continue.</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:text>allranks="0 $ranks"</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- closeFile: finish up
-->
<xsl:template name="closeFile">
<xsl:param name="filename" select="''"/>
</xsl:template>
</xsl:stylesheet>

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

@ -1,19 +1,12 @@
<!-- LANL:license
<!--
...........................................................................
- This SOFTWARE has been authored by an employee or employees of the
- University of California, operator of the Los Alamos National Laboratory
- under Contract No. W-7405-ENG-36 with the U.S. Department of Energy.
- The U.S. Government has rights to use, reproduce, and distribute this
- SOFTWARE. The public may copy, distribute, prepare derivative works and
- publicly display this SOFTWARE without charge, provided that this Notice
- and any statement of authorship are reproduced on all copies. Neither
- the Government nor the University makes any warranty, express or implied,
- or assumes any liability or responsibility for the use of this SOFTWARE.
- If SOFTWARE is modified to produce derivative works, such modified
- SOFTWARE should be clearly marked, so as not to confuse it with the
- version available from LANL.
...........................................................................
- LANL:license
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
@ -33,6 +26,8 @@
<!-- global variables -->
<xsl:param name="test_function" select="unknown_function"/>
<xsl:variable name="filename">
<xsl:call-template name="lower-case">
<xsl:with-param name="symbol" select="/library/scope/@name"/>
@ -64,9 +59,7 @@
<!-- define C bridging functions -->
<xsl:for-each select="library/scope">
<xsl:call-template name="defineFunctions"/>
</xsl:for-each>
<xsl:apply-templates select="/library/scope/method[@name=$test_function]"/>
<xsl:call-template name="closeFile">
<xsl:with-param name="filename" select="$filename"/>
@ -74,6 +67,36 @@
</xsl:template>
<!--
- method level: define program to call Fortran procedures>
-->
<xsl:template match="method">
<xsl:param name="module" select="../@name"/>
<xsl:value-of select="$nl"/>
<xsl:if test="@template = 'yes'">
<xsl:if test="@kind != 'No_F90'">
<xsl:value-of select="$nl"/>
<xsl:text>procedure='</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>'</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:call-template name="defineArrayFunctionBody"/>
<xsl:text>echo</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text>echo</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:if>
</xsl:if>
</xsl:template>
<!--
- defineFunctions: define functions to call Fortran procedures <scope>
-->
@ -437,9 +460,7 @@ do
echo "end subroutine ${proc}"
echo
done
echo
done
echo
</xsl:text>
</xsl:template>
@ -593,7 +614,7 @@ echo
<xsl:text>integer(kind=MPI_OFFSET_KIND)</xsl:text>
</xsl:when>
<xsl:when test="@usertype = 'MPI_Status'">
<xsl:text>integer(MPI_STATUS_SIZE)</xsl:text>
<xsl:text>integer, dimension(MPI_STATUS_SIZE)</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:param name="prefix" select="substring-before(@usertype, '_')"/>
@ -622,7 +643,6 @@ echo
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:text>. fortran_kinds.sh</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>

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

@ -1,19 +1,12 @@
<!-- LANL:license
<!--
...........................................................................
- This SOFTWARE has been authored by an employee or employees of the
- University of California, operator of the Los Alamos National Laboratory
- under Contract No. W-7405-ENG-36 with the U.S. Department of Energy.
- The U.S. Government has rights to use, reproduce, and distribute this
- SOFTWARE. The public may copy, distribute, prepare derivative works and
- publicly display this SOFTWARE without charge, provided that this Notice
- and any statement of authorship are reproduced on all copies. Neither
- the Government nor the University makes any warranty, express or implied,
- or assumes any liability or responsibility for the use of this SOFTWARE.
- If SOFTWARE is modified to produce derivative works, such modified
- SOFTWARE should be clearly marked, so as not to confuse it with the
- version available from LANL.
...........................................................................
- LANL:license
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->

446
ompi/mpi/f90/xml/common-C.xsl Обычный файл
Просмотреть файл

@ -0,0 +1,446 @@
<!--
...........................................................................
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
<!--
- common templates for creating C files
-
- templates:
-
- openFile ([filename=''])
- closeFile ([filename=''])
-
- openExternC
- closeExternC
-
- function-decl ([id=function-id, ws='']) <method>
- param-type-list <method>
- param-list <method>
- param-decl ([id=param-id]) <arg>
-
- function-def ([id=function-id, ws='', module]) <method>
- param-type-id-list <method>
- param-id-list <method>
-
- compound-statement <method>
- decl-list <method>
- decl-list-decl-rtn <method>
- decl-list-decl-arg <method>
-
- statement-list <method>
- call-statement <method>
-
- arg-list <method>
- arg-list-hidden <method>
-
- type-conv-name-ext <arg/type>
-
- function-id <method>
- param-id <arg>
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="type-conversions.xsl"/>
<xsl:output method="text"/>
<!--
- openFile: print file header information
-->
<xsl:template name="openFile">
<xsl:param name="filename" select="''"/>
<xsl:text>/**</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> * </xsl:text>
<xsl:if test="$filename != ''">
<xsl:value-of select="$filename"/>
</xsl:if>
<xsl:text> - this file is automatically generated</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> */</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- closeFile: finish up
-->
<xsl:template name="closeFile">
<xsl:param name="filename" select="''"/>
</xsl:template>
<!--
- openExternC: open extern "C" declaration
-->
<xsl:template name="openExternC">
<xsl:text>#ifdef __cplusplus</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text>extern "C" {</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text>#endif</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- closeExternC: close extern "C" declaration
-->
<xsl:template name="closeExternC">
<xsl:text>#ifdef __cplusplus</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text>}</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text>#endif</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- function-decl <method>
- type-qual type-spec function-id ( param-type-list );
-->
<xsl:template name="function-decl">
<xsl:param name="id">
<xsl:call-template name="function-id"/>
</xsl:param>
<xsl:param name="ws" select="''"/>
<xsl:value-of select="$ws"/>
<xsl:if test="@kind = 'static'">
<xsl:text>static </xsl:text>
</xsl:if>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="type-spec"/>
</xsl:for-each>
<xsl:text> </xsl:text>
<xsl:value-of select="$id"/>
<xsl:text>(</xsl:text>
<xsl:call-template name="param-type-list"/>
<xsl:text>);</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- param-type-list <method>
-->
<xsl:template name="param-type-list">
<xsl:param name="with_hidden" select="'no'"/>
<xsl:call-template name="param-list">
<xsl:with-param name="with_hidden" select="$with_hidden"/>
</xsl:call-template>
</xsl:template>
<!--
- param-list <method>
-
- NOTE, changed to use apply-templates to get around Xalan-C bug in ver 1.9.
-->
<xsl:template name="param-list">
<xsl:param name="with_hidden" select="'no'"/>
<xsl:apply-templates select="arg" mode="param-decl">
<xsl:with-param name="with_hidden" select="$with_hidden"/>
</xsl:apply-templates>
<xsl:apply-templates select="arg" mode="param-decl-hidden">
<xsl:with-param name="with_hidden" select="$with_hidden"/>
</xsl:apply-templates>
</xsl:template>
<!--
- param-decl - arg node
-->
<xsl:template match="arg" mode="param-decl">
<xsl:variable name="hide_arg">
<xsl:call-template name="hide-arg"/>
</xsl:variable>
<xsl:if test="$hide_arg = 'no'">
<xsl:call-template name="param-decl"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:if>
</xsl:template>
<!--
- param-decl-hidden - arg node
-->
<xsl:template match="arg" mode="param-decl-hidden">
<xsl:param name="with_hidden" select="'no'"/>
<xsl:if test="$with_hidden = 'yes'">
<xsl:variable name="hidden">
<xsl:call-template name="param-decl-hidden"/>
</xsl:variable>
<xsl:if test="$hidden != ''">
<xsl:value-of select="concat(', ', $hidden)"/>
</xsl:if>
</xsl:if>
</xsl:template>
<!--
- param-decl <arg>
- type-qual type-spec pointer param-id
-->
<xsl:template name="param-decl">
<xsl:param name="id">
<xsl:call-template name="param-id"/>
</xsl:param>
<xsl:variable name="type_qual">
<xsl:call-template name="type-qual"/>
</xsl:variable>
<xsl:if test="$type_qual != ''">
<xsl:value-of select="concat($type_qual, ' ')"/>
</xsl:if>
<xsl:for-each select="type[1]">
<xsl:call-template name="type-spec"/>
<xsl:call-template name="pointer"/>
</xsl:for-each>
<xsl:if test="$id != ''">
<xsl:value-of select="concat(' ', $id)"/>
</xsl:if>
</xsl:template>
<!--
- param-decl-hidden <arg>
-->
<xsl:template name="param-decl-hidden">
</xsl:template>
<!--
- function-def <method>
- type-qual-rtn type-spec-rtn function-id ( param-type-id-list )
- compound-statement = { decl-list statement-list }
-->
<xsl:template name="function-def">
<xsl:param name="id">
<xsl:call-template name="function-id"/>
</xsl:param>
<xsl:param name="ws" select="''"/>
<xsl:param name="module"/>
<xsl:value-of select="$ws"/>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="type-qual-rtn"/>
</xsl:for-each>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="type-spec-rtn"/>
</xsl:for-each>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$id"/>
<xsl:text>(</xsl:text>
<xsl:call-template name="param-type-id-list">
<xsl:with-param name="module" select="$module"/>
</xsl:call-template>
<xsl:text>)</xsl:text> <xsl:value-of select="$nl"/>
<xsl:call-template name="compound-statement">
<xsl:with-param name="function_id" select="$id"/>
</xsl:call-template>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- param-type-id-list ([module]) <method>
-->
<xsl:template name="param-type-id-list">
<xsl:param name="module"/>
<xsl:call-template name="param-id-list">
<xsl:with-param name="module" select="$module"/>
</xsl:call-template>
</xsl:template>
<!--
- param-id-list ([module]) <method>
-->
<xsl:template name="param-id-list">
<xsl:param name="module"/>
<xsl:for-each select="arg">
<xsl:call-template name="param-decl">
<xsl:with-param name="id" select="@name"/>
</xsl:call-template>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
- compound-statement <method>
- decl-list statement-list
-->
<xsl:template name="compound-statement">
<xsl:param name="function_id">
<xsl:call-template name="function-id"/>
</xsl:param>
<xsl:text>{</xsl:text> <xsl:value-of select="$nl"/>
<xsl:call-template name="decl-list"/>
<xsl:call-template name="statement-list">
<xsl:with-param name="function_id" select="$function_id"/>
</xsl:call-template>
<xsl:text>}</xsl:text> <xsl:value-of select="$nl"/>
</xsl:template>
<!--
- decl-list <method>
-->
<xsl:template name="decl-list">
<xsl:for-each select="return[1]/type">
<xsl:call-template name="decl-list-decl-rtn"/>
</xsl:for-each>
<xsl:for-each select="arg/type">
<xsl:call-template name="decl-list-decl-arg"/>
</xsl:for-each>
</xsl:template>
<!--
- decl-list-decl-rtn ([rtn_id=rtn-id, ws=' ']) <return/type>
-->
<xsl:template name="decl-list-decl-rtn">
</xsl:template>
<!--
- decl-list-decl-arg ([arg_id=arg-id, ws=' ']) <arg/type>
-->
<xsl:template name="decl-list-decl-arg">
</xsl:template>
<!--
- statement-list <method>
-->
<xsl:template name="statement-list">
<xsl:param name="function_id">
<xsl:call-template name="function-id"/>
</xsl:param>
<xsl:call-template name="statement-list-pre-call"/>
<xsl:call-template name="call-statement">
<xsl:with-param name="id">
<xsl:text>PTR_</xsl:text> <xsl:value-of select="$function_id"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="statement-list-post-call"/>
</xsl:template>
<!--
- statement-list-pre-call <method>
-->
<xsl:template name="statement-list-pre-call">
<xsl:param name="ws" select="' '"/>
</xsl:template>
<!--
- statement-list-post-call <method>
-->
<xsl:template name="statement-list-post-call">
<xsl:param name="ws" select="' '"/>
</xsl:template>
<!--
- call-statement <method>
- rtn-id assignment-operator function-id (arg-list)
-->
<xsl:template name="call-statement">
<xsl:param name="id">
<xsl:call-template name="function-id"/>
</xsl:param>
<xsl:param name="ws" select="' '"/>
<xsl:value-of select="$ws"/>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="rtn-id"/>
<xsl:call-template name="assignment-operator"/>
</xsl:for-each>
<xsl:value-of select="$id"/>
<xsl:text>(</xsl:text>
<xsl:call-template name="arg-list"/>
<xsl:text>)</xsl:text>
<xsl:text>;</xsl:text> <xsl:value-of select="$nl"/>
</xsl:template>
<!--
- arg-list <method>
-->
<xsl:template name="arg-list">
<xsl:for-each select="arg/type">
<xsl:variable name="ext">
<xsl:call-template name="type-conv-name-ext"/>
</xsl:variable>
<xsl:call-template name="address-operator"/>
<xsl:call-template name="arg-id"/>
<xsl:value-of select="$ext"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:call-template name="arg-list-hidden"/>
</xsl:template>
<!--
- arg-list-hidden <method>
-->
<xsl:template name="arg-list-hidden">
</xsl:template>
<!--
- type-conv-name-ext <arg/type>
-->
<xsl:template name="type-conv-name-ext">
<xsl:param name="depth" select="0"/>
</xsl:template>
<!--
- type-conv-statement <method/arg/type>
-->
<xsl:template name="type-conv-statement">
<xsl:param name="depth" select="0"/>
<xsl:param name="ws"/>
<xsl:param name="arg_name"/>
<xsl:param name="ext"/>
</xsl:template>
<!--
- function-id <method>
-->
<xsl:template name="function-id">
<xsl:value-of select="@name"/>
</xsl:template>
<!--
- param-id <method>
-->
<xsl:template name="param-id"/>
<!--
- hide-arg <arg>
- return yes if arg is not to be included in parameter list
-->
<xsl:template name="hide-arg">
<xsl:text>no</xsl:text>
</xsl:template>
</xsl:stylesheet>

732
ompi/mpi/f90/xml/common-f90.xsl Обычный файл
Просмотреть файл

@ -0,0 +1,732 @@
<!--
...........................................................................
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
<!--
- common templates for creating C files
-
- templates:
-
- defineInitMacro ([module=@name]) <scope>
- defineMacros ([module=@name]) <scope>
- def-macro-lower
- def-macro-upper
-
- declareInitFunction <scope>
-
- declareFunctionPointers ([module=@name]) <scope>
- decl-function-pointer
-
- defineSetFunctionPointers ([module=@name]) <scope>
- def-set-function-pointer
-
- defineFunctions ([module=@name]) <scope>
-
- decl-arg-list <method>
- param-decl-hidden <arg>
-
- use-stmt-list ([ws=' ']) <method>
- use-stmt <arg>
-
- decl-construct-list ([ws=' ']) <method>
- type-decl-stmt <arg>
-
- assign-stmt-list ([ws=' ']) <method>
- assign-stmt <arg>
-
- call-stmt ([ws=' ']) <method>
- call-or-assign <method>
- proc-designator <method>
-
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="type-conv-f90.xsl"/>
<!--
- defineInitMacro: define macro for Fortran init module procedure <scope>
-->
<xsl:template name="defineInitMacro">
<xsl:param name="module" select="@name"/>
<xsl:text>/**</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> * Macros to create Fortran symbols</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> */</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<!-- lower case -->
<xsl:text>#if defined(F90_SYM_CASE_LOWER)</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:call-template name="def-macro-lower">
<xsl:with-param name="symbol">
<xsl:text>CH_INIT_</xsl:text> <xsl:value-of select="$module"/>
</xsl:with-param>
</xsl:call-template>
<!-- upper case -->
<xsl:text>#elif defined(F90_SYM_CASE_UPPER)</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:call-template name="def-macro-upper">
<xsl:with-param name="symbol">
<xsl:text>CH_INIT_</xsl:text> <xsl:value-of select="$module"/>
</xsl:with-param>
</xsl:call-template>
<xsl:text>#endif /* F90_SYM_CASE */</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- defineMacros: define macros for Fortran symbols <scope>
-->
<xsl:template name="defineMacros">
<xsl:param name="module" select="@name"/>
<xsl:param name="symbol" select="''"/>
<xsl:text>/**</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> * Macros to create Fortran symbols</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> */</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<!-- lower case -->
<xsl:text>#if defined(F90_SYM_CASE_LOWER)</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:if test='string-length($symbol) &gt; 0'>
<xsl:call-template name="def-macro-lower">
<xsl:with-param name="symbol" select="$symbol"/>
</xsl:call-template>
</xsl:if>
<xsl:call-template name="def-macro-lower">
<xsl:with-param name="symbol">
<xsl:text>SET_</xsl:text> <xsl:value-of select="$module"/>
<xsl:text>_</xsl:text> <xsl:value-of select="@name"/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<!-- upper case -->
<xsl:text>#elif defined(F90_SYM_CASE_UPPER)</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:if test='string-length($symbol) &gt; 0'>
<xsl:call-template name="def-macro-upper">
<xsl:with-param name="symbol" select="$symbol"/>
</xsl:call-template>
</xsl:if>
<xsl:call-template name="def-macro-upper">
<xsl:with-param name="symbol">
<xsl:text>SET_</xsl:text> <xsl:value-of select="$module"/>
<xsl:text>_</xsl:text> <xsl:value-of select="@name"/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:text>#endif /* F90_SYM_CASE */</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- def-macro-lower
-->
<xsl:template name="def-macro-lower">
<xsl:param name="symbol"/>
<xsl:variable name="sym_lower">
<xsl:call-template name="lower-case">
<xsl:with-param name="symbol" select="$symbol"/>
</xsl:call-template>
</xsl:variable>
<xsl:text># define </xsl:text> <xsl:value-of select="$symbol"/>
<xsl:text> F90_SYMBOL(</xsl:text> <xsl:value-of select="$sym_lower"/>
<xsl:text>)</xsl:text> <xsl:value-of select="$nl"/>
</xsl:template>
<!--
- def-macro-upper
-->
<xsl:template name="def-macro-upper">
<xsl:param name="symbol"/>
<xsl:variable name="sym_upper">
<xsl:call-template name="upper-case">
<xsl:with-param name="symbol" select="$symbol"/>
</xsl:call-template>
</xsl:variable>
<xsl:text># define </xsl:text> <xsl:value-of select="$symbol"/>
<xsl:text> F90_SYMBOL(</xsl:text> <xsl:value-of select="$sym_upper"/>
<xsl:text>)</xsl:text> <xsl:value-of select="$nl"/>
</xsl:template>
<!--
- declareFunctionPointers: declare pointers to Fortran procedures <scope>
-->
<xsl:template name="declareFunctionPointers">
<xsl:param name="module" select="@name"/>
<xsl:text>/**</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> * Pointers to Fortran procedures</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> */</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:call-template name="decl-function-pointer">
<xsl:with-param name="id">
<xsl:value-of select="$module"/> <xsl:text>_</xsl:text>
<xsl:value-of select="@name"/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- declareInitFunction <scope>
-->
<xsl:template name="declareInitFunction">
<xsl:param name="symbol">
<xsl:text>CH_INIT_</xsl:text> <xsl:value-of select="@name"/>
</xsl:param>
<xsl:value-of select="concat('/**', $nl)"/>
<xsl:text> * Declare Fortran initialization routine</xsl:text>
<xsl:value-of select="concat($nl, ' */', $nl)"/>
<xsl:text>void </xsl:text>
<xsl:value-of select="$symbol"/> <xsl:text>(void);</xsl:text>
<xsl:value-of select="concat($nl, $nl)"/>
</xsl:template>
<!--
- decl-function-pointer
- type-qual type-spec ( * PTR_ function-id ) ( param-type-list );
-->
<xsl:template name="decl-function-pointer">
<xsl:param name="id"/>
<xsl:param name="ws" select="''"/>
<xsl:param name="module"/>
<xsl:value-of select="$ws"/>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="type-spec"/>
</xsl:for-each>
<xsl:text> (*PTR_</xsl:text> <xsl:value-of select="$id"/>
<xsl:text>)(</xsl:text>
<xsl:call-template name="param-type-list">
<xsl:with-param name="with_hidden" select="'yes'"/>
</xsl:call-template>
<xsl:text>);</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- defineSetFunctionPointers: define functions to set pointers to Fortran
- procedures <scope>
-->
<xsl:template name="defineSetFunctionPointers">
<xsl:param name="module" select="@name"/>
<xsl:text>/**</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> * Functions to set pointers to Fortran procedures</xsl:text>
<xsl:text> (called from Fortran)</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> */</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:call-template name="def-set-function-pointer">
<xsl:with-param name="id">
<xsl:value-of select="$module"/> <xsl:text>_</xsl:text>
<xsl:value-of select="@name"/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- def-set-function-pointer
- void SET_ function-id ( type-qual type-spec (*fptr) ( param-type-list ) )
- { PTR_ function-id = fptr; }
-->
<xsl:template name="def-set-function-pointer">
<xsl:param name="id"/>
<xsl:param name="ws" select="''"/>
<xsl:param name="module"/>
<xsl:value-of select="$ws"/>
<xsl:text>void SET_</xsl:text> <xsl:value-of select="$id"/>
<xsl:text>(</xsl:text>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="type-spec"/>
</xsl:for-each>
<xsl:text> (*fptr)(</xsl:text>
<xsl:call-template name="param-type-list">
<xsl:with-param name="with_hidden" select="'yes'"/>
</xsl:call-template>
<xsl:text>))</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text>{</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> PTR_</xsl:text> <xsl:value-of select="$id"/>
<xsl:text> = fptr;</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text>}</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- defineFunctions: define functions to call Fortran procedures <scope>
-->
<xsl:template name="defineFunctions">
<xsl:param name="module" select="@name"/>
<xsl:text>/**</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> * Bridging functions to call Fortran procedures</xsl:text>
<xsl:value-of select="$nl"/>
<xsl:text> */</xsl:text> <xsl:value-of select="$nl"/>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:call-template name="function-def">
<xsl:with-param name="id">
<xsl:value-of select="$module"/> <xsl:text>_</xsl:text>
<xsl:value-of select="@name"/>
</xsl:with-param>
<xsl:with-param name="module" select="$module"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- defineMacros: define macros for Fortran symbols <scope>
-->
<xsl:template name="defineInitProc">
<xsl:param name="module" select="@name"/>
<xsl:param name="symbol" select="''"/>
<xsl:text>subroutine </xsl:text> <xsl:value-of select="$symbol"/>
<xsl:text>()</xsl:text> <xsl:value-of select="$nl"/>
<xsl:text> use </xsl:text> <xsl:value-of select="$module"/>
<xsl:value-of select="$nl"/>
<xsl:for-each select="method">
<xsl:text> call SET_</xsl:text> <xsl:value-of select="$module"/>
<xsl:text>_</xsl:text> <xsl:value-of select="@name"/>
<xsl:text>( </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> )</xsl:text> <xsl:value-of select="$nl"/>
</xsl:for-each>
<xsl:text>end subroutine </xsl:text> <xsl:value-of select="$symbol"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- decl-list-decl-rtn ([rtn_id=rtn-id, ws=' ']) <return/type>
-->
<xsl:template name="decl-list-decl-rtn">
<xsl:param name="rtn_id">
<xsl:call-template name="rtn-id"/>
</xsl:param>
<xsl:param name="ws" select="' '"/>
<xsl:if test='string-length($rtn_id) &gt; 0'>
<xsl:value-of select="$ws"/> <xsl:call-template name="type-spec"/>
<xsl:text> </xsl:text> <xsl:value-of select="$rtn_id"/>
<xsl:text>;</xsl:text> <xsl:value-of select="$nl"/>
</xsl:if>
</xsl:template>
<!--
- decl-list-decl-arg ([arg_id=arg-id, ws=' ']) <arg/type>
-->
<xsl:template name="decl-list-decl-arg">
<xsl:param name="arg_id">
<xsl:call-template name="arg-id"/>
</xsl:param>
<xsl:param name="ws" select="' '"/>
<xsl:call-template name="decl-list-decl-arg-f90">
<xsl:with-param name="arg_id" select="$arg_id"/>
<xsl:with-param name="ws" select="$ws"/>
</xsl:call-template>
</xsl:template>
<!--
- decl-list-decl-arg-f90 ([arg_id=arg-id, ws=' ']) <arg/type>
-->
<xsl:template name="decl-list-decl-arg-f90">
<xsl:param name="arg_id">
<xsl:call-template name="arg-id"/>
</xsl:param>
<xsl:param name="ws" select="' '"/>
<xsl:variable name="ext">
<xsl:call-template name="type-conv-name-ext"/>
</xsl:variable>
<xsl:if test="$ext != ''">
<xsl:value-of select="$ws"/>
<xsl:call-template name="type-spec"/>
<xsl:value-of select="concat(' ', ../@name, $ext, ';', $nl)"/>
</xsl:if>
<xsl:variable name="hidden">
<xsl:call-template name="type-spec-hidden"/>
</xsl:variable>
<xsl:variable name="ext_h">
<xsl:call-template name="type-conv-name-ext-hidden"/>
</xsl:variable>
<xsl:if test="$hidden != ''">
<xsl:value-of select="concat($ws, $hidden, ' ', ../@name, $ext_h, ';')"/>
<xsl:value-of select="($nl)"/>
</xsl:if>
</xsl:template>
<!--
- statement-list-pre-call <method>
-->
<xsl:template name="statement-list-pre-call">
<xsl:param name="ws" select="' '"/>
<xsl:for-each select="arg/type">
<xsl:variable name="ext">
<xsl:call-template name="type-conv-name-ext"/>
</xsl:variable>
<xsl:if test="$ext != ''">
<xsl:call-template name="type-conv-statement">
<xsl:with-param name="ws" select="$ws"/>
<xsl:with-param name="arg_name" select="../@name"/>
<xsl:with-param name="ext" select="$ext"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="arg/type">
<xsl:call-template name="type-statement-hidden-pre-call"/>
</xsl:for-each>
</xsl:template>
<!--
- statement-list-post-call <method>
-->
<xsl:template name="statement-list-post-call">
<xsl:param name="ws" select="' '"/>
<xsl:for-each select="arg/type">
<xsl:call-template name="type-statement-hidden-post-call"/>
</xsl:for-each>
</xsl:template>
<!--
- param-decl-hidden <arg>
- type-spec pointer param-id
-->
<xsl:template name="param-decl-hidden">
<xsl:param name="id">
<xsl:call-template name="param-id"/>
</xsl:param>
<xsl:for-each select="type[1]">
<xsl:call-template name="type-spec-hidden"/>
</xsl:for-each>
<xsl:if test="$id != ''">
<xsl:value-of select="concat(' ', $id)"/>
</xsl:if>
</xsl:template>
<!--
- type-statement-hidden-pre-call <arg/type>
-->
<xsl:template name="type-statement-hidden-pre-call">
<xsl:param name="ws" select="' '"/>
<xsl:choose>
<!-- Fortran types -->
<xsl:when test="@kind = 'fchar'">
<xsl:if test="@clen = '*'">
<xsl:value-of select="concat($ws, ../@name)"/>
<xsl:text>_h = strlen(</xsl:text>
<xsl:value-of select="concat(../@name, ');', $nl)"/>
</xsl:if>
</xsl:when>
<xsl:when test="@kind = 'farray'">
<xsl:call-template name="type-statement-hidden-pre-call-farray">
<xsl:with-param name="ws" select="$ws"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--
- type-statement-hidden-post-call <arg/type>
-->
<xsl:template name="type-statement-hidden-post-call">
<xsl:param name="ws" select="' '"/>
<xsl:choose>
<!-- Fortran types -->
<xsl:when test="@kind = 'farray'">
<xsl:call-template name="type-statement-hidden-post-call-farray">
<xsl:with-param name="ws" select="$ws"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--
- type-statement-hidden-pre-call-farray <arg/type>
-->
<xsl:template name="type-statement-hidden-pre-call-farray">
<xsl:param name="ws" select="' '"/>
<xsl:if test="array/dimension/@extent = '*'">
<xsl:value-of select="$ws"/>
<xsl:text>APPEND_F90_COMPILER(createArrayDescAndHidden) (</xsl:text>
<xsl:value-of select="concat(../@name, ', ', array/@rank)"/>
<xsl:text>, F90_Array, &amp;</xsl:text>
<xsl:value-of select="concat(../@name, '_dv, &amp;', ../@name, '_dvh')"/>
<xsl:text>);</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:if>
</xsl:template>
<!--
- type-statement-hidden-post-call-farray <arg/type>
-->
<xsl:template name="type-statement-hidden-post-call-farray">
<xsl:param name="ws" select="' '"/>
<xsl:variable name="ext">
<xsl:call-template name="type-conv-name-ext-hidden"/>
</xsl:variable>
<xsl:if test="array/dimension/@extent = '*'">
<xsl:value-of select="$ws"/>
<xsl:text>APPEND_F90_COMPILER(freeArrayDescAndHidden) (</xsl:text>
<xsl:value-of select="concat('F90_Array, ',../@name, '_dv, ')"/>
<xsl:value-of select="concat(../@name, $ext, ');', $nl)"/>
</xsl:if>
</xsl:template>
<!--
- arg-list-hidden <method>
-->
<xsl:template name="arg-list-hidden">
<xsl:for-each select="arg/type">
<xsl:variable name="hidden">
<xsl:call-template name="type-spec-hidden"/>
</xsl:variable>
<xsl:variable name="ext">
<xsl:call-template name="type-conv-name-ext-hidden"/>
</xsl:variable>
<xsl:if test="$hidden != ''">
<xsl:value-of select="concat(', ', ../@name, $ext)"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
- type-conv-name-ext <arg/type>
-->
<xsl:template name="type-conv-name-ext">
<xsl:param name="depth" select="0"/>
<xsl:choose>
<!-- Fortran types -->
<xsl:when test="@kind = 'farray'">
<xsl:if test="array/dimension/@extent = '*'">
<xsl:text>_dv</xsl:text>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--
- type-conv-name-ext-hidden <arg/type>
-->
<xsl:template name="type-conv-name-ext-hidden">
<xsl:param name="depth" select="0"/>
<xsl:choose>
<!-- Fortran types -->
<xsl:when test="@kind = 'fchar'">
<xsl:if test="@clen = '*'">
<xsl:text>_h</xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="@kind = 'farray'">
<xsl:if test="array/dimension/@extent = '*'">
<xsl:text>_dvh</xsl:text>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--
- use-stmt-list <method>
-->
<xsl:template name="use-stmt-list">
<xsl:param name="ws" select="' '"/>
<xsl:for-each select="arg">
<xsl:call-template name="use-stmt">
<xsl:with-param name="ws" select="$ws"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- use-stmt <arg>
-->
<xsl:template name="use-stmt">
<xsl:param name="ws" select="' '"/>
<xsl:if test="type/@kind = 'usertype'">
<xsl:value-of select="$ws"/> <xsl:text>use </xsl:text>
<xsl:value-of select="concat(type/@context, ', only : ')"/>
<xsl:value-of select="concat(type/@usertype, $nl)"/>
</xsl:if>
</xsl:template>
<!--
- decl-construct-list <method>
-->
<xsl:template name="decl-construct-list">
<xsl:param name="ws" select="' '"/>
<xsl:for-each select="arg">
<xsl:call-template name="type-decl-stmt">
<xsl:with-param name="ws" select="$ws"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- type-decl-stmt <arg>
-->
<xsl:template name="type-decl-stmt">
<xsl:param name="ws" select="' '"/>
<xsl:value-of select="$ws"/>
<xsl:for-each select="type[1]">
<xsl:call-template name="decl-type-spec"/>
</xsl:for-each>
<xsl:value-of select="concat(', intent(', @intent, ')')"/>
<xsl:value-of select="concat(' :: ', @name, '_l', $nl)"/>
</xsl:template>
<!--
- assign-stmt-list <method>
-->
<xsl:template name="assign-stmt-list">
<xsl:param name="ws" select="' '"/>
<xsl:for-each select="arg">
<xsl:call-template name="assign-stmt">
<xsl:with-param name="ws" select="$ws"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<!--
- assign-stmt <arg>
-->
<xsl:template name="assign-stmt">
<xsl:param name="ws" select="' '"/>
<xsl:param name="lowercase_name">
<xsl:call-template name="lower-case">
<xsl:with-param name="symbol" select="@name"/>
</xsl:call-template>
</xsl:param>
<xsl:value-of select="$ws"/>
<xsl:value-of select="concat(@name, '_l = ', $lowercase_name)"/>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- call-stmt <method>
- call-or-assign proc-designator ( act-arg-spec-list )
-->
<xsl:template name="call-stmt">
<xsl:param name="ws" select="' '"/>
<xsl:value-of select="$ws"/>
<xsl:for-each select="return[1]/type">
<xsl:call-template name="call-or-assign"/>
</xsl:for-each>
<xsl:call-template name="proc-designator"/>
<xsl:text>(</xsl:text>
<xsl:call-template name="act-arg-spec-list"/>
<xsl:text>)</xsl:text>
<xsl:value-of select="$nl"/>
</xsl:template>
<!--
- call-or-assign <return/type>
-->
<xsl:template name="call-or-assign">
<xsl:param name="rtn_id">
<xsl:call-template name="rtn-id"/>
</xsl:param>
<xsl:choose>
<xsl:when test="@kind = 'fvoid'">
<xsl:text>call </xsl:text>
</xsl:when>
<xsl:when test="$rtn_id != ''">
<xsl:value-of select="$rtn_id"/>
<xsl:text> = </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="../../@name"/>
<xsl:text> = </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
- act-arg-spec-list <method>
-->
<xsl:template name="act-arg-spec-list">
<xsl:for-each select="arg">
<xsl:value-of select="@name"/>
<xsl:text>_l</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
- proc-designator <method>
-->
<xsl:template name="proc-designator">
<xsl:value-of select="@name"/>
</xsl:template>
</xsl:stylesheet>

106
ompi/mpi/f90/xml/common.xsl Обычный файл
Просмотреть файл

@ -0,0 +1,106 @@
<!--
...........................................................................
Copyright (c) 2004-2006 The Regents of the University of California.
All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
...........................................................................
-->
<!--
- common templates for Chasm language interoperability system
-
- variables:
- nl - a newline "\n"
-
- templates:
-
- include-files
- include-file (filename)
- include-file-local (filename)
-
- upper-case (symbol)
- lower-case (symbol)
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<!--
- nl: a newline "\n"
-->
<xsl:variable name="nl">
<xsl:text>
</xsl:text>
</xsl:variable>
<!--
- include-files: include header files (to be overridden, this is a noop)
-->
<xsl:template name="include-files"/>
<!--
- include-file (filename): include named header file
-->
<xsl:template name="include-file">
<xsl:param name="filename"/>
<xsl:text>#include &lt;</xsl:text> <xsl:value-of select="$filename"/>
<xsl:text>&gt;</xsl:text> <xsl:value-of select="$nl"/>
</xsl:template>
<!--
- include-file-local (filename): include named header file
-->
<xsl:template name="include-file-local">
<xsl:param name="filename"/>
<xsl:text>#include &quot;</xsl:text> <xsl:value-of select="$filename"/>
<xsl:text>&quot;</xsl:text> <xsl:value-of select="$nl"/>
</xsl:template>
<!--
- upper-case (symbol): output symbol in upper case
-->
<xsl:template name="upper-case">
<xsl:param name="symbol"/>
<xsl:value-of select="translate($symbol,
'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
</xsl:template>
<!--
- lower-case (symbol): output symbol in lower case
-->
<xsl:template name="lower-case">
<xsl:param name="symbol"/>
<xsl:value-of select="translate($symbol,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')"/>
</xsl:template>
<!--
- name-ifnot-alias : choose alias or name if no alias
-->
<xsl:template name="name-ifnot-alias">
<xsl:choose>
<xsl:when test="@alias">
<xsl:value-of select="@alias"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

18
ompi/mpi/f90/xml/create_mpi_f90_large.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,18 @@
#! /bin/sh
XSL_PATH=.
OUT_PATH=../scripts
. functions_f90_large.list
if test "$1" != ""; then
procedures=$1
fi
for proc in $procedures
do
lc_proc=`echo ${proc}|tr '[A-Z]' '[a-z]'`
echo "creating ${lc_proc}_f90.f90.sh"
Xalan -p test_function "'${proc}'" -p interface_size "'large'" -o ${OUT_PATH}/${lc_proc}_f90.f90.sh ../xml/mpi.h.xml ${XSL_PATH}/chasm-mpi.f90.sh.xsl
chmod 755 ../scripts/${lc_proc}_f90.f90.sh
done

18
ompi/mpi/f90/xml/create_mpi_f90_medium.f90.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,18 @@
#! /bin/sh
XSL_PATH=.
OUT_PATH=../scripts
. functions_f90_medium.list
if test "$1" != ""; then
procedures=$1
fi
for proc in $procedures
do
lc_proc=`echo ${proc}|tr '[A-Z]' '[a-z]'`
echo "creating ${lc_proc}_f90.f90.sh"
Xalan -p test_function "'${proc}'" -p interface_size "'medium'" -o ${OUT_PATH}/${lc_proc}_f90.f90.sh ../xml/mpi.h.xml ${XSL_PATH}/chasm-mpi.f90.sh.xsl
chmod 755 ../scripts/${lc_proc}_f90.f90.sh
done

28
ompi/mpi/f90/xml/functions_f90_large.list Обычный файл
Просмотреть файл

@ -0,0 +1,28 @@
proc_should_be_medium="
MPI_Accumulate
MPI_Get
MPI_Put
MPI_Sendrecv_replace
"
procedures="
MPI_Allgather
MPI_Allgatherv
MPI_Allreduce
MPI_Alltoall
MPI_Alltoallv
MPI_Alltoallw
MPI_Exscan
MPI_Gather
MPI_Gatherv
MPI_Pack
MPI_Pack_external
MPI_Reduce
MPI_Reduce_scatter
MPI_Scan
MPI_Scatter
MPI_Scatterv
MPI_Sendrecv
MPI_Unpack
MPI_Unpack_external
"

56
ompi/mpi/f90/xml/functions_f90_medium.list Обычный файл
Просмотреть файл

@ -0,0 +1,56 @@
procedures="
MPI_Accumulate
MPI_Address
MPI_Bcast
MPI_Bsend
MPI_Bsend_init
MPI_Buffer_attach
MPI_Buffer_detach
MPI_File_iread
MPI_File_iread_at
MPI_File_iread_shared
MPI_File_iwrite
MPI_File_iwrite_at
MPI_File_iwrite_shared
MPI_File_read
MPI_File_read_all
MPI_File_read_all_begin
MPI_File_read_all_end
MPI_File_read_at
MPI_File_read_at_all
MPI_File_read_at_all_begin
MPI_File_read_at_all_end
MPI_File_read_ordered
MPI_File_read_ordered_begin
MPI_File_read_ordered_end
MPI_File_read_shared
MPI_File_write
MPI_File_write_all
MPI_File_write_all_begin
MPI_File_write_all_end
MPI_File_write_at
MPI_File_write_at_all
MPI_File_write_at_all_begin
MPI_File_write_at_all_end
MPI_File_write_ordered
MPI_File_write_ordered_begin
MPI_File_write_ordered_end
MPI_File_write_shared
MPI_Get
MPI_Ibsend
MPI_Irecv
MPI_Irsend
MPI_Isend
MPI_Issend
MPI_Put
MPI_Recv
MPI_Recv_init
MPI_Rsend
MPI_Rsend_init
MPI_Send
MPI_Send_init
MPI_Sendrecv_replace
MPI_Ssend
MPI_Ssend_init
MPI_Win_create
"

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

@ -1,5 +1,4 @@
<?xml version="1.0"?>
<!DOCTYPE library SYSTEM "mapping.dtd">
<!--
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
University Research and Technology
@ -219,7 +218,7 @@
<arg name="address" intent="out">
<type kind="ptr" >
<indirect depth="1" kind="pointer">
<type kind="usertype" usertype="MPI_Aint" >
<type kind="usertype" usertype="default_integer" >
</type>
</indirect>
</type>
@ -236,7 +235,7 @@
- METHOD: int MPI_Allgather(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Allgather" kind="No_F90" template="yes">
<method name="MPI_Allgather" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -299,7 +298,7 @@
- METHOD: int MPI_Allgatherv(void *, int, MPI_Datatype, void *, int *, int *, MPI_Datatype, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Allgatherv" kind="No_F90" template="yes">
<method name="MPI_Allgatherv" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -413,7 +412,7 @@
- METHOD: int MPI_Allreduce(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Allreduce" kind="No_F90" template="yes">
<method name="MPI_Allreduce" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -470,7 +469,7 @@
- METHOD: int MPI_Alltoall(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Alltoall" kind="No_F90" template="yes">
<method name="MPI_Alltoall" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -533,7 +532,7 @@
- METHOD: int MPI_Alltoallv(void *, int *, int *, MPI_Datatype, void *, int *, int *, MPI_Datatype, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Alltoallv" kind="No_F90" template="yes">
<method name="MPI_Alltoallv" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -624,7 +623,7 @@
- METHOD: int MPI_Alltoallw(void *, int *, int *, MPI_Datatype *, void *, int *, int *, MPI_Datatype *, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Alltoallw" kind="No_F90" template="yes">
<method name="MPI_Alltoallw" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -2352,7 +2351,7 @@
- METHOD: int MPI_Exscan(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Exscan" kind="No_F90" template="yes">
<method name="MPI_Exscan" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -4648,7 +4647,7 @@
- METHOD: int MPI_Gather(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Gather" kind="No_F90" template="yes">
<method name="MPI_Gather" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -4717,7 +4716,7 @@
- METHOD: int MPI_Gatherv(void *, int, MPI_Datatype, void *, int *, int *, MPI_Datatype, int, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Gatherv" kind="No_F90" template="yes">
<method name="MPI_Gatherv" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -6834,7 +6833,7 @@
- METHOD: int MPI_Pack(void *, int, MPI_Datatype, void *, int, int *, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Pack" kind="No_F90" template="yes">
<method name="MPI_Pack" kind="final" template="yes">
<!-- ARGUMENT : inbuf -->
<arg name="inbuf" intent="in">
@ -6901,7 +6900,7 @@
- METHOD: int MPI_Pack_external(char *, void *, int, MPI_Datatype, void *, MPI_Aint, MPI_Aint *) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Pack_external" kind="No_F90" template="yes">
<method name="MPI_Pack_external" kind="final" template="yes">
<!-- ARGUMENT : datarep -->
<arg name="datarep" intent="in">
@ -7325,7 +7324,7 @@
- METHOD: int MPI_Reduce(void *, void *, int, MPI_Datatype, MPI_Op, int, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Reduce" kind="No_F90" template="yes">
<method name="MPI_Reduce" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -7388,7 +7387,7 @@
- METHOD: int MPI_Reduce_scatter(void *, void *, int *, MPI_Datatype, MPI_Op, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Reduce_scatter" kind="No_F90" template="yes">
<method name="MPI_Reduce_scatter" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -7696,7 +7695,7 @@
- METHOD: int MPI_Scan(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Scan" kind="No_F90" template="yes">
<method name="MPI_Scan" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -7753,7 +7752,7 @@
- METHOD: int MPI_Scatter(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Scatter" kind="No_F90" template="yes">
<method name="MPI_Scatter" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -7822,7 +7821,7 @@
- METHOD: int MPI_Scatterv(void *, int *, int *, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Scatterv" kind="No_F90" template="yes">
<method name="MPI_Scatterv" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -8019,7 +8018,7 @@
- METHOD: int MPI_Sendrecv(void *, int, MPI_Datatype, int, int, void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Sendrecv" kind="No_F90" template="yes">
<method name="MPI_Sendrecv" kind="final" template="yes">
<!-- ARGUMENT : sendbuf -->
<arg name="sendbuf" intent="in">
@ -9405,7 +9404,7 @@
<arg name="extent" intent="out">
<type kind="ptr" >
<indirect depth="1" kind="pointer">
<type kind="usertype" usertype="MPI_Aint" >
<type kind="usertype" usertype="default_integer" >
</type>
</indirect>
</type>
@ -9774,7 +9773,7 @@
<arg name="array_of_displacements" intent="in">
<type kind="array">
<array lang="c" rank="1">
<type kind="usertype" usertype="MPI_Aint"/>
<type kind="usertype" usertype="default_integer"/>
<dimension extent="*"/>
</array>
</type>
@ -9822,7 +9821,7 @@
<!-- ARGUMENT : stride -->
<arg name="stride" intent="in">
<type kind="usertype" usertype="MPI_Aint" >
<type kind="usertype" usertype="default_integer" >
</type>
</arg>
@ -9918,7 +9917,7 @@
<arg name="lb" intent="out">
<type kind="ptr" >
<indirect depth="1" kind="pointer">
<type kind="usertype" usertype="MPI_Aint" >
<type kind="usertype" usertype="default_integer" >
</type>
</indirect>
</type>
@ -10080,7 +10079,7 @@
<arg name="array_of_displacements" intent="in">
<type kind="array">
<array lang="c" rank="1">
<type kind="usertype" usertype="MPI_Aint"/>
<type kind="usertype" usertype="default_integer"/>
<dimension extent="*"/>
</array>
</type>
@ -10128,7 +10127,7 @@
<arg name="ub" intent="out">
<type kind="ptr" >
<indirect depth="1" kind="pointer">
<type kind="usertype" usertype="MPI_Aint" >
<type kind="usertype" usertype="default_integer" >
</type>
</indirect>
</type>
@ -10191,7 +10190,7 @@
- METHOD: int MPI_Unpack(void *, int, int *, void *, int, MPI_Datatype, MPI_Comm) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Unpack" kind="No_F90" template="yes">
<method name="MPI_Unpack" kind="final" template="yes">
<!-- ARGUMENT : inbuf -->
<arg name="inbuf" intent="in">
@ -10258,7 +10257,7 @@
- METHOD: int MPI_Unpack_external(char *, void *, MPI_Aint, MPI_Aint *, void *, int, MPI_Datatype) C
- WARNING, this method has two choice arguments.
-->
<method name="MPI_Unpack_external" kind="No_F90" template="yes">
<method name="MPI_Unpack_external" kind="final" template="yes">
<!-- ARGUMENT : datarep -->
<arg name="datarep" intent="in">

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше