1
1

Remove the generated F90 interfaces for all the "2 buffer" MPI API

functions (e.g., MPI_REDUCE).  We don't generate the back-end
subroutines for them (because it makes an expontential number of
subroutines, and compilers literally will segv), so we shouldn't
generate the f90 interfaces for them, either.  This allows user's MPI
F90 apps to automaitcally fall through to the F77 bindings for these
functions.

This commit was SVN r8094.
Этот коммит содержится в:
Jeff Squyres 2005-11-10 16:04:39 +00:00
родитель 985c2ca943
Коммит bacfb4fa2b
2 изменённых файлов: 84 добавлений и 2 удалений

Просмотреть файл

@ -97,6 +97,22 @@ mpi-f90-interfaces.h: fortran_kinds.sh
CLEANFILES += mpi-f90-interfaces.h
# SIDENOTE: We currently have code in mpi-f90-interfaces.h.sh to
# generate interface declarations for all the "two buffer" functions
# (e.g., MPI_Reduce). This actually creates a problem for most
# compilers, because it results in an exponential explosion of
# functions generated -- most compilers will segv (particularly with
# --with-f90-mcx-array-dim values of >2). But this code is useful,
# and I don't want to delete it (yes, we could get it back from SVN
# history, but I don't want to re-integrate it) -- f90 compilers *may*
# someday be able to handle this (i.e., our *code* is not wrong -- the
# *compilers* are wrong). So I'm simply adding a hard-coded value
# here to disable the interface generation stuff in the script; it can
# be made a condition (e.g., via configure test or --enable option, or
# somesuch) later if necessary.
WANT_2BUFFER_FUNCTIONS=0
# Run scripts to generate the f90 source files. We only need to
# generate the .f90 files once, so the "test" checks to see if the
# file exists before running the script. However, the
@ -107,8 +123,8 @@ CLEANFILES += mpi-f90-interfaces.h
mpi-f90-interfaces.h:
@ p="`pwd`"; \
echo $(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p \> $@; \
$(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p > $@
echo $(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p $(WANT_2BUFFER_FUNCTIONS) \> $@; \
$(srcdir)/scripts/mpi-f90-interfaces.h.sh $$p $(WANT_2BUFFER_FUNCTIONS) > $@
# Ensure that the mpi_kinds F90 module is generated before compiling
# any of the sources (because many/all of these sources "use

Просмотреть файл

@ -33,6 +33,16 @@ fi
echo "Reading Fortran KIND information..." >&2
. "$1/fortran_kinds.sh"
# Do we want the 2 buffer functions? (see comment in
# ompi/mpi/f90/Makefile.am)
WANT_2BUFFER_FUNCTIONS=$2
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
echo "Generating 2 buffer function interfaces: yes" >&2
else
echo "Generating 2 buffer function interfaces: no" >&2
fi
# Do the work
echo "Generating F90 interface functions..." >&2
@ -419,6 +429,9 @@ echo
echo
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Allgather'
echo "interface ${procedure}"
@ -581,6 +594,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Allgatherv'
@ -752,6 +769,7 @@ echo "end interface ${procedure}"
echo
echo
fi
procedure='MPI_Alloc_mem'
@ -771,6 +789,9 @@ echo
echo
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Allreduce'
echo "interface ${procedure}"
@ -925,6 +946,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Alltoall'
@ -1088,6 +1113,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Alltoallv'
@ -1267,6 +1296,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Alltoallw'
@ -1446,6 +1479,7 @@ echo "end interface ${procedure}"
echo
echo
fi
procedure='MPI_Attr_delete'
@ -2887,6 +2921,9 @@ echo
echo
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Exscan'
echo "interface ${procedure}"
@ -3041,6 +3078,7 @@ echo "end interface ${procedure}"
echo
echo
fi
procedure='MPI_File_call_errhandler'
@ -7903,6 +7941,9 @@ echo
echo
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Gather'
echo "interface ${procedure}"
@ -8073,6 +8114,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Gatherv'
@ -8252,6 +8297,7 @@ echo "end interface ${procedure}"
echo
echo
fi
procedure='MPI_Get'
@ -11064,6 +11110,9 @@ echo
echo
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Reduce'
echo "interface ${procedure}"
@ -11226,6 +11275,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Reduce_scatter'
@ -11381,6 +11434,7 @@ echo "end interface ${procedure}"
echo
echo
fi
procedure='MPI_Register_datarep'
@ -11755,6 +11809,9 @@ echo
echo
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Scan'
echo "interface ${procedure}"
@ -11909,6 +11966,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Scatter'
@ -12080,6 +12141,10 @@ echo "end interface ${procedure}"
echo
echo
fi
# JMS see comment in ompi/mpi/f90/Makefile.am about WANT_2BUFFER_FUNCTIONS
if test "$WANT_2BUFFER_FUNCTIONS" = "1"; then
procedure='MPI_Scatterv'
@ -12259,6 +12324,7 @@ echo "end interface ${procedure}"
echo
echo
fi
procedure='MPI_Send'