From 82171eef9d4f88d643f911aff86c7d57c26605b9 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Tue, 2 Oct 2012 16:29:06 +0000 Subject: [PATCH] Fixes from Ake Sandgren for MPI_SIZEOF for the TKR mpi module implementation. This was already fixed in the ignore TKR mpi module. This commit was SVN r27392. --- .../fortran/use-mpi-tkr/fortran_sizes.h.in | 2 + .../use-mpi-tkr/scripts/mpi_sizeof.f90.sh | 43 +++++++++++++------ 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in b/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in index f854d4c1a0..b706996f19 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in +++ b/ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h.in @@ -19,6 +19,7 @@ ! This file is used by scripts/mpi_sizeof.f90.sh (and therefore mpi_sizeof.f90) +integer :: OMPI_SIZEOF_F90_CHARACTER integer :: OMPI_SIZEOF_F90_LOGICAL integer :: OMPI_SIZEOF_F90_INT1 @@ -36,6 +37,7 @@ integer :: OMPI_SIZEOF_F90_COMPLEX8 integer :: OMPI_SIZEOF_F90_COMPLEX16 integer :: OMPI_SIZEOF_F90_COMPLEX32 +parameter(OMPI_SIZEOF_F90_CHARACTER = @OMPI_SIZEOF_FORTRAN_CHARACTER@) parameter(OMPI_SIZEOF_F90_LOGICAL = @OMPI_SIZEOF_FORTRAN_LOGICAL@) parameter(OMPI_SIZEOF_F90_INT1 = @OMPI_SIZEOF_FORTRAN_INTEGER1@) diff --git a/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi_sizeof.f90.sh b/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi_sizeof.f90.sh index 635ba04498..0738d5bfaa 100755 --- a/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi_sizeof.f90.sh +++ b/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi_sizeof.f90.sh @@ -23,20 +23,30 @@ procedure='MPI_Sizeof' rank=0 -for kind in $lkinds -do - proc="${procedure}${rank}DL${kind}" + + proc="${procedure}${rank}DCH" echo "subroutine ${proc}(x, size, ierr)" echo " implicit none" echo " include 'fortran_sizes.h'" - echo " logical*${kind}, intent(in) :: x" + echo " character, intent(in) :: x" echo " integer, intent(out) :: size" echo " integer, intent(out) :: ierr" - echo " size = OMPI_SIZEOF_F90_LOGICAL${kind}" + echo " size = OMPI_SIZEOF_F90_CHARACTER" + echo " ierr = 0" + echo "end subroutine ${proc}" + echo + + proc="${procedure}${rank}DL" + echo "subroutine ${proc}(x, size, ierr)" + echo " implicit none" + echo " include 'fortran_sizes.h'" + echo " logical, intent(in) :: x" + echo " integer, intent(out) :: size" + echo " integer, intent(out) :: ierr" + echo " size = OMPI_SIZEOF_F90_LOGICAL" echo " ierr = 0" echo "end subroutine ${proc}" echo -done for kind in $ikinds do @@ -94,20 +104,29 @@ do case "$rank" in 6) dim='1,1,1,1,1,*' ; esac case "$rank" in 7) dim='1,1,1,1,1,1,*' ; esac - for kind in $lkinds - do - proc="${procedure}${rank}DL${kind}" + proc="${procedure}${rank}DCH" echo "subroutine ${proc}(x, size, ierr)" echo " implicit none" echo " include 'fortran_sizes.h'" - echo " logical*${kind}, dimension(${dim}), intent(in) :: x" + echo " character, dimension(${dim}), intent(in) :: x" echo " integer, intent(out) :: size" echo " integer, intent(out) :: ierr" - echo " size = OMPI_SIZEOF_F90_LOGICAL${kind}" + echo " size = OMPI_SIZEOF_F90_CHARACTER" + echo " ierr = 0" + echo "end subroutine ${proc}" + echo + + proc="${procedure}${rank}DL" + echo "subroutine ${proc}(x, size, ierr)" + echo " implicit none" + echo " include 'fortran_sizes.h'" + echo " logical, dimension(${dim}), intent(in) :: x" + echo " integer, intent(out) :: size" + echo " integer, intent(out) :: ierr" + echo " size = OMPI_SIZEOF_F90_LOGICAL" echo " ierr = 0" echo "end subroutine ${proc}" echo - done for kind in $ikinds do