* Add support for building the F90 bindings library as a shared library
on almost all platforms (except OS X... sigh...). This is the merge of r10846 - 10894 from the tmp/f90-shared branch to the trunk. This commit was SVN r11103. The following SVN revisions from the original message are invalid or inconsistent and therefore were not cross-referenced: r10846
Этот коммит содержится в:
родитель
0ba0a60ada
Коммит
4176e61049
7
NEWS
7
NEWS
@ -25,13 +25,16 @@ version 1.0.
|
|||||||
1.2
|
1.2
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- Allow building the F90 MPI bindings as shared libraries for most
|
||||||
|
compilers / platforms. Explicitly disallow building the F90
|
||||||
|
bindings as shared libraries on OS X because of complicated
|
||||||
|
situations with Fortran common blocks and lack of support for
|
||||||
|
unresolved common symbols in shared libraries.
|
||||||
- Addition of "dr" (data reliability) PML.
|
- Addition of "dr" (data reliability) PML.
|
||||||
- Added stacktrace support for Solaris and Mac OS X.
|
- Added stacktrace support for Solaris and Mac OS X.
|
||||||
- Update event library to libevent-1.1a
|
- Update event library to libevent-1.1a
|
||||||
- Fixed standards conformance issues with MPI_ERR_TRUNCATED and
|
- Fixed standards conformance issues with MPI_ERR_TRUNCATED and
|
||||||
setting MPI_ERROR during MPI_TEST/MPI_WAIT.
|
setting MPI_ERROR during MPI_TEST/MPI_WAIT.
|
||||||
- Added support for building the Fortran 90 bindings library as
|
|
||||||
a shared library.
|
|
||||||
- Addition of "cm" PML to better support library-level matching
|
- Addition of "cm" PML to better support library-level matching
|
||||||
interconnects, with initial support for Myrinet/MX and Portals.
|
interconnects, with initial support for Myrinet/MX and Portals.
|
||||||
- Really check that the $CXX given to configure is a C++ compiler
|
- Really check that the $CXX given to configure is a C++ compiler
|
||||||
|
@ -112,6 +112,39 @@ AS_IF([test $OMPI_WANT_F90_BINDINGS -eq 1],
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# BWB - FIX ME - remove once everyone updates to LT 2.0.
|
||||||
|
#
|
||||||
|
AS_IF([test $OMPI_WANT_F90_BINDINGS -eq 1],
|
||||||
|
[if test $OMPI_F77 != $OMPI_F90; then
|
||||||
|
lt_ver=`grep '^VERSION' $srcdir/config/ltmain.sh | cut -f2 -d= | cut -f1 -d'.'`
|
||||||
|
if test $lt_ver -lt 2 ; then
|
||||||
|
AC_MSG_ERROR([You appear to be trying to build the Fortran 90
|
||||||
|
layer with Libtool 1.5.x or earlier and a Fortran 77 / Fortran 90 compiler
|
||||||
|
combination that will not work with this configuration. You must either
|
||||||
|
use a different Fortran 77 / Fortran 90 compiler (one where it is the same
|
||||||
|
compiler for both languages), upgrade to Libtool 2.x, or disable the
|
||||||
|
Fortran 90 bindings.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# OS X does not allow undefined common symbols in shared libraries.
|
||||||
|
# Because we can't figure out how to implement MPI_STATUSES_IGNORE and
|
||||||
|
# friends wihtout common symbols, on OS X we can't build the F90
|
||||||
|
# bindings as a shared library.
|
||||||
|
AC_MSG_CHECKING([if need to force static library])
|
||||||
|
case "$host" in
|
||||||
|
*apple-darwin*)
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
ompi_f90_force_static="yes"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
ompi_f90_force_static="no"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AM_CONDITIONAL(OMPI_F90_FORCE_STATIC, test "$ompi_f90_force_static" = "yes")
|
||||||
|
|
||||||
# if we're still good, then save the extra file types. Do this last
|
# if we're still good, then save the extra file types. Do this last
|
||||||
# because it implies tests that should be invoked by the above tests
|
# because it implies tests that should be invoked by the above tests
|
||||||
# (e.g., running the fortran compiler).
|
# (e.g., running the fortran compiler).
|
||||||
|
@ -255,7 +255,7 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
|
|||||||
AC_SUBST([OMPI_WRAPPER_F77_REQUIRED_FILE])
|
AC_SUBST([OMPI_WRAPPER_F77_REQUIRED_FILE])
|
||||||
|
|
||||||
if test "$OMPI_WANT_F90_BINDINGS" = "1" ; then
|
if test "$OMPI_WANT_F90_BINDINGS" = "1" ; then
|
||||||
OMPI_WRAPPER_F90_REQUIRED_FILE="libmpi_f90.a"
|
OMPI_WRAPPER_F90_REQUIRED_FILE="libmpi_f90.la"
|
||||||
else
|
else
|
||||||
OMPI_WRAPPER_F90_REQUIRED_FILE="not supported"
|
OMPI_WRAPPER_F90_REQUIRED_FILE="not supported"
|
||||||
fi
|
fi
|
||||||
|
@ -50,33 +50,19 @@
|
|||||||
|
|
||||||
SUBDIRS = scripts
|
SUBDIRS = scripts
|
||||||
|
|
||||||
AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include $(OMPI_FC_MODULE_FLAG). -I$(srcdir)
|
AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
|
||||||
|
$(OMPI_FC_MODULE_FLAG). -I$(srcdir) \
|
||||||
# Override the default f90 rules because we have to insert
|
-I$(top_builddir)/ompi/mpi/f90
|
||||||
# $(FCFLAGS_f90) right before the source filename. This is necessary
|
|
||||||
# for cases where the compiler expects source files to end in .f, and
|
|
||||||
# if we want our .f90 files to be compilable, we have to insert a
|
|
||||||
# special flag right before the source filename (e.g., xlf).
|
|
||||||
|
|
||||||
.f90.o:
|
|
||||||
$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
|
|
||||||
|
|
||||||
.f90.obj:
|
|
||||||
$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
|
|
||||||
|
|
||||||
.f90.lo:
|
|
||||||
$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
|
|
||||||
|
|
||||||
|
|
||||||
# Do different things if the top-level configure decided that we're
|
# Do different things if the top-level configure decided that we're
|
||||||
# going to build F90 bindings or not.
|
# going to build F90 bindings or not.
|
||||||
|
|
||||||
lib_LIBRARIES =
|
lib_LTLIBRARIES =
|
||||||
if OMPI_WANT_F90_BINDINGS
|
if OMPI_WANT_F90_BINDINGS
|
||||||
|
|
||||||
# Add the f90 library to the list of libraries to build
|
# Add the f90 library to the list of libraries to build
|
||||||
|
|
||||||
lib_LIBRARIES += libmpi_f90.a
|
lib_LTLIBRARIES += libmpi_f90.la
|
||||||
|
|
||||||
# Ensure that the F90 interfaces are re-generated based on the values
|
# Ensure that the F90 interfaces are re-generated based on the values
|
||||||
# that come in from configure
|
# that come in from configure
|
||||||
@ -107,7 +93,7 @@ mpi-f90-interfaces.h: $(srcdir)/scripts/mpi-f90-interfaces.h.sh
|
|||||||
# So we have to pass in the pwd to the scripts so that they know where
|
# So we have to pass in the pwd to the scripts so that they know where
|
||||||
# some_script is.
|
# some_script is.
|
||||||
|
|
||||||
$(nodist_libmpi_f90_a_SOURCES): fortran_kinds.sh
|
$(nodist_libmpi_f90_la_SOURCES): fortran_kinds.sh
|
||||||
@ p="`pwd`"; \
|
@ p="`pwd`"; \
|
||||||
echo $(srcdir)/scripts/$@.sh $$p \> $@; \
|
echo $(srcdir)/scripts/$@.sh $$p \> $@; \
|
||||||
$(srcdir)/scripts/$@.sh $$p > $@ ;
|
$(srcdir)/scripts/$@.sh $$p > $@ ;
|
||||||
@ -143,15 +129,17 @@ mpi.obj: mpi.f90 mpi-f90-interfaces.h
|
|||||||
@echo "***************************************************************"
|
@echo "***************************************************************"
|
||||||
$(FCCOMPILE) -c -I. -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
|
$(FCCOMPILE) -c -I. -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
BUILT_SOURCES = mpi-f90-interfaces.h
|
||||||
|
|
||||||
else
|
else
|
||||||
lib_LIBRARIES +=
|
lib_LTLIBRARIES +=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# mpi.f90 is the only f90 source file directly in libmpif90 that gets
|
# mpi.f90 is the only f90 source file directly in libmpif90 that gets
|
||||||
# distributed. This file is always in the library, regardless of the
|
# distributed. This file is always in the library, regardless of the
|
||||||
# size that we're building.
|
# size that we're building.
|
||||||
|
|
||||||
libmpi_f90_a_SOURCES = \
|
libmpi_f90_la_SOURCES = \
|
||||||
attr_fn-f90-interfaces.h \
|
attr_fn-f90-interfaces.h \
|
||||||
mpi.f90
|
mpi.f90
|
||||||
|
|
||||||
@ -249,15 +237,22 @@ large_sources = \
|
|||||||
# The rest of the files that are in the library depend on which size
|
# The rest of the files that are in the library depend on which size
|
||||||
# we're building.
|
# we're building.
|
||||||
|
|
||||||
nodist_libmpi_f90_a_SOURCES = $(trivial_sources)
|
nodist_libmpi_f90_la_SOURCES = $(trivial_sources)
|
||||||
if OMPI_WANT_BUILD_F90_SMALL
|
if OMPI_WANT_BUILD_F90_SMALL
|
||||||
nodist_libmpi_f90_a_SOURCES += $(small_sources)
|
nodist_libmpi_f90_la_SOURCES += $(small_sources)
|
||||||
endif
|
endif
|
||||||
if OMPI_WANT_BUILD_F90_MEDIUM
|
if OMPI_WANT_BUILD_F90_MEDIUM
|
||||||
nodist_libmpi_f90_a_SOURCES += $(small_sources) $(medium_sources)
|
nodist_libmpi_f90_la_SOURCES += $(small_sources) $(medium_sources)
|
||||||
endif
|
endif
|
||||||
if OMPI_WANT_BUILD_F90_LARGE
|
if OMPI_WANT_BUILD_F90_LARGE
|
||||||
nodist_libmpi_f90_a_SOURCES += $(small_sources) $(medium_sources) $(large_sources)
|
nodist_libmpi_f90_la_SOURCES += $(small_sources) $(medium_sources) $(large_sources)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# see note in config/ompi_setup_f90.m4
|
||||||
|
if OMPI_F90_FORCE_STATIC
|
||||||
|
libmpi_f90_la_LDFLAGS = -static
|
||||||
|
else
|
||||||
|
libmpi_f90_la_LDFLAGS =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -265,7 +260,7 @@ endif
|
|||||||
#
|
#
|
||||||
|
|
||||||
MOSTLYCLEANFILES = *.mod *.ompi_module
|
MOSTLYCLEANFILES = *.mod *.ompi_module
|
||||||
DISTCLEANFILES = $(nodist_libmpi_f90_a_SOURCES)
|
DISTCLEANFILES = $(nodist_libmpi_f90_la_SOURCES)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the generated .mod files. Unfortunately, each F90 compiler
|
# Install the generated .mod files. Unfortunately, each F90 compiler
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user