2003-11-22 16:36:58 +00:00
|
|
|
# -*- shell-script -*-
|
|
|
|
#
|
2007-03-16 23:11:45 +00:00
|
|
|
# Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 19:57:48 +00:00
|
|
|
# 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.
|
2007-06-19 05:03:11 +00:00
|
|
|
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
2004-11-28 20:09:25 +00:00
|
|
|
# University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
- As proposed in RFC and telcon, warn the user about deprecated
functionality (per MPI-2.1). This warning can be toggled using
--enable-mpi-interface-warning (default OFF), but can be
selectively turned on passing
mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING
Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379)
Using gcc-4.5 (gcc-svn) these show up as:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379):
MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0
Jeff and I propose to turn such warnings on with Open MPI-1.7 by default.
- Detection of user-level compiler is handled using the preprocessor
checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove
and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h
(see comments).
The OMPI-build time detection is output (Familyname and Version)
with ompi_info.
This functionality (actually any upcoming __attribute__) are turned
off, if a different compiler (and version) is being detected.
- Note, that any warnings regarding (user-compiler!=build-compiler)
as discussed in the RFC are _not_ included for now.
- Tested on Linux with --enable-mpi-interface-warning on
Linux, gcc-4.5 (deprecated w/ specific msg)
Linux, gcc-4.3 (deprecated w/o specific msg)
Linux, pathscale 3.1 (deprecated w/o specific msg)
Linux, icc-11.0 (deprecated w/o specific msg)
Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning,
further investigation needed...
This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
|
|
|
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
2008-09-10 12:58:30 +00:00
|
|
|
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
2007-06-05 03:03:59 +00:00
|
|
|
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
2006-11-30 01:59:44 +00:00
|
|
|
# reserved.
|
- As proposed in RFC and telcon, warn the user about deprecated
functionality (per MPI-2.1). This warning can be toggled using
--enable-mpi-interface-warning (default OFF), but can be
selectively turned on passing
mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING
Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379)
Using gcc-4.5 (gcc-svn) these show up as:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379):
MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0
Jeff and I propose to turn such warnings on with Open MPI-1.7 by default.
- Detection of user-level compiler is handled using the preprocessor
checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove
and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h
(see comments).
The OMPI-build time detection is output (Familyname and Version)
with ompi_info.
This functionality (actually any upcoming __attribute__) are turned
off, if a different compiler (and version) is being detected.
- Note, that any warnings regarding (user-compiler!=build-compiler)
as discussed in the RFC are _not_ included for now.
- Tested on Linux with --enable-mpi-interface-warning on
Linux, gcc-4.5 (deprecated w/ specific msg)
Linux, gcc-4.3 (deprecated w/o specific msg)
Linux, pathscale 3.1 (deprecated w/o specific msg)
Linux, icc-11.0 (deprecated w/o specific msg)
Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning,
further investigation needed...
This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
|
|
|
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
2004-01-07 07:49:23 +00:00
|
|
|
# $HEADER$
|
2003-11-22 16:36:58 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# Initialization, version number, and other random setup/init stuff
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
# Init autoconf
|
|
|
|
|
2005-09-07 05:54:53 +00:00
|
|
|
# We don't have the version number to put in here yet, and we can't
|
|
|
|
# call OMPI_GET_VERSION (etc.) before AC_INIT. So use the shell
|
|
|
|
# version.
|
|
|
|
|
2009-03-16 02:04:22 +00:00
|
|
|
AC_INIT([Open MPI],
|
2005-09-07 05:54:53 +00:00
|
|
|
[m4_normalize(esyscmd([config/ompi_get_version.sh VERSION --base]))],
|
|
|
|
[http://www.open-mpi.org/community/help/], [openmpi])
|
2007-05-15 04:23:48 +00:00
|
|
|
AC_PREREQ(2.60)
|
2006-05-07 19:19:37 +00:00
|
|
|
AC_CONFIG_AUX_DIR(config)
|
|
|
|
AC_CONFIG_MACRO_DIR(config)
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2005-07-28 15:48:46 +00:00
|
|
|
# Get our platform support file. This has to be done very, very early
|
|
|
|
# because it twiddles random bits of autoconf
|
|
|
|
OMPI_LOAD_PLATFORM
|
|
|
|
|
2005-09-07 05:54:53 +00:00
|
|
|
#
|
2007-05-15 04:23:48 +00:00
|
|
|
# Init automake
|
2005-09-07 05:54:53 +00:00
|
|
|
#
|
2008-01-24 23:53:43 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.10 tar-ustar])
|
2005-09-07 05:54:53 +00:00
|
|
|
|
2007-02-08 13:34:44 +00:00
|
|
|
m4_pattern_allow([m4_ifval])
|
|
|
|
|
2005-09-16 02:49:31 +00:00
|
|
|
# Make configure depend on the VERSION file, since it's used in AC_INIT
|
2005-09-07 05:54:53 +00:00
|
|
|
AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
|
|
|
|
|
2006-01-21 22:53:16 +00:00
|
|
|
#
|
|
|
|
# Start it up
|
|
|
|
#
|
|
|
|
|
|
|
|
OMPI_CONFIGURE_SETUP
|
|
|
|
ompi_show_title "Configuring Open MPI"
|
|
|
|
|
|
|
|
ompi_show_subtitle "Checking versions"
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
# Get the version of OMPI that we are installing
|
|
|
|
|
2006-03-12 04:35:01 +00:00
|
|
|
OMPI_SAVE_VERSION([OMPI], [Open MPI], [$srcdir/VERSION],
|
|
|
|
[ompi/include/ompi/version.h])
|
|
|
|
|
2006-03-12 04:43:59 +00:00
|
|
|
OMPI_SAVE_VERSION([ORTE], [Open Run-Time Environment], [$srcdir/VERSION],
|
2006-03-12 04:35:01 +00:00
|
|
|
[orte/include/orte/version.h])
|
|
|
|
|
|
|
|
OMPI_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
|
|
|
|
[opal/include/opal/version.h])
|
2004-06-07 15:33:53 +00:00
|
|
|
|
- As proposed in RFC and telcon, warn the user about deprecated
functionality (per MPI-2.1). This warning can be toggled using
--enable-mpi-interface-warning (default OFF), but can be
selectively turned on passing
mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING
Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379)
Using gcc-4.5 (gcc-svn) these show up as:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379):
MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0
Jeff and I propose to turn such warnings on with Open MPI-1.7 by default.
- Detection of user-level compiler is handled using the preprocessor
checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove
and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h
(see comments).
The OMPI-build time detection is output (Familyname and Version)
with ompi_info.
This functionality (actually any upcoming __attribute__) are turned
off, if a different compiler (and version) is being detected.
- Note, that any warnings regarding (user-compiler!=build-compiler)
as discussed in the RFC are _not_ included for now.
- Tested on Linux with --enable-mpi-interface-warning on
Linux, gcc-4.5 (deprecated w/ specific msg)
Linux, gcc-4.3 (deprecated w/o specific msg)
Linux, pathscale 3.1 (deprecated w/o specific msg)
Linux, icc-11.0 (deprecated w/o specific msg)
Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning,
further investigation needed...
This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
|
|
|
AM_CONFIG_HEADER([opal/include/opal_config.h orte/include/orte_config.h ompi/include/ompi_config.h ompi/include/mpi.h ompi/include/mpi_portable_platform.h])
|
2007-06-05 22:07:30 +00:00
|
|
|
|
2005-09-07 05:54:53 +00:00
|
|
|
# override/fixup the version numbers set by AC_INIT, since on
|
|
|
|
# developer builds, there's no good way to know what the version is
|
|
|
|
# before running configure :(. We only use the base version number
|
|
|
|
# (ie, no svn r numbers) for the version set in AC_INIT. This will
|
|
|
|
# always match reality because we add the VERSION file (the only way
|
2005-09-27 02:06:05 +00:00
|
|
|
# to change the major.minor.release{greek}) into the configure
|
2006-03-12 04:35:01 +00:00
|
|
|
# dependencies. PACKAGE_VERSION the AC_DEFINE doesn't change once set
|
|
|
|
# the first time -- AC_INIT's input (so it doesn't have an r number in
|
|
|
|
# it). PACKAGE_VERSION the AC_SUBST can be rewritten along the way,
|
|
|
|
# and we'd like it to have the r number in it so that it shows up in
|
|
|
|
# the tarball name, so it is set to the full version here.
|
|
|
|
PACKAGE_VERSION="$OPAL_VERSION"
|
2005-09-07 05:54:53 +00:00
|
|
|
PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}"
|
|
|
|
VERSION="${PACKAGE_VERSION}"
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
ompi_show_subtitle "Initialization, setup"
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_TOP_BUILDDIR="`pwd`"
|
|
|
|
AC_SUBST(OMPI_TOP_BUILDDIR)
|
2003-11-22 16:36:58 +00:00
|
|
|
cd "$srcdir"
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_TOP_SRCDIR="`pwd`"
|
|
|
|
AC_SUBST(OMPI_TOP_SRCDIR)
|
|
|
|
cd "$OMPI_TOP_BUILDDIR"
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
AC_MSG_NOTICE([builddir: $OMPI_TOP_BUILDDIR])
|
|
|
|
AC_MSG_NOTICE([srcdir: $OMPI_TOP_SRCDIR])
|
|
|
|
if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then
|
2003-11-22 16:36:58 +00:00
|
|
|
AC_MSG_NOTICE([Detected VPATH build])
|
|
|
|
fi
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
# Setup the top of the opal/include/opal_config.h file
|
2003-11-22 16:36:58 +00:00
|
|
|
|
|
|
|
AH_TOP([/* -*- c -*-
|
|
|
|
*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2009-03-16 02:04:22 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 20:09:25 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
2009-03-16 02:04:22 +00:00
|
|
|
*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Additional copyrights may follow
|
2009-03-16 02:04:22 +00:00
|
|
|
*
|
2004-01-07 14:55:23 +00:00
|
|
|
* $HEADER$
|
2003-11-22 16:36:58 +00:00
|
|
|
*
|
2009-03-16 02:04:22 +00:00
|
|
|
* Function: - OS, CPU and compiler dependent configuration
|
2003-11-22 16:36:58 +00:00
|
|
|
*/
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#ifndef OPAL_CONFIG_H
|
|
|
|
#define OPAL_CONFIG_H
|
2003-12-22 16:29:21 +00:00
|
|
|
])
|
|
|
|
AH_BOTTOM([
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal_config_bottom.h"
|
|
|
|
#endif /* OPAL_CONFIG_H */
|
2003-11-22 16:36:58 +00:00
|
|
|
])
|
|
|
|
|
2004-08-02 00:24:22 +00:00
|
|
|
# Other basic setup stuff (shared with components)
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_BASIC_SETUP
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
top_ompi_srcdir="$OMPI_TOP_SRCDIR"
|
|
|
|
AC_SUBST(top_ompi_srcdir)
|
|
|
|
top_ompi_builddir="$OMPI_TOP_BUILDDIR"
|
|
|
|
AC_SUBST(top_ompi_builddir)
|
2003-11-22 16:36:58 +00:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# Configuration options
|
|
|
|
############################################################################
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_CONFIGURE_OPTIONS
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2008-03-25 12:01:36 +00:00
|
|
|
if test "$enable_binaries" = "no" -a "$enable_dist" = "yes"; then
|
|
|
|
AC_MSG_WARN([--disable-binaries is incompatible with --enable dist])
|
|
|
|
AC_MSG_ERROR([Cannot continue])
|
|
|
|
fi
|
|
|
|
|
2003-11-22 16:36:58 +00:00
|
|
|
############################################################################
|
|
|
|
# Libtool: part one
|
|
|
|
# (before C compiler setup)
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
#
|
|
|
|
# Part one of libtool magic. Enable static so that we have the --with
|
|
|
|
# tests done up here and can check for OS. Save the values of
|
|
|
|
# $enable_static and $enable_shared before setting the defaults,
|
|
|
|
# because if the user specified --[en|dis]able-[static|shared] on the
|
|
|
|
# command line, they'll already be set. In this way, we can tell if
|
|
|
|
# the user requested something or if the default was set here.
|
|
|
|
#
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
ompi_enable_shared="$enable_shared"
|
|
|
|
ompi_enable_static="$enable_static"
|
2004-07-01 16:25:44 +00:00
|
|
|
AM_ENABLE_SHARED
|
|
|
|
AM_DISABLE_STATIC
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2005-10-27 23:23:08 +00:00
|
|
|
OMPI_SETUP_WRAPPER_INIT
|
2005-04-18 16:38:27 +00:00
|
|
|
|
2009-01-28 01:06:53 +00:00
|
|
|
##################################
|
|
|
|
# Check for known incompatibility
|
|
|
|
##################################
|
|
|
|
|
|
|
|
# Do *not* print a message that we're checking the OS because this
|
|
|
|
# test is *not* meant to be an all-inclusive "if it passes this test,
|
|
|
|
# then configure must succeed" test. This test is *only* mean to
|
|
|
|
# screen out the versions of OS X where we know OMPI will cause kernel
|
|
|
|
# panics because of bad implementations of pty's. See
|
|
|
|
# https://svn.open-mpi.org/trac/ompi/ticket/1637 for details.
|
|
|
|
|
|
|
|
# We do not support OS X before version 10.4 (Tiger)
|
|
|
|
case $host_os in
|
|
|
|
# Corresponds to OS X 10.0 - 10.3 (additional [] quoting for m4)
|
2009-03-16 02:04:22 +00:00
|
|
|
darwin[[4567]]*)
|
2009-01-28 01:06:53 +00:00
|
|
|
AC_MSG_WARN([Open MPI does not support OS X prior to version 10.4 (Tiger)])
|
|
|
|
AC_MSG_ERROR([Cannot continue])
|
|
|
|
esac
|
2003-11-22 16:36:58 +00:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# Check for compilers and preprocessors
|
|
|
|
############################################################################
|
2004-06-07 15:33:53 +00:00
|
|
|
ompi_show_title "Compiler and preprocessor tests"
|
2003-11-22 16:36:58 +00:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# C compiler characteristics
|
|
|
|
##################################
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_SETUP_CC
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2005-12-17 22:29:12 +00:00
|
|
|
# If we build on a windows environment with the windows compiler and linker
|
|
|
|
# then we need some translation functions from the opal/win32 directory.
|
|
|
|
AM_CONDITIONAL(OMPI_NEED_WINDOWS_REPLACEMENTS,
|
|
|
|
test "$ompi_cv_c_compiler_vendor" = "microsoft" )
|
|
|
|
|
2008-03-26 23:20:33 +00:00
|
|
|
# Do all Interix detections if necessary
|
|
|
|
OMPI_INTERIX
|
|
|
|
|
2007-11-03 02:40:22 +00:00
|
|
|
# Does the compiler support "ident"-like constructs?
|
|
|
|
|
|
|
|
OMPI_CHECK_IDENT([CC], [CFLAGS], [c], [C])
|
|
|
|
|
2004-02-13 18:05:49 +00:00
|
|
|
#
|
|
|
|
# Check for some types
|
|
|
|
#
|
|
|
|
|
2004-01-09 01:17:00 +00:00
|
|
|
AC_CHECK_TYPES(long long)
|
2004-04-23 20:52:42 +00:00
|
|
|
AC_CHECK_TYPES(long double)
|
2004-01-09 01:17:00 +00:00
|
|
|
AC_CHECK_TYPES(int8_t)
|
|
|
|
AC_CHECK_TYPES(uint8_t)
|
|
|
|
AC_CHECK_TYPES(int16_t)
|
|
|
|
AC_CHECK_TYPES(uint16_t)
|
|
|
|
AC_CHECK_TYPES(int32_t)
|
|
|
|
AC_CHECK_TYPES(uint32_t)
|
|
|
|
AC_CHECK_TYPES(int64_t)
|
|
|
|
AC_CHECK_TYPES(uint64_t)
|
|
|
|
AC_CHECK_TYPES(intptr_t)
|
|
|
|
AC_CHECK_TYPES(uintptr_t)
|
2004-10-13 20:47:52 +00:00
|
|
|
AC_CHECK_TYPES(mode_t)
|
2006-10-20 03:24:59 +00:00
|
|
|
AC_CHECK_TYPES(ssize_t)
|
|
|
|
AC_CHECK_TYPES(ptrdiff_t)
|
2005-05-12 01:42:24 +00:00
|
|
|
|
2004-02-13 18:05:49 +00:00
|
|
|
#
|
|
|
|
# Check for type sizes
|
|
|
|
#
|
|
|
|
|
2004-01-09 01:17:00 +00:00
|
|
|
AC_CHECK_SIZEOF(char)
|
|
|
|
AC_CHECK_SIZEOF(short)
|
|
|
|
AC_CHECK_SIZEOF(int)
|
|
|
|
AC_CHECK_SIZEOF(long)
|
2004-04-23 20:52:42 +00:00
|
|
|
if test $ac_cv_type_long_long = yes; then
|
|
|
|
AC_CHECK_SIZEOF(long long)
|
|
|
|
fi
|
|
|
|
if test $ac_cv_type_long_double = yes; then
|
|
|
|
AC_CHECK_SIZEOF(long double)
|
|
|
|
fi
|
2004-06-29 00:02:25 +00:00
|
|
|
AC_CHECK_SIZEOF(float)
|
|
|
|
AC_CHECK_SIZEOF(double)
|
2004-01-09 01:17:00 +00:00
|
|
|
AC_CHECK_SIZEOF(void *)
|
2005-04-05 02:32:36 +00:00
|
|
|
AC_CHECK_SIZEOF(size_t)
|
2006-10-20 03:24:59 +00:00
|
|
|
if test $ac_cv_type_ssize_t = yes ; then
|
|
|
|
AC_CHECK_SIZEOF(ssize_t)
|
|
|
|
fi
|
|
|
|
if test $ac_cv_type_ptrdiff_t = yes; then
|
|
|
|
AC_CHECK_SIZEOF(ptrdiff_t)
|
|
|
|
fi
|
2004-02-13 18:05:49 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check for type alignments
|
|
|
|
#
|
|
|
|
|
2009-05-06 20:11:28 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(char, OPAL_ALIGNMENT_CHAR)
|
|
|
|
OMPI_C_GET_ALIGNMENT(short, OPAL_ALIGNMENT_SHORT)
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(wchar_t, OMPI_ALIGNMENT_WCHAR)
|
2009-05-06 20:11:28 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(int, OPAL_ALIGNMENT_INT)
|
|
|
|
OMPI_C_GET_ALIGNMENT(long, OPAL_ALIGNMENT_LONG)
|
2004-04-23 20:52:42 +00:00
|
|
|
if test $ac_cv_type_long_long = yes; then
|
2009-05-06 20:11:28 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(long long, OPAL_ALIGNMENT_LONG_LONG)
|
2004-04-23 20:52:42 +00:00
|
|
|
fi
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(float, OMPI_ALIGNMENT_FLOAT)
|
|
|
|
OMPI_C_GET_ALIGNMENT(double, OMPI_ALIGNMENT_DOUBLE)
|
2004-04-23 20:52:42 +00:00
|
|
|
if test $ac_cv_type_long_double = yes; then
|
2009-05-06 20:11:28 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(long double, OPAL_ALIGNMENT_LONG_DOUBLE)
|
2004-04-23 20:52:42 +00:00
|
|
|
fi
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(void *, OMPI_ALIGNMENT_VOID_P)
|
2004-02-13 18:05:49 +00:00
|
|
|
|
2004-10-22 20:30:59 +00:00
|
|
|
#
|
|
|
|
# Does the C compiler native support "bool"? (i.e., without
|
|
|
|
# <stdbool.h> or any other help)
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for C bool type)
|
|
|
|
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
|
|
|
|
AC_INCLUDES_DEFAULT]],
|
|
|
|
[[bool bar, foo = true; bar = foo;]]),
|
2009-05-06 20:11:28 +00:00
|
|
|
[OPAL_NEED_C_BOOL=0 MSG=yes],[OPAL_NEED_C_BOOL=1 MSG=no])
|
|
|
|
AC_DEFINE_UNQUOTED(OPAL_NEED_C_BOOL, $OPAL_NEED_C_BOOL,
|
2004-10-22 20:30:59 +00:00
|
|
|
[Whether the C compiler supports "bool" without any other help (such as <stdbool.h>)])
|
|
|
|
AC_MSG_RESULT([$MSG])
|
|
|
|
|
2004-02-13 18:05:49 +00:00
|
|
|
#
|
|
|
|
# Check for other compiler characteristics
|
|
|
|
#
|
2004-01-07 07:49:23 +00:00
|
|
|
|
2004-06-15 17:10:47 +00:00
|
|
|
if test "$GCC" = "yes"; then
|
|
|
|
|
|
|
|
# gcc 2.96 will emit oodles of warnings if you use "inline" with
|
|
|
|
# -pedantic (which we do in developer builds). However,
|
|
|
|
# "__inline__" is ok. So we have to force gcc to select the
|
|
|
|
# right one. If you use -pedantic, the AC_C_INLINE test will fail
|
|
|
|
# (because it names a function foo() -- without the (void)). So
|
|
|
|
# we turn off all the picky flags, turn on -ansi mode (which is
|
|
|
|
# implied by -pedantic), and set warnings to be errors. Hence,
|
|
|
|
# this does the following (for 2.96):
|
|
|
|
#
|
|
|
|
# - causes the check for "inline" to emit a warning, which then
|
|
|
|
# fails
|
|
|
|
# - checks for __inline__, which then emits no error, and works
|
|
|
|
#
|
|
|
|
# This also works nicely for gcc 3.x because "inline" will work on
|
|
|
|
# the first check, and all is fine. :-)
|
|
|
|
|
|
|
|
CFLAGS_save="$CFLAGS"
|
|
|
|
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY -Werror -ansi"
|
|
|
|
fi
|
2003-12-22 16:29:21 +00:00
|
|
|
AC_C_INLINE
|
2006-08-21 22:13:32 +00:00
|
|
|
# Microsoft compilers support 2 versions of restrict. One for functions, and
|
|
|
|
# one for variables. The problem is that they don't have an equivalent
|
|
|
|
# syntax, and the autoconf restrict detection is unable to detect them
|
|
|
|
# correctly. It detect the restrict keyword as __restrict which break the
|
|
|
|
# rules for function syntax which is declspec(restrict).
|
|
|
|
if test "x$ompi_cv_c_compiler_vendor" != "xmicrosoft"; then
|
2009-03-16 04:22:22 +00:00
|
|
|
AC_C_RESTRICT
|
2006-08-21 22:13:32 +00:00
|
|
|
fi
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_C_WEAK_SYMBOLS
|
2004-06-15 17:10:47 +00:00
|
|
|
if test "$GCC" = "yes"; then
|
|
|
|
CFLAGS="$CFLAGS_save"
|
|
|
|
fi
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2005-05-10 09:09:04 +00:00
|
|
|
if test "x$CC" = "xicc"; then
|
2009-03-16 04:22:22 +00:00
|
|
|
OMPI_CHECK_ICC_VARARGS
|
2005-05-10 09:09:04 +00:00
|
|
|
fi
|
|
|
|
|
2004-01-08 13:36:14 +00:00
|
|
|
# If we want the profiling layer:
|
|
|
|
# - If the C compiler has weak symbols, use those.
|
|
|
|
# - If not, then set to compile the code again with #define's in a
|
|
|
|
# separate directory.
|
|
|
|
|
|
|
|
if test "$WANT_WEAK_SYMBOLS" = "0"; then
|
2009-05-06 20:11:28 +00:00
|
|
|
OPAL_C_HAVE_WEAK_SYMBOLS=0
|
2004-01-08 13:36:14 +00:00
|
|
|
fi
|
|
|
|
if test "$WANT_MPI_PROFILING" = "1"; then
|
2009-05-06 20:11:28 +00:00
|
|
|
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
|
2009-03-16 04:22:22 +00:00
|
|
|
OMPI_PROFILING_COMPILE_SEPARATELY=0
|
2004-01-08 13:36:14 +00:00
|
|
|
else
|
2009-03-16 04:22:22 +00:00
|
|
|
OMPI_PROFILING_COMPILE_SEPARATELY=1
|
2004-01-08 13:36:14 +00:00
|
|
|
fi
|
|
|
|
else
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_PROFILING_COMPILE_SEPARATELY=0
|
2004-01-08 13:36:14 +00:00
|
|
|
fi
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2004-01-15 01:11:59 +00:00
|
|
|
#
|
2004-06-29 00:02:25 +00:00
|
|
|
# There are 2 layers to the MPI Language binidings One layer generates
|
|
|
|
# MPI_* bindings. The other layer generates PMPI_* bindings. The
|
|
|
|
# following conditions determine whether each (or both) these layers
|
|
|
|
# are built.
|
2004-01-15 01:11:59 +00:00
|
|
|
# 1. MPI_* bindings are needed if:
|
2009-03-16 04:22:22 +00:00
|
|
|
# - Profiling is not required
|
|
|
|
# - Profiling is required but weak symbols are not
|
|
|
|
# supported
|
2004-06-29 00:02:25 +00:00
|
|
|
# 2. PMPI_* bindings are needed if profiling is required. Hence we
|
|
|
|
# define 2 conditionals which tell us whether each of these layers
|
|
|
|
# need to be built or NOT
|
2004-01-15 01:11:59 +00:00
|
|
|
#
|
2004-06-29 00:02:25 +00:00
|
|
|
|
2004-01-15 01:11:59 +00:00
|
|
|
AM_CONDITIONAL(WANT_MPI_BINDINGS_LAYER,
|
2009-03-16 04:22:22 +00:00
|
|
|
test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
|
2004-01-15 01:11:59 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL(WANT_PMPI_BINDINGS_LAYER,
|
2009-03-16 04:22:22 +00:00
|
|
|
test "$WANT_MPI_PROFILING" = 1)
|
2009-03-16 02:04:22 +00:00
|
|
|
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
|
2004-06-07 15:33:53 +00:00
|
|
|
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
|
|
|
|
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING,
|
2004-01-08 15:51:54 +00:00
|
|
|
[Whether we want MPI profiling or not])
|
2009-05-06 20:11:28 +00:00
|
|
|
AC_DEFINE_UNQUOTED(OPAL_HAVE_WEAK_SYMBOLS, $OPAL_C_HAVE_WEAK_SYMBOLS,
|
2009-03-16 02:00:27 +00:00
|
|
|
[Whether we have weak symbols or not])
|
2004-01-08 13:36:14 +00:00
|
|
|
|
2004-01-07 07:49:23 +00:00
|
|
|
|
2003-11-22 16:36:58 +00:00
|
|
|
##################################
|
|
|
|
# C++ compiler characteristics
|
|
|
|
##################################
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_SETUP_CXX
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2007-11-03 02:40:22 +00:00
|
|
|
# Does the compiler support "ident"-like constructs?
|
|
|
|
|
|
|
|
OMPI_CHECK_IDENT([CXX], [CXXFLAGS], [cc], [C++])
|
|
|
|
|
2003-11-22 16:36:58 +00:00
|
|
|
# check for type sizes
|
2004-02-13 18:05:49 +00:00
|
|
|
|
2005-12-15 04:19:16 +00:00
|
|
|
AC_LANG_PUSH(C++)
|
2004-02-13 18:05:49 +00:00
|
|
|
AC_CHECK_SIZEOF(bool)
|
|
|
|
|
2003-11-22 16:36:58 +00:00
|
|
|
# check for type alignments
|
2004-02-13 18:05:49 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_C_GET_ALIGNMENT(bool, OMPI_ALIGNMENT_CXX_BOOL)
|
2005-12-15 04:19:16 +00:00
|
|
|
AC_LANG_POP(C++)
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2007-11-03 02:40:22 +00:00
|
|
|
# check if we want C++ support
|
2004-07-14 14:11:03 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL(WANT_MPI_CXX_BINDINGS,
|
|
|
|
test "$WANT_MPI_CXX_SUPPORT" = 1)
|
|
|
|
AC_DEFINE_UNQUOTED(OMPI_WANT_CXX_BINDINGS, $WANT_MPI_CXX_SUPPORT,
|
|
|
|
[Whether we want MPI cxx support or not])
|
2007-02-08 13:34:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Only after setting up both
|
|
|
|
# C and C++ check compiler attributes.
|
|
|
|
##################################
|
|
|
|
OMPI_CHECK_ATTRIBUTES
|
|
|
|
|
- As proposed in RFC and telcon, warn the user about deprecated
functionality (per MPI-2.1). This warning can be toggled using
--enable-mpi-interface-warning (default OFF), but can be
selectively turned on passing
mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING
Using icc, gcc < 4.5, warnings (such as in mpi2basic_tests) show:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379)
Using gcc-4.5 (gcc-svn) these show up as:
type_vector.c:83: warning: ‘MPI_Type_hvector’ is deprecated
(declared at /home/../usr/include/mpi.h:1379):
MPI_Type_hvector is superseded by MPI_Type_create_hvector in MPI-2.0
Jeff and I propose to turn such warnings on with Open MPI-1.7 by default.
- Detection of user-level compiler is handled using the preprocessor
checks of GASnet's other/portable_platform.h (thanks to Paul Hargrove
and Dan Bonachea) adapted into ompi/include/mpi_portable_platform.h
(see comments).
The OMPI-build time detection is output (Familyname and Version)
with ompi_info.
This functionality (actually any upcoming __attribute__) are turned
off, if a different compiler (and version) is being detected.
- Note, that any warnings regarding (user-compiler!=build-compiler)
as discussed in the RFC are _not_ included for now.
- Tested on Linux with --enable-mpi-interface-warning on
Linux, gcc-4.5 (deprecated w/ specific msg)
Linux, gcc-4.3 (deprecated w/o specific msg)
Linux, pathscale 3.1 (deprecated w/o specific msg)
Linux, icc-11.0 (deprecated w/o specific msg)
Linux, PGI-8.0.6 accepts __deprecated__ but does not issue a warning,
further investigation needed...
This commit was SVN r21262.
2009-05-22 04:39:43 +00:00
|
|
|
OPAL_CHECK_COMPILER_VERSION_ID
|
2004-01-07 07:49:23 +00:00
|
|
|
|
2005-01-27 01:39:55 +00:00
|
|
|
##################################
|
|
|
|
# Assembler Configuration
|
|
|
|
##################################
|
|
|
|
|
2009-03-16 02:04:22 +00:00
|
|
|
ompi_show_subtitle "Assembler"
|
2005-01-27 01:39:55 +00:00
|
|
|
|
|
|
|
AM_PROG_AS
|
|
|
|
OMPI_CONFIG_ASM
|
|
|
|
|
|
|
|
|
2003-11-22 16:36:58 +00:00
|
|
|
##################################
|
|
|
|
# Fortran
|
|
|
|
##################################
|
|
|
|
|
2006-02-12 15:11:36 +00:00
|
|
|
#-----------
|
|
|
|
# Fortran 77
|
|
|
|
#-----------
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_SETUP_F77
|
2004-06-28 19:56:21 +00:00
|
|
|
|
2005-05-19 23:56:02 +00:00
|
|
|
# This allows us to mark bogus types, but still have them be a valid
|
|
|
|
# [sentinel] value
|
|
|
|
|
|
|
|
AC_DEFINE([ompi_fortran_bogus_type_t], [int],
|
|
|
|
[A bogus type that allows us to have sentinel type values that are still valid])
|
|
|
|
|
|
|
|
# We want to set the #define's for all of these, so invoke the macros
|
|
|
|
# regardless of whether we have F77 support or not.
|
|
|
|
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([LOGICAL], [yes],
|
2006-09-28 03:25:18 +00:00
|
|
|
[char, int32_t, int, int64_t, long long, long], [-1])
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([LOGICAL*1], [yes],
|
2008-02-15 22:54:20 +00:00
|
|
|
[char, int8_t, short, int32_t, int, int64_t, long long, long], [1])
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([LOGICAL*2], [yes],
|
2008-02-15 22:54:20 +00:00
|
|
|
[short, int16_t, int32_t, int, int64_t, long long, long], [2])
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([LOGICAL*4], [yes],
|
2008-02-15 22:54:20 +00:00
|
|
|
[int32_t, int, int64_t, long long, long], [4])
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([LOGICAL*8], [yes],
|
2008-02-15 22:54:20 +00:00
|
|
|
[int, int64_t, long long, long], [8])
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([INTEGER], [yes],
|
2006-09-28 03:25:18 +00:00
|
|
|
[int32_t, int, int64_t, long long, long], [-1])
|
2009-03-16 02:04:22 +00:00
|
|
|
OMPI_F77_CHECK([INTEGER*1], [no],
|
2006-01-13 04:08:40 +00:00
|
|
|
[char, int8_t, short, int, int64_t, long long, long], [1])
|
|
|
|
OMPI_F77_CHECK([INTEGER*2], [no],
|
|
|
|
[short, int16_t, int32_t, int, int64_t, long long, long], [2])
|
|
|
|
OMPI_F77_CHECK([INTEGER*4], [no],
|
|
|
|
[int32_t, int, int64_t, long long, long], [4])
|
|
|
|
OMPI_F77_CHECK([INTEGER*8], [no],
|
|
|
|
[int, int64_t, long long, long], [8])
|
|
|
|
OMPI_F77_CHECK([INTEGER*16], [no],
|
|
|
|
[int, int64_t, long long, long], [16])
|
|
|
|
|
|
|
|
OMPI_F77_CHECK([REAL], [yes],
|
|
|
|
[float, double, long double], [-1])
|
2007-06-19 05:03:11 +00:00
|
|
|
OMPI_F77_CHECK([REAL*2], [no],
|
|
|
|
[float, double, long double], [2])
|
2006-01-13 04:08:40 +00:00
|
|
|
OMPI_F77_CHECK([REAL*4], [no],
|
|
|
|
[float, double, long double], [4])
|
|
|
|
OMPI_F77_CHECK([REAL*8], [no],
|
|
|
|
[float, double, long double], [8])
|
|
|
|
OMPI_F77_CHECK([REAL*16], [no],
|
|
|
|
[float, double, long double], [16])
|
2008-11-07 20:37:21 +00:00
|
|
|
|
|
|
|
# In some compilers, the bit representation of REAL*16 is not the same
|
|
|
|
# as the C counterpart that we found. If this is the case, then we
|
|
|
|
# want to disable reduction support for MPI_REAL16 (per ticket #1603).
|
|
|
|
OMPI_F77_CHECK_REAL16_C_EQUIV
|
|
|
|
|
2006-01-13 04:08:40 +00:00
|
|
|
OMPI_F77_CHECK([DOUBLE PRECISION], [yes],
|
|
|
|
[float, double, long double], [-1])
|
|
|
|
|
|
|
|
OMPI_F77_CHECK([COMPLEX], [yes], [], [-1])
|
2005-05-19 23:56:02 +00:00
|
|
|
|
|
|
|
# The complex*N tests are a bit different (note: the complex tests are
|
|
|
|
# the same as all the rest, because complex is a composite of two
|
|
|
|
# reals, which we *have* to have. It's only the complex*N tests that
|
|
|
|
# are different). The fortran complex types are composites of the
|
|
|
|
# real*(N/2) types. So for us to support complex*N, two conditions
|
|
|
|
# must be true:
|
2004-06-29 00:02:25 +00:00
|
|
|
#
|
2005-05-19 23:56:02 +00:00
|
|
|
# a) we must support real*(N/2) (i.e., compiler supports it and we
|
|
|
|
# have a back-end C type for it)
|
|
|
|
# b) compiler supports complex*N
|
2005-05-10 09:09:04 +00:00
|
|
|
|
2006-01-13 04:08:40 +00:00
|
|
|
OMPI_F77_CHECK([COMPLEX*8], [no], [], [8])
|
|
|
|
OMPI_F77_CHECK([COMPLEX*16], [no], [], [16])
|
|
|
|
OMPI_F77_CHECK([COMPLEX*32], [no], [], [32])
|
2004-03-16 23:54:51 +00:00
|
|
|
|
2004-10-23 21:08:12 +00:00
|
|
|
# Regardless of whether we have fortran bindings, or even a fortran
|
|
|
|
# compiler, get the max value for a fortran MPI handle (this macro
|
|
|
|
# handles the case where we don't have a fortran compiler).
|
|
|
|
|
|
|
|
OMPI_F77_GET_FORTRAN_HANDLE_MAX
|
|
|
|
|
- Implement correct Fortran Logical-handling in f77/f90 interface in
case of:
sizeof(MPI_Flogical) != sizeof (int)
and
Fortran value of .TRUE. != 1
as is often the case.
- Check in configure the value of .TRUE., the C-type coresponding to
logical and check, that fortran compiler does not do something strange
with arrays of logicals
- Convert all occurrences of logicals in the fortran wrappers, only
in case it is needed.
*Please note* Implementation of MPI_Cart_sub needed special treatment.
- Output these value in ompi_info -a
- Clean up the prototypes_mpi.h to just have a single definition and
thereby deleting the necessity for prototypes_pmpi.h
- configured, compiled and tested with F90-program, which uses
MPI_Cart_create and MPI_Cart_get:
linux ia32, gcc (no testing, as no f90)
linux ia32, gcc --disable-mpi-f77 --disable-mpi-f90 (had a bug there)
linux ia32, icc-8.1
linux opteron, gcc-3.3.5, pgcc, pathccx/pathf90 (tested just
pgi-compiler)
linux em64t, gcc, icc-8.1 (tested just icc)
This commit was SVN r8254.
2005-11-24 16:52:35 +00:00
|
|
|
#
|
|
|
|
# Check for Fortran compilers value of TRUE and for the correct assumption
|
|
|
|
# on LOGICAL for conversion into what C considers to be a true value
|
|
|
|
#
|
|
|
|
OMPI_F77_GET_VALUE_TRUE
|
|
|
|
OMPI_F77_CHECK_LOGICAL_ARRAY
|
|
|
|
|
2004-04-13 23:05:31 +00:00
|
|
|
#
|
2004-06-29 00:02:25 +00:00
|
|
|
# There are 2 layers to the MPI f77 layer. The only extra thing that
|
|
|
|
# determine f77 bindings is that fortran can be disabled by user. In
|
|
|
|
# such cases, we need to not build the target at all. One layer
|
|
|
|
# generates MPI_f77* bindings. The other layer generates PMPI_f77*
|
|
|
|
# bindings. The following conditions determine whether each (or both)
|
|
|
|
# these layers are built.
|
|
|
|
#
|
2004-04-13 23:05:31 +00:00
|
|
|
# Superceeding clause:
|
|
|
|
# - fortran77 bindings should be enabled, else everything is
|
|
|
|
# disabled
|
|
|
|
# 1. MPI_f77* bindings are needed if:
|
|
|
|
# - Profiling is not required
|
|
|
|
# - Profiling is required but weak symbols are not
|
|
|
|
# supported
|
2004-06-29 00:02:25 +00:00
|
|
|
# 2. PMPI_* bindings are needed if profiling is required. Hence we
|
|
|
|
# define 2 conditionals which tell us whether each of these layers
|
|
|
|
# need to be built or NOT
|
2004-04-13 23:05:31 +00:00
|
|
|
#
|
|
|
|
AM_CONDITIONAL(WANT_MPI_F77_BINDINGS_LAYER,
|
2004-09-15 09:15:50 +00:00
|
|
|
test \( "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1 \) -a "$OMPI_WANT_F77_BINDINGS" = 1)
|
2009-03-16 02:04:22 +00:00
|
|
|
|
2004-04-13 23:05:31 +00:00
|
|
|
AM_CONDITIONAL(WANT_PMPI_F77_BINDINGS_LAYER,
|
2004-06-07 15:33:53 +00:00
|
|
|
test "$OMPI_WANT_F77_BINDINGS" = 1 -a "$WANT_MPI_PROFILING" = 1)
|
2004-03-28 10:02:38 +00:00
|
|
|
|
2006-02-12 15:11:36 +00:00
|
|
|
#-----------
|
|
|
|
# Fortran 90
|
|
|
|
#-----------
|
2005-01-07 21:21:46 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
OMPI_SETUP_F90
|
2003-11-22 16:36:58 +00:00
|
|
|
|
2006-02-12 15:11:36 +00:00
|
|
|
# Look for the fortran module compiler flag
|
|
|
|
OMPI_F90_FIND_MODULE_INCLUDE_FLAG
|
|
|
|
|
|
|
|
# Look for all the types
|
|
|
|
OMPI_F90_IKINDS=""
|
|
|
|
OMPI_F90_RKINDS=""
|
|
|
|
OMPI_F90_CKINDS=""
|
|
|
|
|
|
|
|
# LOGICAL and friends
|
2006-02-14 13:05:37 +00:00
|
|
|
OMPI_F90_CHECK([LOGICAL])
|
2008-02-15 22:54:20 +00:00
|
|
|
OMPI_F90_CHECK([LOGICAL*1], [1])
|
|
|
|
OMPI_F90_CHECK([LOGICAL*2], [2])
|
|
|
|
OMPI_F90_CHECK([LOGICAL*4], [4])
|
|
|
|
OMPI_F90_CHECK([LOGICAL*8], [8])
|
2006-02-12 15:11:36 +00:00
|
|
|
|
|
|
|
# INTEGER and friends
|
2006-02-14 13:05:37 +00:00
|
|
|
OMPI_F90_CHECK([INTEGER])
|
|
|
|
OMPI_F90_CHECK([INTEGER*1], [1])
|
|
|
|
OMPI_F90_CHECK([INTEGER*2], [2])
|
|
|
|
OMPI_F90_CHECK([INTEGER*4], [4])
|
|
|
|
OMPI_F90_CHECK([INTEGER*8], [8])
|
|
|
|
OMPI_F90_CHECK([INTEGER*16], [16])
|
2006-02-12 15:11:36 +00:00
|
|
|
|
|
|
|
# REAL, DOUBLE PRECISION, REAL*4, *8, *16
|
2006-02-14 13:05:37 +00:00
|
|
|
OMPI_F90_CHECK([REAL])
|
2007-06-19 05:03:11 +00:00
|
|
|
OMPI_F90_CHECK([REAL*2], [2])
|
|
|
|
OMPI_F90_CHECK([REAL*4], [4])
|
|
|
|
OMPI_F90_CHECK([REAL*8], [8])
|
|
|
|
OMPI_F90_CHECK([REAL*16], [16])
|
2006-02-27 05:19:13 +00:00
|
|
|
OMPI_F90_CHECK([DOUBLE PRECISION])
|
2006-02-12 15:11:36 +00:00
|
|
|
|
|
|
|
# COMPLEX, DOUBLE COMPLEX, COMPLEX*8, *16, *32
|
2006-02-14 13:05:37 +00:00
|
|
|
OMPI_F90_CHECK([COMPLEX])
|
2006-02-27 05:19:13 +00:00
|
|
|
OMPI_F90_CHECK([COMPLEX*8], [8])
|
|
|
|
OMPI_F90_CHECK([COMPLEX*16], [16])
|
|
|
|
OMPI_F90_CHECK([COMPLEX*32], [32])
|
|
|
|
OMPI_F90_CHECK([DOUBLE COMPLEX])
|
2006-02-12 15:11:36 +00:00
|
|
|
|
|
|
|
AC_SUBST(OMPI_F90_IKINDS)
|
|
|
|
AC_SUBST(OMPI_F90_RKINDS)
|
|
|
|
AC_SUBST(OMPI_F90_CKINDS)
|
|
|
|
|
2006-04-11 03:33:38 +00:00
|
|
|
# get kind value for Fortran MPI_INTEGER_KIND (corresponding to
|
|
|
|
# whatever is the same size as a F77 INTEGER -- for the
|
|
|
|
# most-likely-will-never-occur case where F77 INTEGER is smaller than
|
|
|
|
# an F90 INTEGER; see MPI-2 4.12.6.5
|
|
|
|
if test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "2"; then
|
|
|
|
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 4, OMPI_MPI_INTEGER_KIND)
|
|
|
|
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "4"; then
|
|
|
|
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 9, OMPI_MPI_INTEGER_KIND)
|
|
|
|
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "8"; then
|
|
|
|
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 18, OMPI_MPI_INTEGER_KIND)
|
|
|
|
elif test "$OMPI_SIZEOF_FORTRAN_INTEGER" = "16"; then
|
|
|
|
OMPI_F90_GET_INT_KIND(MPI_INTEGER_KIND, 19, OMPI_MPI_INTEGER_KIND)
|
|
|
|
AC_MSG_ERROR([Cannot support Fortran MPI_INTEGER_KIND!])
|
|
|
|
fi
|
|
|
|
AC_SUBST(OMPI_MPI_INTEGER_KIND)
|
2005-07-26 17:23:24 +00:00
|
|
|
|
2006-02-12 15:11:36 +00:00
|
|
|
# get kind value for Fortran MPI_ADDRESS_KIND (corresponding to
|
|
|
|
# whatever is big enough to hold (void*))
|
2009-03-16 02:00:27 +00:00
|
|
|
if test $ac_cv_sizeof_void_p = 2 ; then
|
2006-02-12 15:11:36 +00:00
|
|
|
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 4, OMPI_MPI_ADDRESS_KIND)
|
2009-03-16 02:00:27 +00:00
|
|
|
elif test $ac_cv_sizeof_void_p = 4 ; then
|
2006-02-12 15:11:36 +00:00
|
|
|
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 9, OMPI_MPI_ADDRESS_KIND)
|
2009-03-16 02:00:27 +00:00
|
|
|
elif test $ac_cv_sizeof_void_p = 8 ; then
|
2006-02-12 15:11:36 +00:00
|
|
|
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 18, OMPI_MPI_ADDRESS_KIND)
|
2009-03-16 02:00:27 +00:00
|
|
|
elif test $ac_cv_sizeof_void_p = 16 ; then
|
2006-02-12 15:11:36 +00:00
|
|
|
OMPI_F90_GET_INT_KIND(MPI_ADDRESS_KIND, 19, OMPI_MPI_ADDRESS_KIND)
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Cannot support Fortran MPI_ADDRESS_KIND!])
|
2005-01-07 21:21:46 +00:00
|
|
|
fi
|
2005-07-26 17:23:24 +00:00
|
|
|
AC_SUBST(OMPI_MPI_ADDRESS_KIND)
|
|
|
|
|
2006-04-11 03:33:38 +00:00
|
|
|
# get kind value for Fortran MPI_OFFSET_KIND (corresponding to INTEGER*8)
|
|
|
|
OMPI_F90_GET_INT_KIND(MPI_OFFSET_KIND, 18, OMPI_MPI_OFFSET_KIND)
|
|
|
|
AC_SUBST(OMPI_MPI_OFFSET_KIND)
|
|
|
|
|
2005-07-09 18:52:53 +00:00
|
|
|
# checkpoint results
|
|
|
|
AC_CACHE_SAVE
|
|
|
|
|
2003-11-22 16:36:58 +00:00
|
|
|
##################################
|
|
|
|
# Header files
|
|
|
|
##################################
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
ompi_show_title "Header file tests"
|
2004-03-28 10:52:58 +00:00
|
|
|
|
2005-04-15 21:18:20 +00:00
|
|
|
AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
|
2006-03-11 02:35:40 +00:00
|
|
|
dlfcn.h execinfo.h err.h fcntl.h grp.h inttypes.h libgen.h \
|
2009-03-05 02:40:25 +00:00
|
|
|
libutil.h memory.h netdb.h netinet/in.h netinet/tcp.h \
|
2005-04-15 21:18:20 +00:00
|
|
|
poll.h pthread.h pty.h pwd.h sched.h stdint.h \
|
2009-03-05 02:40:25 +00:00
|
|
|
stdlib.h string.h strings.h stropts.h sys/fcntl.h sys/ipc.h \
|
2005-04-15 21:18:20 +00:00
|
|
|
sys/ioctl.h sys/mman.h sys/param.h sys/queue.h \
|
|
|
|
sys/resource.h sys/select.h sys/socket.h sys/sockio.h \
|
2006-07-27 01:51:18 +00:00
|
|
|
stdarg.h sys/stat.h sys/statvfs.h sys/time.h sys/tree.h \
|
2007-07-10 03:46:57 +00:00
|
|
|
sys/types.h sys/uio.h net/uio.h sys/utsname.h sys/wait.h syslog.h \
|
2007-04-25 01:55:40 +00:00
|
|
|
time.h termios.h ulimit.h unistd.h util.h utmp.h malloc.h \
|
2007-07-10 03:46:57 +00:00
|
|
|
ifaddrs.h sys/sysctl.h crt_externs.h regex.h \
|
2008-09-10 12:58:30 +00:00
|
|
|
ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h])
|
2004-09-29 19:42:16 +00:00
|
|
|
|
2006-01-12 03:19:37 +00:00
|
|
|
# Needed to work around Darwin requiring sys/socket.h for
|
|
|
|
# net/if.h
|
|
|
|
AC_CHECK_HEADERS([net/if.h], [], [],
|
|
|
|
[#include <stdio.h>
|
|
|
|
|