diff --git a/ELPA_2013.11/Makefile.am b/ELPA_2013.11/Makefile.am index 36cc1aa67ded587a312dfd26cdd5ba42e6dde844..607271f0280bafb54ef715d6f1e355f45384724c 100644 --- a/ELPA_2013.11/Makefile.am +++ b/ELPA_2013.11/Makefile.am @@ -135,9 +135,9 @@ endif endif if WITH_OPENMP -libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) -else libelpa_mt_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) +else +libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) endif # install any .mod files in the include/ dir diff --git a/ELPA_2013.11/Makefile.in b/ELPA_2013.11/Makefile.in index b15d1ae298b93dbeb151a74a5c2d716029ad0a93..9faca1271f589f8b229a8b39751287f187ee595b 100644 --- a/ELPA_2013.11/Makefile.in +++ b/ELPA_2013.11/Makefile.in @@ -679,7 +679,6 @@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENMP_FCFLAGS = @OPENMP_FCFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -777,8 +776,8 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 @WITH_OPENMP_FALSE@ $(am__append_14) $(am__append_16) \ @WITH_OPENMP_FALSE@ $(am__append_18) $(am__append_20) \ @WITH_OPENMP_FALSE@ $(am__append_22) $(am__append_24) -@WITH_OPENMP_TRUE@libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) -@WITH_OPENMP_FALSE@libelpa_mt_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) +@WITH_OPENMP_TRUE@libelpa_mt_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) +@WITH_OPENMP_FALSE@libelpa_la_LDFLAGS = -version-info $(ELPA_SO_VERSION) # install any .mod files in the include/ dir elpa_includedir = $(includedir)/elpa diff --git a/ELPA_2013.11/configure b/ELPA_2013.11/configure index d3ce7bb31f455a3159118fe159659a9c772e9c7f..00463be6d652f9ab18d9b26470e4c2b2199298f1 100755 --- a/ELPA_2013.11/configure +++ b/ELPA_2013.11/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for elpa 2013.11.004. +# Generated by GNU Autoconf 2.69 for elpa 2013.11.005. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='elpa' PACKAGE_TARNAME='elpa' -PACKAGE_VERSION='2013.11.004' -PACKAGE_STRING='elpa 2013.11.004' +PACKAGE_VERSION='2013.11.005' +PACKAGE_STRING='elpa 2013.11.005' PACKAGE_BUGREPORT='elpa-library@rzg.mpg.de' PACKAGE_URL='' @@ -672,7 +672,6 @@ build_vendor build_cpu build LIBTOOL -OPENMP_FCFLAGS WITH_OPENMP_FALSE WITH_OPENMP_TRUE FC_MODOUT @@ -824,7 +823,6 @@ with_avx_real_block4 with_avx_real_block6 with_avx_optimization with_openmp -enable_openmp enable_shared enable_static with_pic @@ -1390,7 +1388,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures elpa 2013.11.004 to adapt to many kinds of systems. +\`configure' configures elpa 2013.11.005 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1460,7 +1458,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of elpa 2013.11.004:";; + short | recursive ) echo "Configuration of elpa 2013.11.005:";; esac cat <<\_ACEOF @@ -1474,7 +1472,6 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build - --disable-openmp do not use OpenMP --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1599,7 +1596,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -elpa configure 2013.11.004 +elpa configure 2013.11.005 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2082,7 +2079,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by elpa $as_me 2013.11.004, which was +It was created by elpa $as_me 2013.11.005, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2947,7 +2944,7 @@ fi # Define the identity of the package. PACKAGE='elpa' - VERSION='2013.11.004' + VERSION='2013.11.005' cat >>confdefs.h <<_ACEOF @@ -5914,7 +5911,7 @@ fi -ELPA_LIB_VERSION=2013.11.004 +ELPA_LIB_VERSION=2013.11.005 # this is the version of the API, should be changed in the major revision # if and only if the actual API changes @@ -6147,72 +6144,7 @@ fi $as_echo "#define WITH_OPENMP 1" >>confdefs.h - - OPENMP_FCFLAGS= - # Check whether --enable-openmp was given. -if test "${enable_openmp+set}" = set; then : - enableval=$enable_openmp; -fi - - if test "$enable_openmp" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC option to support OpenMP" >&5 -$as_echo_n "checking for $FC option to support OpenMP... " >&6; } -if ${ac_cv_prog_fc_openmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - - program main - implicit none -!$ integer tid - tid = 42 - call omp_set_num_threads(2) - end - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - ac_cv_prog_fc_openmp='none needed' -else - ac_cv_prog_fc_openmp='unsupported' - for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ - -Popenmp --openmp; do - ac_save_FCFLAGS=$FCFLAGS - FCFLAGS="$FCFLAGS $ac_option" - cat > conftest.$ac_ext <<_ACEOF - - program main - implicit none -!$ integer tid - tid = 42 - call omp_set_num_threads(2) - end - -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - ac_cv_prog_fc_openmp=$ac_option -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - FCFLAGS=$ac_save_FCFLAGS - if test "$ac_cv_prog_fc_openmp" != unsupported; then - break - fi - done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_openmp" >&5 -$as_echo "$ac_cv_prog_fc_openmp" >&6; } - case $ac_cv_prog_fc_openmp in #( - "none needed" | unsupported) - ;; #( - *) - OPENMP_FCFLAGS=$ac_cv_prog_fc_openmp ;; - esac - fi - - + AX_ELPA_OPENMP fi FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS $OPENMP_FFFLAGS" @@ -20794,7 +20726,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by elpa $as_me 2013.11.004, which was +This file was extended by elpa $as_me 2013.11.005, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20860,7 +20792,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -elpa config.status 2013.11.004 +elpa config.status 2013.11.005 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/ELPA_2013.11/configure.ac b/ELPA_2013.11/configure.ac index f21e33a7aba3742bf1cf38c6504d6e49d8f76511..9362c48d9e055bf44b53e9c7a72132ff96978cba 100644 --- a/ELPA_2013.11/configure.ac +++ b/ELPA_2013.11/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([elpa],[2013.11.004], elpa-library@rzg.mpg.de) +AC_INIT([elpa],[2013.11.005], elpa-library@rzg.mpg.de) AC_CONFIG_SRCDIR([src/elpa1.F90]) AM_INIT_AUTOMAKE([foreign -Wall subdir-objects]) @@ -196,7 +196,7 @@ AX_PROG_FC_MPI([],[have_mpi=yes],[have_mpi=no fi]) -AC_SUBST([ELPA_LIB_VERSION], [2013.11.004]) +AC_SUBST([ELPA_LIB_VERSION], [2013.11.005]) # this is the version of the API, should be changed in the major revision # if and only if the actual API changes AC_SUBST([ELPA_SO_VERSION], [0:0:0]) @@ -223,7 +223,7 @@ AC_ARG_WITH([openmp], AM_CONDITIONAL([WITH_OPENMP],[test x"$with_openmp" = x"yes"]) if test "x${with_openmp}" = xyes; then AC_DEFINE([WITH_OPENMP], [1], [use OpenMP threading]) - AC_OPENMP + AX_ELPA_OPENMP fi FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS $OPENMP_FFFLAGS" diff --git a/ELPA_2013.11/m4/ax_elpa_openmp.m4 b/ELPA_2013.11/m4/ax_elpa_openmp.m4 new file mode 100644 index 0000000000000000000000000000000000000000..6d0656d3cd9c69962e5cb3d92f3e4b9da566f761 --- /dev/null +++ b/ELPA_2013.11/m4/ax_elpa_openmp.m4 @@ -0,0 +1,92 @@ +# openmp.m4 serial 4 +dnl Copyright (C) 2006-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This file can be removed once we assume autoconf >= 2.62. + +# _AX_ELPA_LANG_OPENMP +# --------------- +# Expands to some language dependent source code for testing the presence of +# OpenMP. +AC_DEFUN([_AX_ELPA_LANG_OPENMP], +[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) + +# _AC_LANG_OPENMP(C) +# ------------------ +m4_define([_AX_ELPA_LANG_OPENMP(C)], +[ +#ifndef _OPENMP + choke me +#endif +#include +int main () { return omp_get_num_threads (); } +]) + +# _AX_ELPA_LANG_OPENMP(C++) +# -------------------- +m4_copy([_AX_ELPA_LANG_OPENMP(C)], [_AX_ELPA_LANG_OPENMP(C++)]) + +# _AX_ELPA_LANG_OPENMP(Fortran 77) +# --------------------------- +m4_define([_AX_ELPA_LANG_OPENMP(Fortran 77)], +[AC_LANG_FUNC_LINK_TRY([omp_get_num_threads])]) + +# _AX_ELPA_LANG_OPENMP(Fortran) +# --------------------------- +m4_copy([_AX_ELPA_LANG_OPENMP(Fortran 77)], [_AX_ELPA_LANG_OPENMP(Fortran)]) + +# AC_ELPPA_OPENMP +# --------- +# Check which options need to be passed to the C compiler to support OpenMP. +# Set the OPENMP_CFLAGS / OPENMP_CXXFLAGS / OPENMP_FFLAGS variable to these +# options. +# The options are necessary at compile time (so the #pragmas are understood) +# and at link time (so the appropriate library is linked with). +# This macro takes care to not produce redundant options if $CC $CFLAGS already +# supports OpenMP. It also is careful to not pass options to compilers that +# misinterpret them; for example, most compilers accept "-openmp" and create +# an output file called 'penmp' rather than activating OpenMP support. +AC_DEFUN([AX_ELPA_OPENMP], +[ + OPENMP_[]_AC_LANG_PREFIX[]FLAGS= + AC_ARG_ENABLE([openmp], + [AS_HELP_STRING([--disable-openmp], [do not use OpenMP])]) + if test "$enable_openmp" != no; then + AC_CACHE_CHECK([for $CC option to support OpenMP], + [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp], + [AC_LINK_IFELSE([_AX_ELPA_LANG_OPENMP], + [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='none needed'], + [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='unsupported' + dnl Try these flags: + dnl GCC >= 4.2 -fopenmp + dnl SunPRO C -xopenmp + dnl Intel C -openmp + dnl SGI C, PGI C -mp + dnl Tru64 Compaq C -omp + dnl IBM C (AIX, Linux) -qsmp=omp + dnl If in this loop a compiler is passed an option that it doesn't + dnl understand or that it misinterprets, the AC_LINK_IFELSE test + dnl will fail (since we know that it failed without the option), + dnl therefore the loop will continue searching for an option, and + dnl no output file called 'penmp' or 'mp' is created. + for ac_option in -openmp -fopenmp -xopenmp -mp -omp -qsmp=omp; do + ac_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $ac_option" + AC_LINK_IFELSE([_AX_ELPA_LANG_OPENMP], + [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp=$ac_option]) + _AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS + if test "$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp" != unsupported; then + break + fi + done])]) + case $ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp in #( + "none needed" | unsupported) + ;; #( + *) + OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp ;; + esac + fi + AC_SUBST([OPENMP_]_AC_LANG_PREFIX[FLAGS]) +])