From 65d5e18e9b70c4d87032e2a2f45cb23338bec2de Mon Sep 17 00:00:00 2001 From: Craig E Rasmussen Date: Thu, 20 Apr 2006 21:17:09 +0000 Subject: [PATCH] Fixed to match Jeff S's changes to mpi-f90-interfaces.h.sh This commit was SVN r9673. --- ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl | 515 ++++++++++++--------------- ompi/mpi/f90/xml/mpi.h.xml | 147 ++++++-- 2 files changed, 354 insertions(+), 308 deletions(-) diff --git a/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl b/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl index 4ae2ec1d75..b227789b0d 100644 --- a/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl +++ b/ompi/mpi/f90/xml/chasm-mpi.i.f90.xsl @@ -72,23 +72,10 @@ --> - - - procedure=' - - ' - - - - echo "interface ${procedure}" - - echo - - @@ -98,14 +85,6 @@ - echo "end interface ${procedure}" - - echo - - echo - - - @@ -117,12 +96,23 @@ --> - proc="${procedure}" + +#------------------------------------------------------------------------ + +output () { + if test "$output" = "0"; then + return 0 + fi + + procedure=$1 + cat <<EOF + + + + subroutine ${procedure}( + ) - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" + include 'mpif.h' @@ -132,14 +122,39 @@ - echo " integer, intent(out) :: ierr" + integer, intent(out) :: ierr -echo "end subroutine ${proc}" -echo - +end subroutine ${procedure} + +EOF +} + +start + + + + + + + + + + + +output +end + + + + + + + + + @@ -149,21 +164,29 @@ echo --> - rank=0 + +#------------------------------------------------------------------------ + +output () { + if test "$output" = "0"; then + return 0 + fi + + procedure=$1 + rank=$2 + type=$4 + proc="$1$2D$3" + cat <<EOF + + + + subroutine ${proc}( + ) - for kind in $lkinds - - do - - proc="${procedure}${rank}DL${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" + include 'mpif.h' - + @@ -171,250 +194,100 @@ echo - echo " integer, intent(out) :: ierr" + integer, intent(out) :: ierr - echo "end subroutine ${proc}" - echo -done +end subroutine ${proc} - +EOF +} - rank=0 - - for kind in $ikinds - - do - - proc="${procedure}${rank}DI${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - - echo " integer, intent(out) :: ierr" - - +start + + - echo "end subroutine ${proc}" - echo -done - - - - rank=0 - - for kind in $rkinds - - do - - proc="${procedure}${rank}DR${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - - echo " integer, intent(out) :: ierr" - - - - - echo "end subroutine ${proc}" - echo -done - - - - rank=0 - - for kind in $ckinds - - do - - proc="${procedure}${rank}DC${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - - echo " integer, intent(out) :: ierr" - - - - - echo "end subroutine ${proc}" - echo -done - - - - -for rank in $ranks +for rank in $allranks 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 + 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 - - - for kind in $lkinds - - do - - proc="${procedure}${rank}DL${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - echo " integer, intent(out) :: ierr" - - - - - echo "end subroutine ${proc}" - echo + output + ${rank} CH "character${dim}" + output + ${rank} L "logical${dim}" + for kind in $ikinds + do + output + ${rank} I${kind} "integer*${kind}${dim}" done - - - - for kind in $ikinds - - do - - proc="${procedure}${rank}DI${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - echo " integer, intent(out) :: ierr" - - - - - echo "end subroutine ${proc}" - echo + for kind in $rkinds + do + output + ${rank} R${kind} "real*${kind}${dim}" done - - - - for kind in $rkinds - - do - - proc="${procedure}${rank}DR${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - echo " integer, intent(out) :: ierr" - - - - - echo "end subroutine ${proc}" - echo + for kind in $ckinds + do + output + ${rank} C${kind} "complex*${kind}${dim}" done - - - - for kind in $ckinds - - do - - proc="${procedure}${rank}DC${kind}" - - echo "subroutine ${proc}( - )" - - echo " use mpi_kinds" - - - - - - - - - - echo " integer, intent(out) :: ierr" - - - - - echo "end subroutine ${proc}" - echo - done - echo done -echo - +end + + + + + + + + + + + + + + + + medium + + + trivial + + + + small + + + medium + + + large + + + + + + + + + + + + 1 + + @@ -473,7 +346,7 @@ echo - echo " + @@ -484,7 +357,7 @@ echo - + @@ -579,13 +452,7 @@ echo - - (kind=MPI_ - - ${kind}_KIND) - - , dimension(${dim}) - + ${type} integer @@ -641,6 +508,9 @@ echo + + integer + integer(kind=MPI_ADDRESS_KIND) @@ -648,7 +518,7 @@ echo integer(kind=MPI_OFFSET_KIND) - integer(MPI_STATUS_SIZE) + integer, dimension(MPI_STATUS_SIZE) external @@ -722,16 +592,89 @@ echo + + + + + +# +# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana +# University Research and Technology +# Corporation. All rights reserved. +# Copyright (c) 2004-2006 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$ +# + + + + + + + + + +# Do a little error checking + +if test ! -f fortran_kinds.sh; then + echo "ERROR: Cannot find fortran_kinds.sh" >&2 + exit 1 +elif test -z fortran_kinds.sh; then + echo "ERROR: fortran_kinds.sh appears to be empty!" >&2 + exit 1 +fi + +# Read in the KIND information + +. fortran_kinds.sh + +# Setup + +output=1 +allranks="0 $ranks" + +#------------------------------------------------------------------------ + +# Helper functions + +start() { + check_size $2 + if test "$output" = "1"; then + echo "interface $1" + fi +} + +end() { + if test "$output" = "1"; then + cat <<EOF +end interface $1 + + +EOF + fi +} + + + + + #! /bin/sh - - - . fortran_kinds.sh - + + diff --git a/ompi/mpi/f90/xml/mpi.h.xml b/ompi/mpi/f90/xml/mpi.h.xml index fc0ace8970..7cf401e5d8 100644 --- a/ompi/mpi/f90/xml/mpi.h.xml +++ b/ompi/mpi/f90/xml/mpi.h.xml @@ -377,7 +377,7 @@ - there is no way to alloc memory in C for Fortran arrays - see MPI_Free_mem --> - + @@ -1953,7 +1953,7 @@ - + @@ -4624,11 +4624,11 @@ - + - + @@ -4862,11 +4862,11 @@ - + - + @@ -8541,7 +8541,7 @@ - + @@ -8560,8 +8560,8 @@ - - + + @@ -8589,7 +8589,7 @@ - + @@ -8647,7 +8647,7 @@ - + @@ -8676,8 +8676,8 @@ - - + + @@ -10372,7 +10372,7 @@ - + @@ -10381,8 +10381,8 @@ - - + + @@ -10410,7 +10410,7 @@ - + @@ -10458,7 +10458,7 @@ - + @@ -10487,8 +10487,8 @@ - - + + @@ -11607,8 +11607,20 @@ - + @@ -11698,7 +11710,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -