2003-11-22 19:36:58 +03:00
# -*- shell-script -*-
#
2009-05-27 00:49:35 +04:00
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
2005-11-05 22:57:48 +03: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 09:03:11 +04:00
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
2004-11-28 23:09:25 +03:00
# University of Stuttgart. All rights reserved.
2005-03-24 15:43:37 +03: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 08:39:43 +04:00
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
2008-09-10 16:58:30 +04:00
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
2007-06-05 07:03:59 +04:00
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
2006-11-30 04:59:44 +03: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 08:39:43 +04:00
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
2004-11-22 04:38:40 +03:00
# $COPYRIGHT$
#
# Additional copyrights may follow
#
2004-01-07 10:49:23 +03:00
# $HEADER$
2003-11-22 19:36:58 +03:00
#
############################################################################
# Initialization, version number, and other random setup/init stuff
############################################################################
2009-10-21 03:44:20 +04:00
# Load project list and names
m4_include([config/project_list.m4])
2003-11-22 19:36:58 +03:00
# Init autoconf
2005-09-07 09:54:53 +04: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
2009-10-21 03:44:20 +04:00
# version. project_name_* comes from config/project_list.m4, which
# was set during autogen.sh.
2005-09-07 09:54:53 +04:00
2009-10-21 03:44:20 +04:00
AC_INIT([project_name_long],
2005-09-07 09:54:53 +04:00
[m4_normalize(esyscmd([config/ompi_get_version.sh VERSION --base]))],
2009-10-21 03:44:20 +04:00
[http://www.open-mpi.org/community/help/], [project_name_short])
2007-05-15 08:23:48 +04:00
AC_PREREQ(2.60)
2006-05-07 23:19:37 +04:00
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
2003-11-22 19:36:58 +03:00
2005-07-28 19:48:46 +04: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 09:54:53 +04:00
#
2007-05-15 08:23:48 +04:00
# Init automake
2005-09-07 09:54:53 +04:00
#
2008-01-25 02:53:43 +03:00
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.10 tar-ustar])
2005-09-07 09:54:53 +04:00
2007-02-08 16:34:44 +03:00
m4_pattern_allow([m4_ifval])
2005-09-16 06:49:31 +04:00
# Make configure depend on the VERSION file, since it's used in AC_INIT
2005-09-07 09:54:53 +04:00
AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
2009-10-21 03:44:20 +04:00
# Set up project specific AM_CONDITIONALs
AM_CONDITIONAL([PROJECT_OMPI], m4_ifdef([project_ompi], [/bin/true], [/bin/false]))
AM_CONDITIONAL([PROJECT_ORTE], m4_ifdef([project_orte], [/bin/true], [/bin/false]))
2006-01-22 01:53:16 +03:00
#
# Start it up
#
OMPI_CONFIGURE_SETUP
2009-10-21 03:44:20 +04:00
ompi_show_title "Configuring project_name_long"
2006-01-22 01:53:16 +03:00
ompi_show_subtitle "Checking versions"
2004-06-07 19:33:53 +04:00
# Get the version of OMPI that we are installing
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi],
[OMPI_SAVE_VERSION([OMPI], [Open MPI], [$srcdir/VERSION],
[ompi/include/ompi/version.h])])
2006-03-12 07:35:01 +03:00
2009-10-21 03:44:20 +04:00
m4_ifdef([project_orte],
[OMPI_SAVE_VERSION([ORTE], [Open MPI Run-Time Environment],
[$srcdir/VERSION],
[orte/include/orte/version.h])])
2006-03-12 07:35:01 +03:00
OMPI_SAVE_VERSION([OPAL], [Open Portable Access Layer], [$srcdir/VERSION],
[opal/include/opal/version.h])
2004-06-07 19:33:53 +04:00
2009-07-24 05:04:17 +04:00
# Get shared library version numbers
. $srcdir/VERSION
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi],
[AC_SUBST(libmpi_so_version)
AC_SUBST(libmpi_cxx_so_version)
AC_SUBST(libmpi_f77_so_version)
AC_SUBST(libmpi_f90_so_version)])
m4_ifdef([project_orte],
[AC_SUBST(libopen_rte_so_version)])
2009-07-24 05:04:17 +04:00
AC_SUBST(libopen_pal_so_version)
# List header files to generate
2009-10-21 03:44:20 +04:00
AM_CONFIG_HEADER([opal/include/opal_config.h])
m4_ifdef([project_orte],
[AM_CONFIG_HEADER([orte/include/orte_config.h])])
m4_ifdef([project_ompi],
[AM_CONFIG_HEADER([ompi/include/ompi_config.h ompi/include/mpi.h ompi/include/mpi_portable_platform.h])])
2007-06-06 02:07:30 +04:00
2005-09-07 09:54:53 +04: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 06:06:05 +04:00
# to change the major.minor.release{greek}) into the configure
2006-03-12 07:35:01 +03: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 09:54:53 +04:00
PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}"
VERSION="${PACKAGE_VERSION}"
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Initialization, setup"
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04:00
OMPI_TOP_BUILDDIR="`pwd`"
AC_SUBST(OMPI_TOP_BUILDDIR)
2003-11-22 19:36:58 +03:00
cd "$srcdir"
2004-06-07 19:33:53 +04:00
OMPI_TOP_SRCDIR="`pwd`"
AC_SUBST(OMPI_TOP_SRCDIR)
cd "$OMPI_TOP_BUILDDIR"
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04: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 19:36:58 +03:00
AC_MSG_NOTICE([Detected VPATH build])
fi
2006-02-12 04:33:29 +03:00
# Setup the top of the opal/include/opal_config.h file
2003-11-22 19:36:58 +03:00
AH_TOP([/* -*- c -*-
*
2004-11-22 04:38:40 +03: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 05:04:22 +03:00
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
2004-11-28 23:09:25 +03:00
* University of Stuttgart. All rights reserved.
2005-03-24 15:43:37 +03:00
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
2004-11-22 04:38:40 +03:00
* $COPYRIGHT$
2009-03-16 05:04:22 +03:00
*
2004-11-22 04:38:40 +03:00
* Additional copyrights may follow
2009-03-16 05:04:22 +03:00
*
2004-01-07 17:55:23 +03:00
* $HEADER$
2003-11-22 19:36:58 +03:00
*
2009-03-16 05:04:22 +03:00
* Function: - OS, CPU and compiler dependent configuration
2003-11-22 19:36:58 +03:00
*/
2006-02-12 04:33:29 +03:00
#ifndef OPAL_CONFIG_H
#define OPAL_CONFIG_H
2003-12-22 19:29:21 +03:00
])
AH_BOTTOM([
2006-02-12 04:33:29 +03:00
#include "opal_config_bottom.h"
#endif /* OPAL_CONFIG_H */
2003-11-22 19:36:58 +03:00
])
2004-08-02 04:24:22 +04:00
# Other basic setup stuff (shared with components)
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04:00
OMPI_BASIC_SETUP
2003-11-22 19:36:58 +03:00
2004-06-07 19:33:53 +04: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 19:36:58 +03:00
############################################################################
# Configuration options
############################################################################
2009-05-27 07:03:18 +04:00
OPAL_CONFIGURE_OPTIONS
2009-10-21 03:44:20 +04:00
m4_ifdef([project_orte], [ORTE_CONFIGURE_OPTIONS])
m4_ifdef([project_ompi], [OMPI_CONFIGURE_OPTIONS])
2003-11-22 19:36:58 +03:00
2008-03-25 15:01:36 +03: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 19:36:58 +03: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 19:33:53 +04:00
ompi_enable_shared="$enable_shared"
ompi_enable_static="$enable_static"
2004-07-01 20:25:44 +04:00
AM_ENABLE_SHARED
AM_DISABLE_STATIC
2003-11-22 19:36:58 +03:00
2005-10-28 03:23:08 +04:00
OMPI_SETUP_WRAPPER_INIT
2005-04-18 20:38:27 +04:00
2009-01-28 04:06:53 +03: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 05:04:22 +03:00
darwin[[4567]]*)
2009-01-28 04:06:53 +03: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 19:36:58 +03:00
############################################################################
# Check for compilers and preprocessors
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Compiler and preprocessor tests"
2003-11-22 19:36:58 +03:00
##################################
# C compiler characteristics
##################################
2004-06-07 19:33:53 +04:00
OMPI_SETUP_CC
2003-11-22 19:36:58 +03:00
2005-12-18 01:29:12 +03: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-27 02:20:33 +03:00
# Do all Interix detections if necessary
OMPI_INTERIX
2007-11-03 05:40:22 +03:00
# Does the compiler support "ident"-like constructs?
OMPI_CHECK_IDENT([CC], [CFLAGS], [c], [C])
2004-02-13 21:05:49 +03:00
#
# Check for some types
#
2004-01-09 04:17:00 +03: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)
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
AC_CHECK_TYPES(int128_t)
AC_CHECK_TYPES(uint128_t)
AC_CHECK_TYPES(long long)
AC_CHECK_TYPES(long double)
2009-10-21 03:44:20 +04:00
# We only need these types if we're building the OMPI project, but
# OPAL currently doesn't protect for their lack of presence well.
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
AC_CHECK_TYPES(float _Complex)
AC_CHECK_TYPES(double _Complex)
AC_CHECK_TYPES(long double _Complex)
2004-01-09 04:17:00 +03:00
AC_CHECK_TYPES(intptr_t)
AC_CHECK_TYPES(uintptr_t)
2004-10-14 00:47:52 +04:00
AC_CHECK_TYPES(mode_t)
2006-10-20 07:24:59 +04:00
AC_CHECK_TYPES(ssize_t)
AC_CHECK_TYPES(ptrdiff_t)
2005-05-12 05:42:24 +04:00
2004-02-13 21:05:49 +03:00
#
# Check for type sizes
#
2004-01-09 04:17:00 +03:00
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
2004-04-24 00:52:42 +04:00
if test $ac_cv_type_long_long = yes; then
AC_CHECK_SIZEOF(long long)
fi
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
2004-04-24 00:52:42 +04:00
if test $ac_cv_type_long_double = yes; then
AC_CHECK_SIZEOF(long double)
fi
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
2009-10-21 03:44:20 +04:00
# We only need these types if we're building the OMPI project, but
# OPAL currently doesn't protect for their lack of presence well.
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
if test "$ac_cv_type_float__Complex" = yes; then
AC_CHECK_SIZEOF(float _Complex)
fi
if test "$ac_cv_type_double__Complex" = yes; then
AC_CHECK_SIZEOF(double _Complex)
fi
if test "$ac_cv_type_long_double__Complex" = yes; then
AC_CHECK_SIZEOF(long double _Complex)
fi
2004-01-09 04:17:00 +03:00
AC_CHECK_SIZEOF(void *)
2005-04-05 06:32:36 +04:00
AC_CHECK_SIZEOF(size_t)
2006-10-20 07:24:59 +04: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
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
AC_CHECK_SIZEOF(wchar_t)
2004-02-13 21:05:49 +03:00
#
# Check for type alignments
#
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
OMPI_C_GET_ALIGNMENT(_Bool, OPAL_ALIGNMENT_BOOL)
OMPI_C_GET_ALIGNMENT(int8_t, OPAL_ALIGNMENT_INT8)
OMPI_C_GET_ALIGNMENT(int16_t, OPAL_ALIGNMENT_INT16)
OMPI_C_GET_ALIGNMENT(int32_t, OPAL_ALIGNMENT_INT32)
OMPI_C_GET_ALIGNMENT(int64_t, OPAL_ALIGNMENT_INT64)
if test "$ac_cv_type_int128_t" = yes ; then
OMPI_C_GET_ALIGNMENT(int128_t, OPAL_ALIGNMENT_INT128)
fi
2009-05-07 00:11:28 +04:00
OMPI_C_GET_ALIGNMENT(char, OPAL_ALIGNMENT_CHAR)
OMPI_C_GET_ALIGNMENT(short, OPAL_ALIGNMENT_SHORT)
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
OMPI_C_GET_ALIGNMENT(wchar_t, OPAL_ALIGNMENT_WCHAR)
2009-05-07 00:11:28 +04:00
OMPI_C_GET_ALIGNMENT(int, OPAL_ALIGNMENT_INT)
OMPI_C_GET_ALIGNMENT(long, OPAL_ALIGNMENT_LONG)
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
if test "$ac_cv_type_long_long" = yes; then
2009-05-07 00:11:28 +04:00
OMPI_C_GET_ALIGNMENT(long long, OPAL_ALIGNMENT_LONG_LONG)
2004-04-24 00:52:42 +04:00
fi
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
OMPI_C_GET_ALIGNMENT(float, OPAL_ALIGNMENT_FLOAT)
OMPI_C_GET_ALIGNMENT(double, OPAL_ALIGNMENT_DOUBLE)
if test "$ac_cv_type_long_double" = yes; then
2009-05-07 00:11:28 +04:00
OMPI_C_GET_ALIGNMENT(long double, OPAL_ALIGNMENT_LONG_DOUBLE)
2004-04-24 00:52:42 +04:00
fi
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
2009-10-21 03:44:20 +04:00
# We only need these types if we're building the OMPI project, but
# OPAL currently doesn't protect for their lack of presence well.
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 08:56:31 +04:00
if test "$ac_cv_type_float__Complex" = yes; then
OMPI_C_GET_ALIGNMENT(float _Complex, OPAL_ALIGNMENT_FLOAT_COMPLEX)
fi
if test "$ac_cv_type_double__Complex" = yes; then
OMPI_C_GET_ALIGNMENT(double _Complex, OPAL_ALIGNMENT_DOUBLE_COMPLEX)
fi
if test "$ac_cv_type_long_double__Complex" = yes; then
OMPI_C_GET_ALIGNMENT(long double _Complex, OPAL_ALIGNMENT_LONG_DOUBLE_COMPLEX)
fi
OMPI_C_GET_ALIGNMENT(void *, OPAL_ALIGNMENT_VOID_P)
2004-02-13 21:05:49 +03:00
2004-10-23 00:30:59 +04: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-07 00:11:28 +04: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-23 00:30:59 +04:00
[Whether the C compiler supports "bool" without any other help (such as <stdbool.h>)])
AC_MSG_RESULT([$MSG])
2009-08-04 15:54:01 +04:00
AC_CHECK_SIZEOF(_Bool)
2004-10-23 00:30:59 +04:00
2004-02-13 21:05:49 +03:00
#
# Check for other compiler characteristics
#
2004-01-07 10:49:23 +03:00
2004-06-15 21:10:47 +04: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 19:29:21 +03:00
AC_C_INLINE
2006-08-22 02:13:32 +04: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 07:22:22 +03:00
AC_C_RESTRICT
2006-08-22 02:13:32 +04:00
fi
2004-06-07 19:33:53 +04:00
OMPI_C_WEAK_SYMBOLS
2004-06-15 21:10:47 +04:00
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS_save"
fi
2003-11-22 19:36:58 +03:00
2005-05-10 13:09:04 +04:00
if test "x$CC" = "xicc"; then
2009-03-16 07:22:22 +03:00
OMPI_CHECK_ICC_VARARGS
2005-05-10 13:09:04 +04:00
fi
2004-01-08 16:36:14 +03: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-07 00:11:28 +04:00
OPAL_C_HAVE_WEAK_SYMBOLS=0
2004-01-08 16:36:14 +03:00
fi
if test "$WANT_MPI_PROFILING" = "1"; then
2009-05-07 00:11:28 +04:00
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
2009-03-16 07:22:22 +03:00
OMPI_PROFILING_COMPILE_SEPARATELY=0
2004-01-08 16:36:14 +03:00
else
2009-03-16 07:22:22 +03:00
OMPI_PROFILING_COMPILE_SEPARATELY=1
2004-01-08 16:36:14 +03:00
fi
else
2004-06-07 19:33:53 +04:00
OMPI_PROFILING_COMPILE_SEPARATELY=0
2004-01-08 16:36:14 +03:00
fi
2004-06-29 04:02:25 +04:00
2009-06-28 03:36:25 +04:00
# Check if we support the offsetof compiler directive
OPAL_CHECK_OFFSETOF
2009-10-21 05:13:21 +04:00
# Setup OMPI bindings (if we're building the OMPI project). Note that
# opal_wrapper.c has a hard-coded use of the OMPI_ENABLE_MPI_PROFILING
# macro, so we need to define it (to 0) even if we're not building the
# OMPI project.
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_PROFILING],
[AC_DEFINE([OMPI_ENABLE_MPI_PROFILING], [0],
[We are not building OMPI, so no profiling])])
2004-01-08 16:36:14 +03:00
2004-01-07 10:49:23 +03:00
2003-11-22 19:36:58 +03:00
##################################
# C++ compiler characteristics
##################################
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi], [OMPI_SETUP_CXX])
2007-02-08 16:34:44 +03:00
##################################
# Only after setting up both
# C and C++ check compiler attributes.
##################################
2009-08-04 15:54:01 +04:00
ompi_show_subtitle "Compiler characteristics"
2007-02-08 16:34:44 +03:00
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 08:39:43 +04:00
OPAL_CHECK_COMPILER_VERSION_ID
2004-01-07 10:49:23 +03:00
2009-10-21 03:44:20 +04:00
2005-01-27 04:39:55 +03:00
##################################
# Assembler Configuration
##################################
2009-03-16 05:04:22 +03:00
ompi_show_subtitle "Assembler"
2005-01-27 04:39:55 +03:00
AM_PROG_AS
OMPI_CONFIG_ASM
2003-11-22 19:36:58 +03:00
##################################
# Fortran
##################################
2009-10-21 03:44:20 +04:00
# OPAL uses opal_fortran_logical_t and OMPI_FORTRAN_HANDLE_MAX (long
# story; yes, it's an intentional abstraction break). So ensure to
# define it to a valid C type if we're not building the OMPI project.
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_FORTRAN],
[AC_DEFINE([ompi_fortran_logical_t], [int], [Bogus type for OPAL])
AC_DEFINE([OMPI_FORTRAN_HANDLE_MAX], [128], [Bogus type for OPAL])
])
2006-04-11 07:33:38 +04:00
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2009-10-21 03:44:20 +04:00
2003-11-22 19:36:58 +03:00
##################################
# Header files
##################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Header file tests"
2004-03-28 14:52:58 +04:00
2005-04-16 01:18:20 +04:00
AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
2006-03-11 05:35:40 +03:00
dlfcn.h execinfo.h err.h fcntl.h grp.h inttypes.h libgen.h \
2009-03-05 05:40:25 +03:00
libutil.h memory.h netdb.h netinet/in.h netinet/tcp.h \
2005-04-16 01:18:20 +04:00
poll.h pthread.h pty.h pwd.h sched.h stdint.h \
2009-03-05 05:40:25 +03:00
stdlib.h string.h strings.h stropts.h sys/fcntl.h sys/ipc.h \
2005-04-16 01:18:20 +04: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 05:51:18 +04:00
stdarg.h sys/stat.h sys/statvfs.h sys/time.h sys/tree.h \
2007-07-10 07:46:57 +04:00
sys/types.h sys/uio.h net/uio.h sys/utsname.h sys/wait.h syslog.h \
2007-04-25 05:55:40 +04:00
time.h termios.h ulimit.h unistd.h util.h utmp.h malloc.h \
2007-07-10 07:46:57 +04:00
ifaddrs.h sys/sysctl.h crt_externs.h regex.h \
2008-09-10 16:58:30 +04:00
ioLib.h sockLib.h hostLib.h shlwapi.h sys/synch.h])
2004-09-29 23:42:16 +04:00
2006-01-12 06:19:37 +03:00
# Needed to work around Darwin requiring sys/socket.h for
# net/if.h
AC_CHECK_HEADERS([net/if.h], [], [],
[#include <stdio.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
])
2004-08-05 15:12:25 +04:00
# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
# have both Portland and GNU installed; using pgcc will find GNU's
# <stdbool.h>, which all it does -- by standard -- is define "bool" to
# "_Bool" [see
# http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html],
# and Portland has no idea what to do with _Bool).
# So first figure out if we have <stdbool.h> (i.e., check the value of
# the macro HAVE_STDBOOL_H from the result of AC_CHECK_HEADERS,
# above). If we do have it, then check to see if it actually works.
2009-05-07 00:11:28 +04:00
# Define OPAL_USE_STDBOOL_H as approrpaite.
2004-09-29 23:42:16 +04:00
AC_CHECK_HEADERS([stdbool.h], [have_stdbool_h=1], [have_stdbool_h=0])
2004-08-05 15:12:25 +04:00
AC_MSG_CHECKING([if <stdbool.h> works])
if test "$have_stdbool_h" = "1"; then
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
AC_INCLUDES_DEFAULT
#if HAVE_STDBOOL_H
#include <stdbool.h>
2009-03-16 05:04:22 +03:00
#endif]],
2004-08-05 15:12:25 +04:00
[[bool bar, foo = true; bar = foo;]]),
2009-05-07 00:11:28 +04:00
[OPAL_USE_STDBOOL_H=1 MSG=yes],[OPAL_USE_STDBOOL_H=0 MSG=no])
2004-08-05 15:12:25 +04:00
else
2009-05-07 00:11:28 +04:00
OPAL_USE_STDBOOL_H=0
2004-08-05 15:12:25 +04:00
MSG="no (don't have <stdbool.h>)"
fi
2009-05-07 00:11:28 +04:00
AC_DEFINE_UNQUOTED(OPAL_USE_STDBOOL_H, $OPAL_USE_STDBOOL_H,
2004-08-05 15:12:25 +04:00
[Whether to use <stdbool.h> or not])
AC_MSG_RESULT([$MSG])
2003-11-22 19:36:58 +03:00
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
2005-07-13 08:16:03 +04:00
##################################
# Types
##################################
ompi_show_title "Type tests"
# Size of pid_t
AC_CHECK_SIZEOF(pid_t)
2009-03-16 05:04:22 +03:00
AC_CHECK_TYPES([socklen_t, struct sockaddr_in, struct sockaddr_in6,
2007-07-20 05:34:02 +04:00
struct sockaddr_storage],
[], [], [AC_INCLUDES_DEFAULT
#if HAVE_SYS_SOCKET_H
2007-05-21 01:54:43 +04:00
#include <sys/socket.h>
2007-07-20 05:34:02 +04:00
#endif
2007-05-17 05:17:59 +04:00
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])
2007-07-20 05:34:02 +04:00
2009-03-16 05:04:22 +03:00
AC_CHECK_DECLS([AF_UNSPEC, PF_UNSPEC, AF_INET6, PF_INET6],
2007-07-20 05:34:02 +04:00
[], [], [AC_INCLUDES_DEFAULT
#if HAVE_SYS_SOCKET_H
2007-05-27 07:52:56 +04:00
#include <sys/socket.h>
2007-07-20 05:34:02 +04:00
#endif
2007-05-17 05:17:59 +04:00
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif])
2006-09-08 04:10:40 +04:00
2005-07-13 08:16:03 +04:00
# SA_RESTART in signal.h
AC_MSG_CHECKING([if SA_RESTART defined in signal.h])
AC_EGREP_CPP(yes, [
#include <signal.h>
#ifdef SA_RESTART
yes
#endif ], [MSG=yes VALUE=1], [MSG=no VALUE=0])
2009-05-07 00:11:28 +04:00
AC_DEFINE_UNQUOTED(OPAL_HAVE_SA_RESTART, $VALUE,
2005-07-13 08:16:03 +04:00
[Whether we have SA_RESTART in <signal.h> or not])
AC_MSG_RESULT([$MSG])
2007-07-20 05:34:02 +04:00
AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [
#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif])
2005-07-13 08:16:03 +04:00
AC_CHECK_MEMBERS([struct dirent.d_type], [], [], [
#include <sys/types.h>
#include <dirent.h>])
AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
2005-12-15 03:51:28 +03:00
AC_CHECK_MEMBERS([siginfo_t.si_band],,,[#include <signal.h>])
2005-07-13 08:16:03 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
##################################
# Libraries
##################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Library and Function tests"
2004-03-28 14:02:38 +04:00
2008-08-14 00:56:06 +04:00
# Darwin doesn't need -lutil, as it's something other than this -lutil.
OMPI_CHECK_FUNC_LIB([openpty], [util])
2005-08-25 01:24:17 +04:00
2006-01-16 04:48:03 +03:00
AC_CHECK_LIB([nsl], [gethostbyname])
2005-08-25 01:24:17 +04:00
2006-01-16 04:48:03 +03:00
AC_CHECK_LIB([socket], [socket])
2009-08-12 17:07:04 +04:00
# Solaris has sched_yield in -lrt, usually in libc
2006-01-16 04:48:03 +03:00
OMPI_CHECK_FUNC_LIB([sched_yield], [rt])
# IRIX has dirname in -lgen, usually in libc
OMPI_CHECK_FUNC_LIB([dirname], [gen])
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
OMPI_CHECK_FUNC_LIB([ceil], [m])
2005-08-25 01:24:17 +04:00
2009-04-19 22:17:05 +04:00
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty getpwuid fork waitpid execve pipe ptsname setsid mmap tcgetpgrp posix_memalign strsignal sysconf syslog regcmp regexec regfree _NSGetEnviron socketpair strncpy_s _strdup usleep mkfifo])
2008-06-25 03:20:25 +04:00
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
# confused. On others, it's in the standard library, but stubbed with
# the magic glibc foo as not implemented. and on other systems, it's
# just not there. This covers all cases.
AC_CACHE_CHECK([for htonl define],
[ompi_cv_htonl_define],
[AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif],[
#ifndef ntohl
#error "ntohl not defined"
#endif
])], [ompi_cv_htonl_define=yes], [ompi_cv_htonl_define=no])])
AC_CHECK_FUNC([htonl], [ompi_have_htonl=yes], [ompi_have_htonl=no])
AS_IF([test "$ompi_cv_htonl_define" = "yes" -o "$ompi_have_htonl" = "yes"],
2009-03-16 05:04:22 +03:00
[AC_DEFINE_UNQUOTED([HAVE_UNIX_BYTESWAP], [1],
2008-06-25 03:20:25 +04:00
[whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are available])])
2004-08-11 02:41:17 +04:00
2004-01-14 09:39:55 +03:00
#
# Make sure we can copy va_lists (need check declared, not linkable)
#
2009-05-07 00:11:28 +04:00
AC_CHECK_DECL(va_copy, OPAL_HAVE_VA_COPY=1, OPAL_HAVE_VA_COPY=0,
2009-03-16 07:22:22 +03:00
[#include <stdarg.h>])
2009-05-07 00:11:28 +04:00
AC_DEFINE_UNQUOTED(OPAL_HAVE_VA_COPY, $OPAL_HAVE_VA_COPY,
2004-01-14 09:39:55 +03:00
[Whether we have va_copy or not])
2009-05-07 00:11:28 +04:00
AC_CHECK_DECL(__va_copy, OPAL_HAVE_UNDERSCORE_VA_COPY=1,
OPAL_HAVE_UNDERSCORE_VA_COPY=0, [#include <stdarg.h>])
AC_DEFINE_UNQUOTED(OPAL_HAVE_UNDERSCORE_VA_COPY, $OPAL_HAVE_UNDERSCORE_VA_COPY,
2004-01-14 09:39:55 +03:00
[Whether we have __va_copy or not])
2004-10-29 23:14:11 +04:00
AC_CHECK_DECLS(__func__)
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
##################################
# System-specific tests
##################################
2004-06-07 19:33:53 +04:00
ompi_show_title "System-specific tests"
2004-06-29 04:02:25 +04:00
2004-01-19 04:33:03 +03:00
#
# Test to determine type of MPI_Offset. This is searched in the following order
# int64_t, long long, long, int. If none of these are 8 bytes, then we should
# search for int32_t, long long, long, int.
#
MPI_OFFSET_TYPE="not found"
2004-12-08 01:40:37 +03:00
MPI_OFFSET_DATATYPE="not found"
2004-01-19 04:33:03 +03:00
AC_MSG_CHECKING([checking for type of MPI_Offset])
2009-03-16 05:00:27 +03:00
if test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_long_long = 8; then
2009-03-16 07:22:22 +03:00
MPI_OFFSET_TYPE="long long"
MPI_OFFSET_DATATYPE=MPI_LONG_LONG
MPI_OFFSET_SIZE=8
2009-03-16 05:00:27 +03:00
elif test $ac_cv_type_long = yes -a $ac_cv_sizeof_long = 8; then
2009-03-16 07:22:22 +03:00
MPI_OFFSET_TYPE="long"
MPI_OFFSET_DATATYPE=MPI_LONG
MPI_OFFSET_SIZE=8
2009-03-16 05:00:27 +03:00
elif test $ac_cv_sizeof_int = 8; then
2009-03-16 07:22:22 +03:00
MPI_OFFSET_TYPE="int"
MPI_OFFSET_DATATYPE=MPI_INT
MPI_OFFSET_SIZE=8
2009-03-16 05:00:27 +03:00
elif test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_long_long = 4; then
2009-03-16 07:22:22 +03:00
MPI_OFFSET_TYPE="long long"
MPI_OFFSET_DATATYPE=MPI_LONG_LONG
MPI_OFFSET_SIZE=4
2009-03-16 05:00:27 +03:00
elif test $ac_cv_type_long = yes -a $ac_cv_sizeof_long = 4; then
2009-03-16 07:22:22 +03:00
MPI_OFFSET_TYPE="long"
MPI_OFFSET_DATATYPE=MPI_LONG
MPI_OFFSET_SIZE=4
2009-03-16 05:00:27 +03:00
elif test $ac_cv_sizeof_int = 4; then
2009-03-16 07:22:22 +03:00
MPI_OFFSET_TYPE="int"
MPI_OFFSET_DATATYPE=MPI_INT
MPI_OFFSET_SIZE=4
2004-01-17 01:16:25 +03:00
fi
2004-01-19 04:33:03 +03:00
AC_MSG_RESULT([$MPI_OFFSET_TYPE])
2004-12-08 01:40:37 +03:00
if test "$MPI_OFFSET_TYPE" = "not found"; then
2009-03-16 07:22:22 +03:00
AC_MSG_WARN([*** Unable to find the right definition for MPI_Offset])
AC_MSG_ERROR([Cannot continue])
2004-01-17 01:16:25 +03:00
fi
2005-11-30 06:16:24 +03:00
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's])
2004-01-19 04:33:03 +03:00
2006-10-20 07:24:59 +04:00
#
# Check for MPI_Aint type. Yes, there are platforms where
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
#
if test $ac_cv_type_ptrdiff_t = yes ; then
2009-05-07 00:11:28 +04:00
opal_ptrdiff_t="ptrdiff_t"
2006-10-20 07:24:59 +04:00
elif test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long ; then
2009-05-07 00:11:28 +04:00
opal_ptrdiff_t="long"
2006-10-20 07:24:59 +04:00
elif test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long_long ; then
2009-05-07 00:11:28 +04:00
opal_ptrdiff_t="long long"
2006-10-20 07:24:59 +04:00
else
AC_MSG_ERROR([Could not find datatype to emulate ptrdiff_t. Cannot continue])
fi
2009-05-07 00:11:28 +04:00
AC_DEFINE_UNQUOTED([OPAL_PTRDIFF_TYPE], [$opal_ptrdiff_t],
2006-10-20 07:24:59 +04:00
[type to use for ptrdiff_t])
2004-12-08 01:40:37 +03:00
#
# If we haven't already, figure out an MPI datatype that corresponds
clean up the OMPI_BUILDING #define. Rather than being defined to 1 if
we are part of the source tree and not defined otherwise, we are going
with an always defined if ompi_config.h is included policy. If
ompi_config.h is included before mpi.h or before OMPI_BUILDING is set,
it will set OMPI_BUILDING to 1 and enable all the internal code that
is in ompi_config_bottom.h. Otherwise, it will only include the
system configuration data (enough for defining the C and C++ interfaces
to MPI, but not perturbing the user environment).
This should fix the problems with bool and the like that the Eclipse
folks were seeing. It also cleans up some build system hacks that
we had along the way.
Also, don't use int64_t as the default size of MPI_Offset, because it
requires us including stdint.h in mpi.h, which is something we really
shouldn't be doing.
And finally, fix a ROMIO Makefile that didn't set -DOMPI_BUILDING=1,
as ROMIO includes mpi.h, but not ompi_config.h
This commit was SVN r5430.
2005-04-19 07:51:20 +04:00
# to the back-end C type of MPI_Offset.
2004-12-08 01:40:37 +03:00
#
AC_MSG_CHECKING([checking for an MPI datatype for MPI_Offset])
AC_MSG_RESULT([$MPI_OFFSET_DATATYPE])
if test "$MPI_OFFSET_DATATYPE" = "not found"; then
2009-03-16 07:22:22 +03:00
AC_MSG_WARN([*** Unable to find an MPI datatype corresponding to MPI_Offset])
AC_MSG_ERROR([Cannot continue])
2004-12-08 01:40:37 +03:00
fi
AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [MPI datatype corresponding to MPI_Offset])
2004-01-17 01:16:25 +03:00
2007-02-06 15:03:56 +03:00
# Do we have _SC_NPROCESSORS_ONLN? (only going to pass if we also have
# <unistd.h> and sysconf(), which is ok) OS X 10.4 has <unistd.h> and
# sysconf(), but does not have _SC_NPROCESSORS_ONLN. Doh!
2008-11-08 01:13:43 +03:00
AC_CACHE_CHECK([for _SC_NPROCESSORS_ONLN],
[ompi_cv_have__SC_NPROCESSORS_ONLN],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
AC_INCLUDES_DEFAULT
#include <unistd.h>
],
[int i = _SC_NPROCESSORS_ONLN;])],
[ompi_cv_have__SC_NPROCESSORS_ONLN="yes"],
[ompi_cv_have__SC_NPROCESSORS_ONLN="no"])])
AS_IF([test "$ompi_cv_have__SC_NPROCESSORS_ONLN" = "yes"],
[result=1], [result=0])
AC_DEFINE_UNQUOTED([OPAL_HAVE__SC_NPROCESSORS_ONLN], [$result],
[Define to 1 ifyou have the declaration of _SC_NPROCESSORS_ONLN, and to 0 otherwise])
2007-02-06 15:03:56 +03:00
2003-11-22 19:36:58 +03:00
# all: endian
2004-10-14 16:55:34 +04:00
2006-03-04 16:59:14 +03:00
AC_C_BIGENDIAN
2004-10-14 16:55:34 +04:00
2005-06-27 03:11:37 +04:00
OMPI_CHECK_BROKEN_QSORT
2007-07-13 09:45:02 +04:00
AC_CACHE_CHECK([if word-sized integers must be word-size aligned],
[ompi_cv_c_word_size_align],
[AC_LANG_PUSH(C)
AC_RUN_IFELSE([AC_LANG_PROGRAM([dnl
#include <stdlib.h>], [[ long data[2] = {0, 0};
long *lp;
int *ip;
ip = (int*) data;
ip++;
lp = (long*) ip;
return lp[0]; ]])],
[ompi_cv_c_word_size_align=no],
[ompi_cv_c_word_size_align=yes],
[ompi_cv_c_word_size_align=yes])])
AS_IF([test $ompi_cv_c_word_size_align = yes], [results=1], [results=0])
2009-05-07 00:11:28 +04:00
AC_DEFINE_UNQUOTED([OPAL_ALIGN_WORD_SIZE_INTEGERS], [$results],
2007-07-13 09:45:02 +04:00
[set to 1 if word-size integers must be aligned to word-size padding to prevent bus errors])
2003-11-22 19:36:58 +03:00
# all: SYSV semaphores
# all: SYSV shared memory
# all: size of FD_SET
# all: sizeof struct stat members
# all: type of getsockopt optlen
# all: type of recvfrom optlen
2004-01-09 08:08:31 +03:00
2004-01-14 10:06:57 +03:00
#
# Check out what thread support we have
#
2004-06-07 19:33:53 +04:00
OMPI_CONFIG_THREADS
2004-03-17 06:04:44 +03:00
CFLAGS="$CFLAGS $THREAD_CFLAGS"
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi],
[CXXFLAGS="$CXXFLAGS $THREAD_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
CXXCPPFLAGS="$CXXCPPFLAGS $THREAD_CXXCPPFLAGS"])
2004-03-17 06:04:44 +03:00
LDFLAGS="$LDFLAGS $THREAD_LDFLAGS"
LIBS="$LIBS $THREAD_LIBS"
2006-01-16 04:48:03 +03:00
WRAPPER_EXTRA_CPPFLAGS="$WRAPPER_EXTRA_CPPFLAGS $THREAD_CPPFLAGS"
2004-03-17 06:04:44 +03:00
WRAPPER_EXTRA_CFLAGS="$WRAPPER_EXTRA_CFLAGS $THREAD_CFLAGS"
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi],
[WRAPPER_EXTRA_CXXFLAGS="$WRAPPER_EXTRA_CXXFLAGS $THREAD_CXXFLAGS"
WRAPPER_EXTRA_FFLAGS="$WRAPPER_EXTRA_FFLAGS $THREAD_FFLAGS"
WRAPPER_EXTRA_FCFLAGS="$WRAPPER_EXTRA_FCFLAGS $THREAD_FFLAGS"])
2004-03-17 06:04:44 +03:00
WRAPPER_EXTRA_LDFLAGS="$WRAPPER_EXTRA_LDFLAGS $THREAD_LDFLAGS"
2006-01-16 04:48:03 +03:00
# no need to update WRAPPER_EXTRA_LIBS - we'll get it from LT later
2004-01-14 10:06:57 +03:00
2004-02-13 06:58:56 +03:00
#
# What is the local equivalent of "ln -s"
#
AC_PROG_LN_S
2007-06-01 06:31:15 +04:00
AC_PROG_GREP
AC_PROG_EGREP
2004-08-05 18:01:45 +04:00
#
2004-08-16 03:55:10 +04:00
# We need as and lex
2004-08-05 18:01:45 +04:00
#
2004-08-16 03:55:10 +04:00
AM_PROG_AS
2004-08-05 18:01:45 +04:00
AM_PROG_LEX
2004-09-05 21:45:59 +04:00
# If we don't have GNU Flex and we don't have a generated .c file
2004-08-26 20:17:20 +04:00
# (distribution tarballs will have the .c file included, but SVN
2004-09-05 21:45:59 +04:00
# checkouts will not), then error. Must have GNU Flex -- other
# versions of Lex are not workable (all things being equal, since this
# is *only* required for developers, we decided that it really was not
# worth it to be portable between different versions of lex ;-).
2007-06-01 06:31:15 +04:00
if test -z "$LEX" -o -n "`echo $LEX | $GREP missing`" -o \
2004-09-05 21:45:59 +04:00
"`basename $LEX`" != "flex"; then
2005-07-04 06:38:44 +04:00
if test ! -f "$srcdir/opal/util/show_help_lex.c"; then
2004-09-05 21:45:59 +04:00
AC_MSG_WARN([*** Could not find GNU Flex on your system.])
AC_MSG_WARN([*** GNU Flex required for developer builds of Open MPI.])
AC_MSG_WARN([*** Other versions of Lex are not supported.])
AC_MSG_WARN([*** YOU DO NOT NEED FLEX FOR DISTRIBUTION TARBALLS!])
AC_MSG_WARN([*** If you absolutely cannot install GNU Flex on this system])
AC_MSG_WARN([*** consider using a distribution tarball, or generate the])
AC_MSG_WARN([*** following files on another system (using Flex) and])
AC_MSG_WARN([*** copy them here:])
for lfile in `find . -name \*.l -print`; do
cfile="`echo $lfile | cut -d. -f-2`"
AC_MSG_WARN([*** $cfile.c])
done
2004-08-26 20:17:20 +04:00
AC_MSG_ERROR([Cannot continue])
fi
fi
2007-02-03 03:25:42 +03:00
#
# Look for ps command and arguments for orte-clean
#
2009-10-21 03:44:20 +04:00
m4_ifdef([project_orte], [OMPI_PS_FLAVOR_CHECK])
2007-02-03 03:25:42 +03:00
2004-01-09 11:25:18 +03:00
#
2004-01-09 08:08:31 +03:00
# File system case sensitivity
2004-01-09 11:25:18 +03:00
#
2004-01-09 08:08:31 +03:00
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi], [OMPI_CASE_SENSITIVE_FS_SETUP])
2003-11-22 19:36:58 +03:00
# AIX: FIONBIO in sys/ioctl.h
# glibc: memcpy
2007-04-25 05:54:37 +04:00
#
# Do we have RLIMIT_NPROC in <sys/resources.h>? (e.g., Solaris does not)
#
AC_CHECK_DECLS([RLIMIT_NPROC], [], [], [
AC_INCLUDES_DEFAULT
#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
2009-03-16 05:04:22 +03:00
#endif])
2007-04-25 05:54:37 +04:00
2008-11-25 06:13:09 +03:00
#
# Do we have RLIMIT_MEMLOCK in <sys/resources.h>? (e.g., Solaris does not)
#
AC_CHECK_DECLS([RLIMIT_MEMLOCK], [], [], [
AC_INCLUDES_DEFAULT
#if HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
2009-03-16 05:04:22 +03:00
#endif])
2008-11-25 06:13:09 +03:00
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2003-11-22 19:36:58 +03:00
2004-01-12 00:35:37 +03:00
##################################
# MCA
##################################
2009-03-16 05:04:22 +03:00
ompi_show_title "Modular Component Architecture (MCA) setup"
2004-01-12 00:35:37 +03:00
AC_MSG_CHECKING([for subdir args])
2004-06-07 19:33:53 +04:00
OMPI_CONFIG_SUBDIR_ARGS([ompi_subdir_args])
AC_MSG_RESULT([$ompi_subdir_args])
2004-01-12 00:35:37 +03:00
2004-06-07 19:33:53 +04:00
OMPI_MCA
2004-01-12 00:35:37 +03:00
2005-07-09 22:52:53 +04:00
# checkpoint results
AC_CACHE_SAVE
2009-05-27 00:49:35 +04:00
##################################
# MPI Extended Interfaces
##################################
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_EXT])
2009-05-27 00:49:35 +04:00
# checkpoint results
AC_CACHE_SAVE
2008-03-07 01:15:10 +03:00
##################################
2009-03-16 05:00:27 +03:00
# Visibility
2008-03-07 01:15:10 +03:00
##################################
2009-03-16 05:00:27 +03:00
# Check the visibility declspec at the end to avoid problem with
# the previous tests that are not necessarily prepared for
2008-03-07 01:15:10 +03:00
# the visibility feature.
2009-05-27 00:49:35 +04:00
ompi_show_title "Symbol visibility feature"
2008-03-07 01:15:10 +03:00
OMPI_CHECK_VISIBILITY
2008-01-28 11:39:48 +03:00
##################################
# Contributed software
##################################
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi], [OMPI_SETUP_CONTRIB])
2008-01-28 11:39:48 +03:00
# checkpoint results
AC_CACHE_SAVE
2004-01-12 00:35:37 +03:00
2009-10-21 03:44:20 +04:00
2004-01-16 04:31:50 +03:00
############################################################################
2004-06-07 19:33:53 +04:00
# Final top-level OMPI configuration
2004-01-16 04:31:50 +03:00
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_title "Final top-level OMPI configuration"
2004-01-16 04:31:50 +03:00
2004-02-12 21:54:06 +03:00
############################################################################
# Libevent setup
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Libevent 3rd party event handler"
2004-02-12 21:54:06 +03:00
CFLAGS_save="$CFLAGS"
2004-06-07 19:33:53 +04:00
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY"
OMPI_SETUP_LIBEVENT
2004-02-12 21:54:06 +03:00
CFLAGS="$CFLAGS_save"
2003-11-22 19:36:58 +03:00
############################################################################
# Libtool: part two
2008-03-07 01:17:40 +03:00
# (after C compiler setup = no compiler/linker tests after this)
2003-11-22 19:36:58 +03:00
############################################################################
2004-06-07 19:33:53 +04:00
ompi_show_subtitle "Libtool configuration"
2003-11-22 19:36:58 +03:00
2008-11-25 18:59:48 +03:00
# Use the undocumented solaris_use_stlport4 libtool variable to turn off any
# Cstd/stlport4 linkage. This allows Open MPI to be C++ STL agnostic.
if test "x$ompi_cv_c_compiler_vendor" = "xsun"; then
solaris_use_stlport4="yes"
fi
2007-08-17 21:11:36 +04:00
dnl Not all versions of LT set the PACKAGE_VERSION
m4_ifdef([LT_PACKAGE_VERSION], [], [m4_define([LT_PACKAGE_VERSION], [1.5.22])])
2007-08-17 08:08:23 +04:00
m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), 2.0), -1, [
2007-05-15 08:23:48 +04:00
AC_LIBLTDL_CONVENIENCE(opal/libltdl)
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
2007-08-17 08:08:23 +04:00
], [
LT_CONFIG_LTDL_DIR([opal/libltdl], [subproject])
LTDL_CONVENIENCE
LT_INIT([dlopen win32-dll])
])
2007-08-17 21:11:36 +04:00
2009-03-16 05:04:22 +03:00
ompi_show_subtitle "GNU libltdl setup"
2003-11-22 19:36:58 +03:00
2004-01-15 02:50:58 +03:00
# AC_CONFIG_SUBDIRS appears to be broken for non-gcc compilers (i.e.,
2009-03-16 05:04:22 +03:00
# passing precious variables down to the sub-configure).
2004-01-15 02:50:58 +03:00
#
2009-05-16 04:51:13 +04:00
# Finally, make ltdl follow the same shared/static convention that was
# user for the main OMPI libraries. So manually examine
2004-01-15 02:50:58 +03:00
# $enable_shared and $enable_static and pass down the corresponding
# flags.
2009-05-07 00:11:28 +04:00
if test "$OPAL_ENABLE_DLOPEN_SUPPORT" = "1" ; then
2005-07-14 22:05:30 +04:00
ompi_subdir_args="$ompi_subdir_args --enable-ltdl-convenience --disable-ltdl-install"
if test "$enable_shared" = "yes"; then
ompi_subdir_args="$ompi_subdir_args --enable-shared"
else
ompi_subdir_args="$ompi_subdir_args --disable-shared"
fi
if test "$enable_static" = "yes"; then
ompi_subdir_args="$ompi_subdir_args --enable-static"
else
ompi_subdir_args="$ompi_subdir_args --disable-static"
fi
2004-01-15 02:50:58 +03:00
2005-07-14 22:05:30 +04:00
CFLAGS_save="$CFLAGS"
2009-07-24 08:12:29 +04:00
CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"
2007-05-15 08:23:48 +04:00
2005-07-14 22:05:30 +04:00
OMPI_CONFIG_SUBDIR(opal/libltdl, [$ompi_subdir_args], [HAPPY=1], [HAPPY=0])
if test "$HAPPY" = "1"; then
LIBLTDL_SUBDIR=libltdl
2007-08-17 08:08:23 +04:00
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="-I."
AC_EGREP_HEADER([lt_dladvise_init], [opal/libltdl/ltdl.h],
[OPAL_HAVE_LTDL_ADVISE=1],
[OPAL_HAVE_LTDL_ADVISE=0])
2007-08-29 07:28:29 +04:00
CPPFLAGS="$CPPFLAGS_save"
2007-08-17 08:08:23 +04:00
2005-07-14 22:05:30 +04:00
# Arrgh. This is gross. But I can't think of any other way to do
# it. :-(
2007-06-01 06:31:15 +04:00
flags=`$EGREP ^LIBADD_DL opal/libltdl/Makefile | cut -d= -f2-`
2005-07-14 22:05:30 +04:00
OMPI_CHECK_LINKER_FLAGS([opal/libltdl/libtool], [-export-dynamic $flags])
2007-05-15 08:23:48 +04:00
2005-07-14 22:05:30 +04:00
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $extra_ldflags"
LDFLAGS="-export-dynamic $LDFLAGS"
else
2009-03-16 05:00:27 +03:00
AC_MSG_WARN([Failed to build GNU libltdl. This usually means that something])
AC_MSG_WARN([is incorrectly setup with your environment. There may be useful information in])
AC_MSG_WARN([opal/libltdl/config.log. You can also disable GNU libltdl, which will disable])
AC_MSG_WARN([dynamic shared object loading, by configuring with --disable-dlopen.])
AC_MSG_ERROR([Cannot continue])
2005-07-14 22:05:30 +04:00
fi
CFLAGS="$CFLAGS_save"
2004-01-15 02:50:58 +03:00
else
2005-07-14 22:05:30 +04:00
AC_MSG_WARN([libltdl support disabled (by --disable-dlopen)])
2007-08-29 07:28:29 +04:00
LIBLTDL=
2004-01-15 02:50:58 +03:00
LIBLTDL_SUBDIR=
2007-08-17 08:08:23 +04:00
OPAL_HAVE_LTDL_ADVISE=0
2006-01-16 04:48:03 +03:00
# append instead of prepend, since LIBS are going to be system
# type things needed by everyone. Normally, libltdl will push
# these into LIBS, but since we've disabled libltdl, we need
# to do it here.
WRAPPER_EXTRA_LIBS="$WRAPPER_EXTRA_LIBS $LIBS"
2004-01-15 02:50:58 +03:00
fi
2005-07-14 22:05:30 +04:00
2007-05-15 08:23:48 +04:00
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
2004-01-15 02:50:58 +03:00
AC_SUBST(LIBLTDL_SUBDIR)
2007-05-15 08:23:48 +04:00
2009-05-07 00:11:28 +04:00
AC_DEFINE_UNQUOTED(OPAL_WANT_LIBLTDL, $OPAL_ENABLE_DLOPEN_SUPPORT,
2006-01-16 04:48:03 +03:00
[Whether to include support for libltdl or not])
2007-08-17 08:08:23 +04:00
AC_DEFINE_UNQUOTED(OPAL_HAVE_LTDL_ADVISE, $OPAL_HAVE_LTDL_ADVISE,
[Whether libltdl appears to have the lt_dladvise interface])
2006-01-16 04:48:03 +03:00
2003-11-22 19:36:58 +03:00
############################################################################
2005-10-28 03:23:08 +04:00
# final compiler config
2003-11-22 19:36:58 +03:00
############################################################################
2005-10-28 03:23:08 +04:00
ompi_show_subtitle "Compiler flags"
2003-11-22 19:36:58 +03:00
#
# This is needed for VPATH builds, so that it will -I the appropriate
2005-09-01 16:16:36 +04:00
# include directory. We delayed doing it until now just so that
2003-11-22 19:36:58 +03:00
# '-I$(top_srcdir)' doesn't show up in any of the configure output --
# purely aesthetic.
#
2006-02-12 04:33:29 +03:00
# Because opal_config.h, orte_config.h, and ompi_config.h are all
# created by AC_CONFIG_HEADERS, we don't need to -I the builddir for
# <project>/include. If we VPATH building, we do need to include the
# source directories, however.
2005-09-01 16:16:36 +04:00
#
2006-02-12 04:33:29 +03:00
if test "$OMPI_TOP_BUILDDIR" != "$OMPI_TOP_SRCDIR"; then
2009-10-21 03:44:20 +04:00
# Note the embedded m4 directives here -- we must embed them
# rather than have successive assignments to these shell
# variables, lest the $(foo) names try to get evaluated here.
# Yuck!
CPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include m4_ifdef([project_orte], [-I$(top_srcdir)/orte/include]) m4_ifdef([project_ompi], [-I$(top_srcdir)/ompi/include])'" $CPPFLAGS"
# C++ is only relevant if we're building OMPI
m4_ifdef([project_ompi], [CXXCPPFLAGS='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/opal/include -I$(top_srcdir)/orte/include -I$(top_srcdir)/ompi/include'" $CXXCPPFLAGS"])
2006-02-12 04:33:29 +03:00
else
2006-03-07 11:49:59 +03:00
CPPFLAGS='-I$(top_srcdir)'" $CPPFLAGS"
2009-10-21 03:44:20 +04:00
# C++ is only relevant if we're building OMPI
m4_ifdef([project_ompi], [CXXCPPFLAGS='-I$(top_srcdir)'" $CXXCPPFLAGS"])
2005-09-01 14:37:20 +04:00
fi
2009-10-21 03:44:20 +04:00
# OMPI wants some additional processing of the flags (e.g., get
# versions without optimization for debugger modules).
2005-09-01 14:37:20 +04:00
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi], [OMPI_SETUP_DEBUGGER_FLAGS])
2005-02-08 08:06:15 +03:00
2004-01-19 04:41:40 +03:00
#
# Delayed the substitution of CFLAGS and CXXFLAGS until now because
# they may have been modified throughout the course of this script.
#
2003-11-22 19:36:58 +03:00
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
2009-10-21 03:44:20 +04:00
m4_ifdef([project_ompi], [AC_SUBST(CXXFLAGS)
AC_SUBST(CXXCPPFLAGS)
AC_SUBST(FFLAGS)
AC_SUBST(FCFLAGS)
2003-11-22 19:36:58 +03:00
2009-10-21 03:44:20 +04:00
AC_SUBST(OMPI_LIBMPI_EXTRA_LIBS)
AC_SUBST(OMPI_LIBMPI_EXTRA_LDFLAGS)])
2007-08-17 07:52:53 +04:00
2007-03-01 16:39:20 +03:00
#
# Aggregate MCA parameters directory
#
AC_SUBST([AMCA_PARAM_SETS_DIR], ['$(pkgdatadir)/amca-param-sets'])
2005-10-28 03:23:08 +04:00
############################################################################
# final wrapper compiler config
############################################################################
ompi_show_subtitle "Wrapper compiler flags"
OMPI_SETUP_WRAPPER_FINAL
2003-11-22 19:36:58 +03:00
2008-02-26 04:45:32 +03:00
# Recreate some defines prefixed with OMPI_ so that there are no bare
# autoconf macro defines in mpi.h. Since AC sometimes changes whether
# things are defined as null tokens or an integer result, two projects
# with different versions of AC can cause problems.
if test $ac_cv_header_stdc = yes; then
2009-05-07 00:11:28 +04:00
AC_DEFINE(OPAL_STDC_HEADERS, 1,
2009-03-16 07:22:22 +03:00
[Do not use outside of mpi.h. Define to 1 if you have the ANSI C header files.])
2008-02-26 04:45:32 +03:00
fi
if test $ac_cv_header_sys_time_h = yes ; then
2009-05-07 00:11:28 +04:00
AC_DEFINE(OPAL_HAVE_SYS_TIME_H, 1,
2009-03-16 07:22:22 +03:00
[Do not use outside of mpi.h. Define to 1 if you have the <sys/time.h> header file.])
2008-02-26 04:45:32 +03:00
fi
if test $ac_cv_type_long_long = yes ; then
2009-05-07 00:11:28 +04:00
AC_DEFINE(OPAL_HAVE_LONG_LONG, 1,
2009-03-16 07:22:22 +03:00
[Do not use outside of mpi.h. Define to 1 if the system has the type `long long'.]) dnl `
2008-02-26 04:45:32 +03:00
fi
2008-09-10 16:58:30 +04:00
if test $ac_cv_header_sys_synch_h = yes ; then
2009-05-07 00:11:28 +04:00
AC_DEFINE(OPAL_HAVE_SYS_SYNCH_H, 1,
2009-03-16 07:22:22 +03:00
[Do not use outside of mpi.h. Define to 1 if you have the <sys/synch.h> header file.])
2008-09-10 16:58:30 +04:00
fi
2003-11-22 19:36:58 +03:00
############################################################################
# Party on
############################################################################
2009-03-16 05:04:22 +03:00
ompi_show_subtitle "Final output"
2003-11-22 19:36:58 +03:00
AC_CONFIG_FILES([
Makefile
config/Makefile
2005-08-22 01:04:52 +04:00
contrib/Makefile
2004-08-30 14:44:30 +04:00
2005-03-22 07:25:01 +03:00
test/Makefile
2006-06-27 02:28:59 +04:00
test/event/Makefile
2005-03-22 07:25:01 +03:00
test/asm/Makefile
test/class/Makefile
test/support/Makefile
test/threads/Makefile
2003-11-22 19:36:58 +03:00
])
2009-10-21 03:44:20 +04:00
m4_include([opal/config/config_files.m4])
m4_ifdef([project_orte], [m4_include([orte/config/config_files.m4])])
m4_ifdef([project_ompi], [m4_include([ompi/config/config_files.m4])])
2003-11-22 19:36:58 +03:00
AC_OUTPUT