1
1
openmpi/config/opal_check_compiler_version.m4

124 строки
3.4 KiB
Plaintext
Исходник Обычный вид История

- 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
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
# OPAL_CHECK_COMPILER_VERSION_ID()
# ----------------------------------------------------
# Try to figure out the compiler's name and version to detect cases,
# where users compile Open MPI with one version and compile the application
# with a different compiler.
#
AC_DEFUN([OPAL_CHECK_COMPILER_VERSION_ID],
[
OPAL_CHECK_COMPILER(FAMILYID)
OPAL_CHECK_COMPILER_STRINGIFY(FAMILYNAME)
OPAL_CHECK_COMPILER(VERSION)
OPAL_CHECK_COMPILER_STRING(VERSION_STR)
- 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
])dnl
AC_DEFUN([OPAL_CHECK_COMPILER], [
- 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
lower=m4_tolower($1)
AC_CACHE_CHECK([for compiler $lower], opal_cv_compiler_[$1],
[
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${OPAL_TOP_SRCDIR}/opal/include/opal $CPPFLAGS"
AC_TRY_RUN([
- 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
#include <stdio.h>
#include <stdlib.h>
#include "opal_portable_platform.h"
- 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
int main (int argc, char * argv[])
{
FILE * f;
f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf (f, "%d", PLATFORM_COMPILER_$1);
return 0;
}
], [
eval opal_cv_compiler_$1=`cat conftestval`;
], [
eval opal_cv_compiler_$1=0
], [
eval opal_cv_compiler_$1=0
])
CPPFLAGS=$CPPFLAGS_orig
- 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
])
AC_DEFINE_UNQUOTED([OPAL_BUILD_PLATFORM_COMPILER_$1], $opal_cv_compiler_[$1],
[The compiler $lower which OMPI was built with])
])dnl
AC_DEFUN([OPAL_CHECK_COMPILER_STRING], [
lower=m4_tolower($1)
AC_CACHE_CHECK([for compiler $lower], opal_cv_compiler_[$1],
[
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${OPAL_TOP_SRCDIR}/opal/include/opal $CPPFLAGS"
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include "opal_portable_platform.h"
int main (int argc, char * argv[])
{
FILE * f;
f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf (f, "%s", PLATFORM_COMPILER_$1);
return 0;
}
], [
eval opal_cv_compiler_$1=`cat conftestval`;
], [
eval opal_cv_compiler_$1=UNKNOWN
], [
eval opal_cv_compiler_$1=UNKNOWN
])
CPPFLAGS=$CPPFLAGS_orig
])
AC_DEFINE_UNQUOTED([OPAL_BUILD_PLATFORM_COMPILER_$1], $opal_cv_compiler_[$1],
[The compiler $lower which OMPI was built with])
- 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
])dnl
AC_DEFUN([OPAL_CHECK_COMPILER_STRINGIFY], [
- 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
lower=m4_tolower($1)
AC_CACHE_CHECK([for compiler $lower], opal_cv_compiler_[$1],
[
CPPFLAGS_orig=$CPPFLAGS
CPPFLAGS="-I${OPAL_TOP_SRCDIR}/opal/include/opal $CPPFLAGS"
AC_TRY_RUN([
- 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
#include <stdio.h>
#include <stdlib.h>
#include "opal_portable_platform.h"
- 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
int main (int argc, char * argv[])
{
FILE * f;
f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf (f, "%s", _STRINGIFY(PLATFORM_COMPILER_$1));
return 0;
}
], [
eval opal_cv_compiler_$1=`cat conftestval`;
], [
eval opal_cv_compiler_$1=UNKNOWN
], [
eval opal_cv_compiler_$1=UNKNOWN
])
CPPFLAGS=$CPPFLAGS_orig
- 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
])
AC_DEFINE_UNQUOTED([OPAL_BUILD_PLATFORM_COMPILER_$1], $opal_cv_compiler_[$1],
[The compiler $lower which OMPI was built with])
])dnl