2005-01-04 20:46:10 +03:00
|
|
|
#! /bin/sh
|
2006-05-15 23:31:01 +04:00
|
|
|
#
|
|
|
|
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
|
|
|
# University Research and Technology
|
|
|
|
# Corporation. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
# of Tennessee Research Foundation. All rights
|
|
|
|
# reserved.
|
|
|
|
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
# University of Stuttgart. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
|
|
|
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
|
|
|
# $HEADER$
|
|
|
|
#
|
2005-01-04 20:46:10 +03:00
|
|
|
|
2005-08-24 06:11:02 +04:00
|
|
|
. "$1/fortran_kinds.sh"
|
2005-01-04 20:46:10 +03:00
|
|
|
|
|
|
|
procedure='MPI_Sizeof'
|
|
|
|
|
|
|
|
rank=0
|
2005-01-15 02:44:33 +03:00
|
|
|
for kind in $lkinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DL${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " logical*${kind}, intent(in) :: x"
|
2005-01-15 02:44:33 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
|
|
|
echo " size = OMPI_SIZEOF_F90_LOGICAL${kind}"
|
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
2005-01-04 20:46:10 +03:00
|
|
|
for kind in $ikinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DI${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " integer*${kind}, intent(in) :: x"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " size = OMPI_SIZEOF_F90_INT${kind}"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
for kind in $rkinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DR${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " real*${kind}, intent(in) :: x"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " size = OMPI_SIZEOF_F90_REAL${kind}"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
for kind in $ckinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DC${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " complex*${kind}, intent(in) :: x"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
2006-11-03 18:52:46 +03:00
|
|
|
echo " size = OMPI_SIZEOF_F90_COMPLEX${kind}"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
for rank in $ranks
|
|
|
|
do
|
Bring over changes from the /tmp/fortran-stuff series:
- Make the F90 bindings compile and link properly with gfortran 4.0,
4.1, Intel 9.0, PGI 6.1, Sun (don't know version offhand -- the most
current as of this writing, I think), and NAG 5.2, although some
have limitations (e.g., NAG can't seem to handle the medium and
large sizes)
- Building the F90 "small" module size is now the default, even for
developers
- Split up mpif.h into multiple files because parts of it were toxic
to the F90 bindings
- Properly specify unsized/unshaped arrays to make the bindings work
on all known compilers
- Make ompi_info show Fortran 90 bindings size
- XML somewhat lags the generated scripts as of this commit, but
functionality was my main goal -- the XML can be updated later (if
at all).
This commit was SVN r10118.
2006-05-30 18:37:41 +04:00
|
|
|
case "$rank" in 1) dim='*' ; esac
|
|
|
|
case "$rank" in 2) dim='1,*' ; esac
|
|
|
|
case "$rank" in 3) dim='1,1,*' ; esac
|
|
|
|
case "$rank" in 4) dim='1,1,1,*' ; esac
|
|
|
|
case "$rank" in 5) dim='1,1,1,1,*' ; esac
|
|
|
|
case "$rank" in 6) dim='1,1,1,1,1,*' ; esac
|
|
|
|
case "$rank" in 7) dim='1,1,1,1,1,1,*' ; esac
|
2005-01-04 20:46:10 +03:00
|
|
|
|
2005-01-15 02:44:33 +03:00
|
|
|
for kind in $lkinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DL${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " logical*${kind}, dimension(${dim}), intent(in) :: x"
|
2005-01-15 02:44:33 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
|
|
|
echo " size = OMPI_SIZEOF_F90_LOGICAL${kind}"
|
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
2005-01-04 20:46:10 +03:00
|
|
|
for kind in $ikinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DI${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " integer*${kind}, dimension(${dim}), intent(in) :: x"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " size = OMPI_SIZEOF_F90_INT${kind}"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
for kind in $rkinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DR${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " real*${kind}, dimension(${dim}), intent(in) :: x"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " size = OMPI_SIZEOF_F90_REAL${kind}"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
for kind in $ckinds
|
|
|
|
do
|
|
|
|
proc="${procedure}${rank}DC${kind}"
|
|
|
|
echo "subroutine ${proc}(x, size, ierr)"
|
2005-01-07 22:22:00 +03:00
|
|
|
echo " implicit none"
|
|
|
|
echo " include 'fortran_sizes.h'"
|
2006-04-11 07:33:38 +04:00
|
|
|
echo " complex*${kind}, dimension(${dim}), intent(in) :: x"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " integer, intent(out) :: size"
|
|
|
|
echo " integer, intent(out) :: ierr"
|
2006-11-03 18:52:46 +03:00
|
|
|
echo " size = OMPI_SIZEOF_F90_COMPLEX${kind}"
|
2005-01-04 20:46:10 +03:00
|
|
|
echo " ierr = 0"
|
|
|
|
echo "end subroutine ${proc}"
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|