1
1
openmpi/ompi/mpi/f90/scripts/mpi_put_f90.f90.sh
Jeff Squyres 4eba48b430 Bunches of fixes for the f90 bindings
- fix the --with-f90-max-array-dim configure switch
- fix configure test to find the supported f90 linker switch to find
  fortran modules
- Unbelievably, some versions of sh (cough cough Solaris 9 cough
  cough) actually seem to internally perform a "cd" into a
  subdirectory when you run "./foo/bar", such that if you try to
  source a script in the top-level directory in the bar script (i.e.,
  ". some_script" in the bar script), it will try to run it in the
  "foo" subdirectory, rather than the top-level directory!  #$@#$%#$%
  So we have to pass in the pwd to the scripts so that they know where
  some_script is.
- Reworked much of ompi/mpi/f90/Makefile.am for lots of reasons.  See
  the internal comments (mostly having to do with dependency stuff --
  Libtool does not apparently support F90, so we can only build the
  F90 library statically.

This commit was SVN r6993.
2005-08-24 02:11:02 +00:00

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

#! /bin/sh
. "$1/fortran_kinds.sh"
procedure='MPI_Put'
rank=0
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
rank=0
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for rank in $ranks
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
for kind in $lkinds
do
proc="${procedure}${rank}DL${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " logical(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for kind in $ikinds
do
proc="${procedure}${rank}DI${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " integer(kind=MPI_INTEGER${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for kind in $rkinds
do
proc="${procedure}${rank}DR${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " real(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
for kind in $ckinds
do
proc="${procedure}${rank}DC${kind}"
echo "subroutine ${proc}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo " use mpi_kinds"
echo " complex(kind=MPI_REAL${kind}_KIND), dimension(${dim}), intent(in) :: origin_addr"
echo " integer, intent(in) :: origin_count"
echo " integer, intent(in) :: origin_datatype"
echo " integer, intent(in) :: target_rank"
echo " integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp"
echo " integer, intent(in) :: target_count"
echo " integer, intent(in) :: target_datatype"
echo " integer, intent(in) :: win"
echo " integer, intent(out) :: ierr"
echo " call ${procedure}(origin_addr, origin_count, origin_datatype, target_rank, target_disp, &
target_count, target_datatype, win, ierr)"
echo "end subroutine ${proc}"
echo
done
done
echo
echo