1
1

fortran: moar fixes for the Fortran MPI_SIZEOF debacle

Ensure to define ompi/pompi versions for platforms that don't have
weak symbols.  Also make fortran/mpif-h/profile build a separate
sizeof library, just like fortran/mpifh-h does.
Этот коммит содержится в:
Jeff Squyres 2015-08-21 07:26:11 -07:00
родитель 7a7d4f2cee
Коммит 9f345bd22f
2 изменённых файлов: 27 добавлений и 5 удалений

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

@ -227,16 +227,24 @@ sub output_file {
! compiler to build Open MPI.\n\n";
if ($want_bodies) {
my $name = "ompi_sad_panda";
$name = "pompi_sad_panda"
if ($pmpi_arg);
print OUT "!
! Dummy subroutine, just so that there is *some* Fortran in this file
! (some compilers are unhappy if there are no Fortran statements in this
! (this is defensive programming: since the Fortran compiler doesn't
! support enough mojo, configure should set some AM_CONDITIONALs such
! that this file should not end up being compiled, but just in case
! that logic changes someday and this file *does* end up getting
! compiled, make sure that it's not entirely empty because some
! compilers are unhappy if there are no Fortran statements in this
! file).
subroutine ompi_sad_panda()
subroutine $name()
implicit none
print *, 'Open MPI is a sad panda because your Fortran compiler'
print *, 'does not support enough Fortran mojo for MPI_SIZEOF'
end subroutine ompi_sad_panda\n\n";
end subroutine $name\n\n";
}
}

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

@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2011-2013 Inria. All rights reserved.
# Copyright (c) 2011-2013 Universite Bordeaux 1
# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
@ -26,6 +26,9 @@
include $(top_srcdir)/Makefile.ompi-rules
CLEANFILES=
libmpi_mpifh_pmpi_la_LIBADD =
#
# OMPI_PROFILING_DEFINES flag is enabled when we want our MPI_* symbols
# to be replaced by PMPI_*. In other words, this flag decides
@ -432,7 +435,19 @@ $(linked_files):
# psizeof_f.f90 is generated based on some results from configure tests.
CLEANFILES += psizeof_f.f90
# Build the MPI_SIZEOF code in a separate convenience library (see
# lengthy comment in ompi/mpi/fortran/mpif-h/Makefile.am for an
# explanation why).
#if BUILD_FORTRAN_SIZEOF
noinst_LTLIBRARIES += libmpi_mpifh_psizeof.la
# Do not dist this file; it is generated
nodist_libmpi_mpifh_psizeof_la_SOURCES = psizeof_f.f90
libmpi_mpifh_pmpi_la_LIBADD += libmpi_mpifh_psizeof.la
#endif
sizeof_pl=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.pl
psizeof_f.f90: $(top_builddir)/config.status
psizeof_f.f90: $(sizeof_pl)
psizeof_f.f90:
@ -447,7 +462,6 @@ psizeof_f.f90:
# The library itself
#
nodist_libmpi_mpifh_pmpi_la_SOURCES = \
psizeof_f.f90 \
$(linked_files)
# Conditionally install the header files