_C.c _C.h #------------------------------------------------------------------------ output_ () { if test "$output" = "0"; then return 0 fi procedure=$1 cat <<EOF subroutine ${procedure}( ) include 'mpif.h' integer, intent(out) :: ierr end subroutine ${procedure} EOF } start output_ end #------------------------------------------------------------------------ output_ () { if test "$output" = "0"; then return 0 fi procedure=$1 rank=$2 type=$4 proc="$1$2D$3" cat <<EOF subroutine ${proc}( ) include 'mpif.h' integer, intent(out) :: ierr end subroutine ${proc} EOF } start 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_ ${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 $rkinds do output_ ${rank} R${kind} "real*${kind}${dim}" done for kind in $ckinds do output_ ${rank} C${kind} "complex*${kind}${dim}" done done end medium trivial small medium large 1 , & , character(len=*), dimension(*) character(len=*), dimension( ,*) integer(kind=MPI_ADDRESS_KIND) ${type} integer logical integer character (len=*) UNSUPPORTED UNSUPPORTED , dimension( , ) integer integer(kind=MPI_ADDRESS_KIND) integer(kind=MPI_OFFSET_KIND) integer, dimension(MPI_STATUS_SIZE) external external external external external external external external external external external external external external external external external external integer UNSUPPORTED UNSUPPORTED # # 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