Commit 304b539c authored by Andreas Marek's avatar Andreas Marek

ELPA_development_version_qr: updated build procedure

Identical to ELPA 2013.11.001 the build procedure is updated

  - updated INSTALL documentation
  - improved description of kernels src/elpa2_kernels/README_elpa2_kernels.txt
  - improved OpenMP builds:
      * usage of OpenMP can now be specified with
        "--enable-openmp" or "--with-openmp"
  - improved checks for AVX build (identical to ELPA 2013.08.003):
     * if AVX kernels are specified AVX compilation is tested
     * the option "--with-avx-optimization" automatically updates
       CFLAGS and CXXFLAGS with optimization flags
parent 04566b03
......@@ -4,13 +4,10 @@ How to install ELPA:
ELPA is shipped with a typical "configure" and "make" procedure. It is
recommended to use this way to install ELPA, see (A). If you do not want to
install ELPA as library, but to include it in your source code, please refer
to point (B)
you can find a
"Makefile.example" in ./test, to see how this is done. Please distibute then
all files of ELPA with your code.
to point (B). An example makefile "Makefile.example" can be found in ./test,
to give some hints how this is done. Please distibute then all files of ELPA
with your code. Please note, that usage of ELPA as described in Section (B)
requires advanced knowledge about compilers, preprocessor flags, and optimizations.
(A): Installing ELPA as library with configure
......@@ -43,18 +40,20 @@ The configure installation is best done in four steps
You can either specify your own builds of lapack/blacs/scalapack
or use specialized Vendor packages, e.g. if available you can use
Intel's MKL. If you do not set these variables ELPA will not be
build!
Intel's MKL. If you do not set the variables "BLACS_LDFLAGS" and
"BLACS_FCFLAGS" ELPA will not be build!
Please set the optimisation that you would like with the
variable "FCFLAGS", "CFLAGS", and "CXXFLAGS", e.g. FCFLAGS="-O3 -xAVX".
For some elpa2-kernels, it is MANDATORY to set a few options,
variable "FCFLAGS", "CFLAGS", and "CXXFLAGS", e.g. FCFLAGS="-O3 -xAVX",
please see "./src/elpa2_kernels/README_elpa2_kernels.txt".
Set the "prefix" - flag, if you wish another installation location than
the default "/usr/local/".
If you want to use the hybrid MPI/OpenMP version of ELPA please specify
"--enable-openmp" or "--with-openmp"
Note, that at the moment we do not officially support "cross compilation"
allthough it should work.
......
......@@ -690,6 +690,7 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPP_FOUND = @CPP_FOUND@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
......
......@@ -677,6 +677,14 @@ WITH_QR_TRUE
OPENMP_FCFLAGS
WITH_OPENMP_FALSE
WITH_OPENMP_TRUE
FC_MODOUT
ac_empty
FC_MODINC
ELPA_SO_VERSION
ELPA_LIB_VERSION
FCFLAGS
ac_ct_FC
FC
WITH_AVX_REAL_BLOCK6_FALSE
WITH_AVX_REAL_BLOCK6_TRUE
WITH_AVX_REAL_BLOCK4_FALSE
......@@ -701,14 +709,6 @@ WITH_GENERIC_SIMPLE_FALSE
WITH_GENERIC_SIMPLE_TRUE
WITH_GENERIC_FALSE
WITH_GENERIC_TRUE
FC_MODOUT
ac_empty
FC_MODINC
ELPA_SO_VERSION
ELPA_LIB_VERSION
FCFLAGS
ac_ct_FC
FC
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
......@@ -739,6 +739,7 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
CPP_FOUND
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
......@@ -821,6 +822,7 @@ with_avx_complex_block2
with_avx_real_block2
with_avx_real_block4
with_avx_real_block6
with_avx_optimization
with_openmp
enable_openmp
with_qr
......@@ -1507,6 +1509,7 @@ Optional Packages:
(written in gcc assembler), default no.
--with-avx-real-block6 use AVX optimized real kernel with blocking 6
(written in gcc assembler), default no.
--with-avx-optimization use AVX optimization, default no.
--with-openmp use OpenMP threading, default no.
--with-qr use QR decomposition, default no.
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
......@@ -3002,6 +3005,53 @@ ac_config_headers="$ac_config_headers config.h"
#AM_SILENT_RULES([yes])
AX_CHECK_GNU_MAKE()
if test x$_cv_gnu_make_command = x ; then
as_fn_error $? "Need GNU Make" "$LINENO" 5
fi
# Extract the first word of "cpp", so it can be a program name with args.
set dummy cpp; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CPP_FOUND+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CPP_FOUND"; then
ac_cv_prog_CPP_FOUND="$CPP_FOUND" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CPP_FOUND="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_prog_CPP_FOUND" && ac_cv_prog_CPP_FOUND="no"
fi
fi
CPP_FOUND=$ac_cv_prog_CPP_FOUND
if test -n "$CPP_FOUND"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOUND" >&5
$as_echo "$CPP_FOUND" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x${CPP_FOUND}" = xno; then
as_fn_error $? "no cpp found" "$LINENO" 5
fi
DEPDIR="${am__leading_dot}deps"
......@@ -4790,723 +4840,315 @@ fi
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_fc_mpi.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_FC_MPI([MPI-WANTED-TEST[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
#
# DESCRIPTION
#
# This macro tries to find out how to compile Fortran77 programs that use
# MPI (Message Passing Interface), a standard API for parallel process
# communication (see http://www-unix.mcs.anl.gov/mpi/). The macro has to
# be used instead of the standard macro AC_PROG_FC and will replace the
# standard variable FC with the found compiler.
#
# MPI-WANTED-TEST is used to test whether MPI is actually wanted by the
# user. If MPI-WANTED_TEST is omitted or if it succeeds, the macro will
# try to find out how to use MPI, if it fails, the macro will call
# AC_PROG_CC to find a standard C compiler instead.
#
# When MPI is found, ACTION-IF-FOUND will be executed, if MPI is not found
# (or MPI-WANTED-TEST fails) ACTION-IF-NOT-FOUND is executed. If
# ACTION-IF-FOUND is not set, the macro will define HAVE_MPI.
#
# The following example demonstrates usage of the macro:
#
# # If --with-mpi=auto is used, try to find MPI, but use standard FC compiler if it is not found.
# # If --with-mpi=yes is used, try to find MPI and fail if it isn't found.
# # If --with-mpi=no is used, use a standard FC compiler instead.
# AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],
# [compile with MPI (parallelization) support. If none is found,
# MPI is not used. Default: auto])
# ],,[with_mpi=auto])
#
# AX_PROG_FC_MPI([test x"$with_mpi" != xno],[use_mpi=yes],[
# use_mpi=no
# if test x"$with_mpi" = xyes; then
# AC_MSG_FAILURE([MPI compiler requested, but couldn't use MPI.])
# else
# AC_MSG_WARN([No MPI compiler found, won't use MPI.])
# fi
# ])
#
# LICENSE
#
# Copyright (c) 2010,2011 Olaf Lenz <olenz@icp.uni-stuttgart.de>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the generic kernel is specified" >&5
$as_echo_n "checking whether the generic kernel is specified... " >&6; }
# Check whether --with-generic was given.
if test "${with_generic+set}" = set; then :
withval=$with_generic; with_option=yes
else
with_option=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_option}" >&5
$as_echo "${with_option}" >&6; }
if test x"$with_option" = x"yes"; then
WITH_GENERIC_TRUE=
WITH_GENERIC_FALSE='#'
else
WITH_GENERIC_TRUE='#'
WITH_GENERIC_FALSE=
fi
if test "x${with_option}" = xyes; then
$as_echo "#define WITH_GENERIC 1" >>confdefs.h
_ax_prog_fc_mpi_mpi_wanted=yes
if test x"$_ax_prog_fc_mpi_mpi_wanted" = xyes; then
if test -z "$FC" && test -n "$MPIFC"; then
FC="$MPIFC"
else
if test -n "$ac_tool_prefix"; then
for ac_prog in mpiifort mpif95 mpxlf95_r mpxlf95 ftn mpif90 mpxlf90_r mpxlf90 mpf90 cmpif90c sxmpif90 mpif77 hf77 mpxlf_r mpxlf mpifrt mpf77 cmpifc xlf95 pgf95 pathf95 ifort g95 f95 fort ifc efc openf95 sunf95 crayftn gfortran lf95 ftn xlf90 f90 pgf90 pghpf pathf90 epcf90 sxf90 openf90 sunf90 xlf f77 frt pgf77 pathf77 g77 cf77 fort77 fl32 af77
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_FC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$FC"; then
ac_cv_prog_FC="$FC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
# elif test "x${with_option}" = xno; then
# AC_DEFINE([WITH_GENERIC], [0], [use generic kernel for all architectures (with some hand-coded optimizations)])
fi
done
done
IFS=$as_save_IFS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the generic-simple kernel is specified" >&5
$as_echo_n "checking whether the generic-simple kernel is specified... " >&6; }
# Check whether --with-generic-simple was given.
if test "${with_generic_simple+set}" = set; then :
withval=$with_generic_simple; with_option=yes
else
with_option=no
fi
fi
FC=$ac_cv_prog_FC
if test -n "$FC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
$as_echo "$FC" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_option}" >&5
$as_echo "${with_option}" >&6; }
if test x"$with_option" = x"yes"; then
WITH_GENERIC_SIMPLE_TRUE=
WITH_GENERIC_SIMPLE_FALSE='#'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
WITH_GENERIC_SIMPLE_TRUE='#'
WITH_GENERIC_SIMPLE_FALSE=
fi
if test "x${with_option}" = xyes; then
test -n "$FC" && break
done
fi
if test -z "$FC"; then
ac_ct_FC=$FC
for ac_prog in mpiifort mpif95 mpxlf95_r mpxlf95 ftn mpif90 mpxlf90_r mpxlf90 mpf90 cmpif90c sxmpif90 mpif77 hf77 mpxlf_r mpxlf mpifrt mpf77 cmpifc xlf95 pgf95 pathf95 ifort g95 f95 fort ifc efc openf95 sunf95 crayftn gfortran lf95 ftn xlf90 f90 pgf90 pghpf pathf90 epcf90 sxf90 openf90 sunf90 xlf f77 frt pgf77 pathf77 g77 cf77 fort77 fl32 af77
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_FC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_FC"; then
ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_FC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
$as_echo "#define WITH_GENERIC_SIMPLE 1" >>confdefs.h
# elif test "x${with_option}" = xno; then
# AC_DEFINE([WITH_GENERIC_SIMPLE], [0], [use generic simple kernel for all architectures (without any hand-coded optimizations)])
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_FC=$ac_cv_prog_ac_ct_FC
if test -n "$ac_ct_FC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
$as_echo "$ac_ct_FC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ac_ct_FC" && break
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bgp kernel is specified" >&5
$as_echo_n "checking whether the bgp kernel is specified... " >&6; }
if test "x$ac_ct_FC" = x; then
FC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
FC=$ac_ct_FC
fi
fi
fi
fi
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
if test -n "$ac_tool_prefix"; then
for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_FC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$FC"; then
ac_cv_prog_FC="$FC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
FC=$ac_cv_prog_FC
if test -n "$FC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
$as_echo "$FC" >&6; }
# Check whether --with-bgp was given.
if test "${with_bgp+set}" = set; then :
withval=$with_bgp; with_option=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$FC" && break
done
with_option=no
fi
if test -z "$FC"; then
ac_ct_FC=$FC
for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_FC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_FC"; then
ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_FC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_FC=$ac_cv_prog_ac_ct_FC
if test -n "$ac_ct_FC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
$as_echo "$ac_ct_FC" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_option}" >&5
$as_echo "${with_option}" >&6; }
if test x"$with_option" = x"yes"; then
WITH_BGP_TRUE=
WITH_BGP_FALSE='#'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
WITH_BGP_TRUE='#'
WITH_BGP_FALSE=
fi
if test "x${with_option}" = xyes; then
test -n "$ac_ct_FC" && break
done
$as_echo "#define WITH_BGP 1" >>confdefs.h
if test "x$ac_ct_FC" = x; then
FC=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
FC=$ac_ct_FC
# elif test "x${with_option}" = xno; then
# AC_DEFINE([WITH_BGP], [0], [use optimized kernel for IBM BG/P])
fi
fi
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
sed '10a\
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
fi
rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
rm -f a.out
# If we don't use `.F' as extension, the preprocessor is not run on the
# input file. (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
if ${ac_cv_fc_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.$ac_ext <<_ACEOF
program main
#ifndef __GNUC__
choke me
#endif
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bgq kernel is specified" >&5
$as_echo_n "checking whether the bgq kernel is specified... " >&6; }
end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
# Check whether --with-bgq was given.
if test "${with_bgq+set}" = set; then :
withval=$with_bgq; with_option=yes
else
ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_fc_compiler_gnu=$ac_compiler_gnu
with_option=no
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
ac_ext=$ac_save_ext
ac_test_FCFLAGS=${FCFLAGS+set}
ac_save_FCFLAGS=$FCFLAGS
FCFLAGS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
$as_echo_n "checking whether $FC accepts -g... " >&6; }
if ${ac_cv_prog_fc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
FCFLAGS=-g
cat > conftest.$ac_ext <<_ACEOF
program main
end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"; then :
ac_cv_prog_fc_g=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_option}" >&5
$as_echo "${with_option}" >&6; }
if test x"$with_option" = x"yes"; then
WITH_BGQ_TRUE=
WITH_BGQ_FALSE='#'
else
ac_cv_prog_fc_g=no
WITH_BGQ_TRUE='#'
WITH_BGQ_FALSE=
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
$as_echo "$ac_cv_prog_fc_g" >&6; }
if test "$ac_test_FCFLAGS" = set; then
FCFLAGS=$ac_save_FCFLAGS
elif test $ac_cv_prog_fc_g = yes; then
if test "x$ac_cv_fc_compiler_gnu" = xyes; then
FCFLAGS="-g -O2"
else
FCFLAGS="-g"
if test "x${with_option}" = xyes; then
$as_echo "#define WITH_BGQ 1" >>confdefs.h
# elif test "x${with_option}" = xno; then
# AC_DEFINE([WITH_BGQ], [0], [use optimized kernel for IBM BG/Q])
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the sse-assembler kernel is specified" >&5
$as_echo_n "checking whether the sse-assembler kernel is specified... " >&6; }
# Check whether --with-sse-assembler was given.
if test "${with_sse_assembler+set}" = set; then :
withval=$with_sse_assembler; with_option=yes
else
if test "x$ac_cv_fc_compiler_gnu" = xyes; then
FCFLAGS="-O2"
else
FCFLAGS=
fi
with_option=no
fi
if test $ac_compiler_gnu = yes; then
GFC=yes