1
1
openmpi/ompi/mpi/f90/scripts/mpi_sizeof.f90.sh
Rainer Keller 95596d1814 - Move alignment and size output generated by configure-tests
into the OPAL namespace, eliminating cases like opal/util/arch.c
   testing for ompi_fortran_logical_t.
   As this is processor- and compiler-related information
   (e.g. does the compiler/architecture support REAL*16)
   this should have been on the OPAL layer.
 - Unifies f77 code using MPI_Flogical instead of opal_fortran_logical_t

 - Tested locally (Linux/x86-64) with mpich and intel testsuite
   but would like to get this week-ends MTT output


 - PLEASE NOTE: configure-internal macro-names and
   ompi_cv_ variables have not been changed, so that
   external platform (not in contrib/) files still work.

This commit was SVN r21330.
2009-05-30 15:54:29 +00:00

161 строка
4.6 KiB
Bash
Исполняемый файл

#! /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 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$
#
. "$1/fortran_kinds.sh"
procedure='MPI_Sizeof'
rank=0
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " logical*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_LOGICAL${kind}"
echo " ierr = 0"
echo "end subroutine ${proc}"
echo
done
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " integer*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_INT${kind}"
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)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " real*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_REAL${kind}"
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)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " complex*${kind}, intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_COMPLEX${kind}"
echo " ierr = 0"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
do
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
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " logical*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_LOGICAL${kind}"
echo " ierr = 0"
echo "end subroutine ${proc}"
echo
done
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(x, size, ierr)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " integer*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_INT${kind}"
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)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " real*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_REAL${kind}"
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)"
echo " implicit none"
echo " include 'fortran_sizes.h'"
echo " complex*${kind}, dimension(${dim}), intent(in) :: x"
echo " integer, intent(out) :: size"
echo " integer, intent(out) :: ierr"
echo " size = OPAL_SIZEOF_F90_COMPLEX${kind}"
echo " ierr = 0"
echo "end subroutine ${proc}"
echo
done
echo
done
echo
echo
echo