From b5caffb85d87d7ce0b969943584ed0d96fd1e7a7 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sun, 9 Apr 2017 19:03:16 +0000 Subject: [PATCH] mld2p4-fixprec configure.ac configure examples/fileread/Makefile examples/pdegen/Makefile mlprec/impl/Makefile mlprec/impl/level/Makefile mlprec/impl/mld_c_dec_map_bld.f90 mlprec/impl/mld_c_hierarchy_bld.f90 mlprec/impl/mld_c_lev_aggrmap_bld.f90 mlprec/impl/mld_c_lev_aggrmat_asb.f90 mlprec/impl/mld_c_smoothers_bld.f90 mlprec/impl/mld_caggrmap_bld.f90 mlprec/impl/mld_caggrmat_asb.f90 mlprec/impl/mld_caggrmat_biz_asb.f90 mlprec/impl/mld_caggrmat_minnrg_asb.f90 mlprec/impl/mld_caggrmat_nosmth_asb.f90 mlprec/impl/mld_caggrmat_smth_asb.f90 mlprec/impl/mld_cmlprec_aply.f90 mlprec/impl/mld_cmlprec_bld.f90 mlprec/impl/mld_cprecaply.f90 mlprec/impl/mld_cprecbld.f90 mlprec/impl/mld_cprecinit.F90 mlprec/impl/mld_d_dec_map_bld.f90 mlprec/impl/mld_d_hierarchy_bld.f90 mlprec/impl/mld_d_lev_aggrmap_bld.f90 mlprec/impl/mld_d_lev_aggrmat_asb.f90 mlprec/impl/mld_d_smoothers_bld.f90 mlprec/impl/mld_daggrmap_bld.f90 mlprec/impl/mld_daggrmat_asb.f90 mlprec/impl/mld_daggrmat_biz_asb.f90 mlprec/impl/mld_daggrmat_minnrg_asb.f90 mlprec/impl/mld_daggrmat_nosmth_asb.f90 mlprec/impl/mld_daggrmat_smth_asb.f90 mlprec/impl/mld_dmlprec_aply.f90 mlprec/impl/mld_dmlprec_bld.f90 mlprec/impl/mld_dprecaply.f90 mlprec/impl/mld_dprecbld.f90 mlprec/impl/mld_dprecinit.F90 mlprec/impl/mld_s_dec_map_bld.f90 mlprec/impl/mld_s_hierarchy_bld.f90 mlprec/impl/mld_s_lev_aggrmap_bld.f90 mlprec/impl/mld_s_lev_aggrmat_asb.f90 mlprec/impl/mld_s_smoothers_bld.f90 mlprec/impl/mld_saggrmap_bld.f90 mlprec/impl/mld_saggrmat_asb.f90 mlprec/impl/mld_saggrmat_biz_asb.f90 mlprec/impl/mld_saggrmat_minnrg_asb.f90 mlprec/impl/mld_saggrmat_nosmth_asb.f90 mlprec/impl/mld_saggrmat_smth_asb.f90 mlprec/impl/mld_smlprec_aply.f90 mlprec/impl/mld_smlprec_bld.f90 mlprec/impl/mld_sprecaply.f90 mlprec/impl/mld_sprecbld.f90 mlprec/impl/mld_sprecinit.F90 mlprec/impl/mld_z_dec_map_bld.f90 mlprec/impl/mld_z_hierarchy_bld.f90 mlprec/impl/mld_z_lev_aggrmap_bld.f90 mlprec/impl/mld_z_lev_aggrmat_asb.f90 mlprec/impl/mld_z_smoothers_bld.f90 mlprec/impl/mld_zaggrmap_bld.f90 mlprec/impl/mld_zaggrmat_asb.f90 mlprec/impl/mld_zaggrmat_biz_asb.f90 mlprec/impl/mld_zaggrmat_minnrg_asb.f90 mlprec/impl/mld_zaggrmat_nosmth_asb.f90 mlprec/impl/mld_zaggrmat_smth_asb.f90 mlprec/impl/mld_zmlprec_aply.f90 mlprec/impl/mld_zmlprec_bld.f90 mlprec/impl/mld_zprecaply.f90 mlprec/impl/mld_zprecbld.f90 mlprec/impl/mld_zprecinit.F90 mlprec/impl/smoother/Makefile mlprec/impl/solver/Makefile mlprec/mld_c_inner_mod.f90 mlprec/mld_c_onelev_mod.f90 mlprec/mld_c_prec_mod.f90 mlprec/mld_c_prec_type.f90 mlprec/mld_d_inner_mod.f90 mlprec/mld_d_onelev_mod.f90 mlprec/mld_d_prec_mod.f90 mlprec/mld_d_prec_type.f90 mlprec/mld_s_inner_mod.f90 mlprec/mld_s_onelev_mod.f90 mlprec/mld_s_prec_mod.f90 mlprec/mld_s_prec_type.f90 mlprec/mld_z_inner_mod.f90 mlprec/mld_z_onelev_mod.f90 mlprec/mld_z_prec_mod.f90 mlprec/mld_z_prec_type.f90 tests/fileread/Makefile tests/newslv/Makefile tests/pdegen/Makefile tests/pdegen/mld_d_pde2d.f90 tests/pdegen/mld_d_pde3d.f90 tests/pdegen/runs/mld_pde3d.inp Fixes to align with psblas3-fixprec --- configure | 11270 +++++++--------------- configure.ac | 144 +- examples/fileread/Makefile | 19 +- examples/pdegen/Makefile | 11 +- mlprec/impl/Makefile | 2 +- mlprec/impl/level/Makefile | 2 +- mlprec/impl/mld_c_dec_map_bld.f90 | 1 + mlprec/impl/mld_c_hierarchy_bld.f90 | 120 +- mlprec/impl/mld_c_lev_aggrmap_bld.f90 | 2 + mlprec/impl/mld_c_lev_aggrmat_asb.f90 | 1 + mlprec/impl/mld_c_smoothers_bld.f90 | 14 +- mlprec/impl/mld_caggrmap_bld.f90 | 1 + mlprec/impl/mld_caggrmat_asb.f90 | 1 + mlprec/impl/mld_caggrmat_biz_asb.f90 | 1 + mlprec/impl/mld_caggrmat_minnrg_asb.f90 | 1 + mlprec/impl/mld_caggrmat_nosmth_asb.f90 | 1 + mlprec/impl/mld_caggrmat_smth_asb.f90 | 1 + mlprec/impl/mld_cmlprec_aply.f90 | 2 + mlprec/impl/mld_cmlprec_bld.f90 | 4 +- mlprec/impl/mld_cprecaply.f90 | 10 +- mlprec/impl/mld_cprecbld.f90 | 70 +- mlprec/impl/mld_cprecinit.F90 | 92 +- mlprec/impl/mld_d_dec_map_bld.f90 | 1 + mlprec/impl/mld_d_hierarchy_bld.f90 | 120 +- mlprec/impl/mld_d_lev_aggrmap_bld.f90 | 2 + mlprec/impl/mld_d_lev_aggrmat_asb.f90 | 1 + mlprec/impl/mld_d_smoothers_bld.f90 | 14 +- mlprec/impl/mld_daggrmap_bld.f90 | 1 + mlprec/impl/mld_daggrmat_asb.f90 | 1 + mlprec/impl/mld_daggrmat_biz_asb.f90 | 1 + mlprec/impl/mld_daggrmat_minnrg_asb.f90 | 1 + mlprec/impl/mld_daggrmat_nosmth_asb.f90 | 1 + mlprec/impl/mld_daggrmat_smth_asb.f90 | 1 + mlprec/impl/mld_dmlprec_aply.f90 | 2 + mlprec/impl/mld_dmlprec_bld.f90 | 4 +- mlprec/impl/mld_dprecaply.f90 | 10 +- mlprec/impl/mld_dprecbld.f90 | 72 +- mlprec/impl/mld_dprecinit.F90 | 94 +- mlprec/impl/mld_s_dec_map_bld.f90 | 1 + mlprec/impl/mld_s_hierarchy_bld.f90 | 120 +- mlprec/impl/mld_s_lev_aggrmap_bld.f90 | 2 + mlprec/impl/mld_s_lev_aggrmat_asb.f90 | 1 + mlprec/impl/mld_s_smoothers_bld.f90 | 14 +- mlprec/impl/mld_saggrmap_bld.f90 | 1 + mlprec/impl/mld_saggrmat_asb.f90 | 1 + mlprec/impl/mld_saggrmat_biz_asb.f90 | 1 + mlprec/impl/mld_saggrmat_minnrg_asb.f90 | 1 + mlprec/impl/mld_saggrmat_nosmth_asb.f90 | 1 + mlprec/impl/mld_saggrmat_smth_asb.f90 | 1 + mlprec/impl/mld_smlprec_aply.f90 | 2 + mlprec/impl/mld_smlprec_bld.f90 | 4 +- mlprec/impl/mld_sprecaply.f90 | 10 +- mlprec/impl/mld_sprecbld.f90 | 70 +- mlprec/impl/mld_sprecinit.F90 | 92 +- mlprec/impl/mld_z_dec_map_bld.f90 | 1 + mlprec/impl/mld_z_hierarchy_bld.f90 | 120 +- mlprec/impl/mld_z_lev_aggrmap_bld.f90 | 2 + mlprec/impl/mld_z_lev_aggrmat_asb.f90 | 1 + mlprec/impl/mld_z_smoothers_bld.f90 | 14 +- mlprec/impl/mld_zaggrmap_bld.f90 | 1 + mlprec/impl/mld_zaggrmat_asb.f90 | 1 + mlprec/impl/mld_zaggrmat_biz_asb.f90 | 1 + mlprec/impl/mld_zaggrmat_minnrg_asb.f90 | 1 + mlprec/impl/mld_zaggrmat_nosmth_asb.f90 | 1 + mlprec/impl/mld_zaggrmat_smth_asb.f90 | 1 + mlprec/impl/mld_zmlprec_aply.f90 | 2 + mlprec/impl/mld_zmlprec_bld.f90 | 4 +- mlprec/impl/mld_zprecaply.f90 | 10 +- mlprec/impl/mld_zprecbld.f90 | 70 +- mlprec/impl/mld_zprecinit.F90 | 94 +- mlprec/impl/smoother/Makefile | 2 +- mlprec/impl/solver/Makefile | 2 +- mlprec/mld_c_inner_mod.f90 | 39 +- mlprec/mld_c_onelev_mod.f90 | 2 +- mlprec/mld_c_prec_mod.f90 | 58 - mlprec/mld_c_prec_type.f90 | 107 +- mlprec/mld_d_inner_mod.f90 | 39 +- mlprec/mld_d_onelev_mod.f90 | 2 +- mlprec/mld_d_prec_mod.f90 | 58 - mlprec/mld_d_prec_type.f90 | 122 +- mlprec/mld_s_inner_mod.f90 | 39 +- mlprec/mld_s_onelev_mod.f90 | 2 +- mlprec/mld_s_prec_mod.f90 | 58 - mlprec/mld_s_prec_type.f90 | 107 +- mlprec/mld_z_inner_mod.f90 | 39 +- mlprec/mld_z_onelev_mod.f90 | 2 +- mlprec/mld_z_prec_mod.f90 | 58 - mlprec/mld_z_prec_type.f90 | 107 +- tests/fileread/Makefile | 8 +- tests/newslv/Makefile | 2 +- tests/pdegen/Makefile | 8 +- tests/pdegen/mld_d_pde2d.f90 | 80 +- tests/pdegen/mld_d_pde3d.f90 | 81 +- tests/pdegen/runs/mld_pde3d.inp | 2 +- 94 files changed, 4930 insertions(+), 8836 deletions(-) diff --git a/configure b/configure index d0e143d2..a8ece3bc 100755 --- a/configure +++ b/configure @@ -1,20 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for MLD2P4 2.0. +# Generated by GNU Autoconf 2.69 for MLD2P4 2.1. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -46,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -57,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -96,15 +89,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -116,12 +110,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -133,7 +131,294 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: bugreport@mld2p4.it about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -147,8 +432,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -168,437 +457,133 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit } -exitcode=0 -if as_func_success; then - : +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - exitcode=1 - echo as_func_success failed. + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -if as_func_ret_success; then - : +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - exitcode=1 - echo as_func_ret_success failed. + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi +as_test_x='test -x' +as_executable_p=as_fn_executable_p -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -test \$exitcode = 0) || { (exit 1); exit 1; } +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS +test -n "$DJDIR" || exec 7<&0 &1 - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -fi +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='MLD2P4' -PACKAGE_TARNAME='mld2p4' -PACKAGE_VERSION='2.0' -PACKAGE_STRING='MLD2P4 2.0' -PACKAGE_BUGREPORT='bugreport@mld2p4.it' +# Identity of this package. +PACKAGE_NAME='MLD2P4' +PACKAGE_TARNAME='mld2p4' +PACKAGE_VERSION='2.1' +PACKAGE_STRING='MLD2P4 2.1' +PACKAGE_BUGREPORT='bugreport@mld2p4.it' +PACKAGE_URL='' ac_unique_file="mlprec/mld_prec_type.f90" # Factoring default headers for most tests. @@ -668,16 +653,13 @@ LAPACK_LIBS EGREP GREP CPP -ac_ct_F77 -FFLAGS -F77 -MPIF77 MPIFC MPILIBS MPICC am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -694,6 +676,10 @@ ac_ct_FC LDFLAGS FCFLAGS FC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -747,6 +733,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -760,6 +747,7 @@ enable_option_checking with_psblas with_psblas_incdir with_psblas_libdir +enable_silent_rules enable_dependency_tracking enable_serial with_ccopt @@ -804,9 +792,6 @@ CFLAGS CPPFLAGS MPICC MPIFC -F77 -FFLAGS -MPIF77 CPP' @@ -870,8 +855,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -916,8 +902,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -943,8 +928,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1148,8 +1132,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1165,8 +1148,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1196,17 +1178,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1215,7 +1197,7 @@ Try \`$0 --help' for more information." >&2 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1223,15 +1205,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1254,8 +1234,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1269,8 +1248,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1285,11 +1262,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1328,13 +1303,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1360,7 +1333,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 MLD2P4 2.0 to adapt to many kinds of systems. +\`configure' configures MLD2P4 2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1374,7 +1347,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1426,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of MLD2P4 2.0:";; + short | recursive ) echo "Configuration of MLD2P4 2.1:";; esac cat <<\_ACEOF @@ -1434,8 +1407,12 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-serial Specify whether to enable a fake mpi library to run in serial mode. --enable-long-integers Specify usage of 64 bits integers. @@ -1449,23 +1426,23 @@ Optional Packages: Specify the directory for PSBLAS includes. --with-psblas-libdir=DIR Specify the directory for PSBLAS library. - --with-ccopt additional CCOPT flags to be added: will prepend - to CCOPT - --with-fcopt additional FCOPT flags to be added: will prepend - to FCOPT + --with-ccopt additional [CCOPT] flags to be added: will prepend + to [CCOPT] + --with-fcopt additional [FCOPT] flags to be added: will prepend + to [FCOPT] --with-libs List additional link flags here. For example, --with-libs=-lspecial_system_lib or --with-libs=-L/path/to/libs - --with-clibs additional CLIBS flags to be added: will prepend - to CLIBS - --with-flibs additional FLIBS flags to be added: will prepend - to FLIBS - --with-library-path additional LIBRARYPATH flags to be added: will - prepend to LIBRARYPATH - --with-include-path additional INCLUDEPATH flags to be added: will - prepend to INCLUDEPATH - --with-module-path additional MODULE_PATH flags to be added: will - prepend to MODULE_PATH + --with-clibs additional [CLIBS] flags to be added: will prepend + to [CLIBS] + --with-flibs additional [FLIBS] flags to be added: will prepend + to [FLIBS] + --with-library-path additional [LIBRARYPATH] flags to be added: will + prepend to [LIBRARYPATH] + --with-include-path additional [INCLUDEPATH] flags to be added: will + prepend to [INCLUDEPATH] + --with-module-path additional [MODULE_PATH] flags to be added: will + prepend to [MODULE_PATH] --with-extra-libs List additional link flags here. For example, --with-extra-libs=-lspecial_system_lib or --with-extra-libs=-L/path/to/libs @@ -1517,13 +1494,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CC C compiler command CFLAGS C compiler flags - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory MPICC MPI C compiler command MPIFC MPI Fortran compiler command - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - MPIF77 MPI Fortran 77 compiler command CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -1592,384 +1566,986 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -MLD2P4 configure 2.0 -generated by GNU Autoconf 2.63 +MLD2P4 configure 2.1 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -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 MLD2P4 $as_me 2.0, which was -generated by GNU Autoconf 2.63. Invocation command line was - $ $0 $@ +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -_ACEOF -exec 5>>config.log +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +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_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_fc_try_compile -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +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_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -_ASUNAME + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 +} # ac_fn_c_try_compile -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +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_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -_ACEOF + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval +} # ac_fn_c_try_link -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo +#ifdef __STDC__ +# include +#else +# include +#endif - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo +#undef $2 - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +} # ac_fn_c_check_func -# Predefined preprocessor variables. +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +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_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval +} # ac_fn_fc_try_link -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +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_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { 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_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +} # ac_fn_c_try_run +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file + ac_retval=1 fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.val -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval +} # ac_fn_c_compute_int +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval +} # ac_fn_c_try_cpp +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +} # ac_fn_c_check_header_compile +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ---------------------------------- ## +## Report this to bugreport@mld2p4.it ## +## ---------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +} # ac_fn_c_check_header_mongrel +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 MLD2P4 $as_me 2.1, which was +generated by GNU Autoconf 2.69. Invocation command line was + $ $0 $@ +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +_ASUNAME +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS +} >&5 +cat >&5 <<_ACEOF +## ----------- ## +## Core tests. ## +## ----------- ## +_ACEOF -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1977,13 +2553,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # VERSION is the file containing the PSBLAS version code # FIXME -mld2p4_cv_version="2.0" +mld2p4_cv_version="2.1" # A sample source file # Our custom M4 macros are in the 'config' directory -{ $as_echo "$as_me:$LINENO: +{ $as_echo "$as_me:${as_lineno-$LINENO}: -------------------------------------------------------------------------------- Welcome to the $PACKAGE_NAME $mld2p4_cv_version configure Script. @@ -2013,7 +2589,7 @@ $as_echo "$as_me: # Check whether --with-psblas was given. -if test "${with_psblas+set}" = set; then +if test "${with_psblas+set}" = set; then : withval=$with_psblas; pac_cv_psblas_dir=$withval else pac_cv_psblas_dir='' @@ -2021,7 +2597,7 @@ fi # Check whether --with-psblas-incdir was given. -if test "${with_psblas_incdir+set}" = set; then +if test "${with_psblas_incdir+set}" = set; then : withval=$with_psblas_incdir; pac_cv_psblas_incdir=$withval else pac_cv_psblas_incdir='' @@ -2029,7 +2605,7 @@ fi # Check whether --with-psblas-libdir was given. -if test "${with_psblas_libdir+set}" = set; then +if test "${with_psblas_libdir+set}" = set; then : withval=$with_psblas_libdir; pac_cv_psblas_libdir=$withval else pac_cv_psblas_libdir='' @@ -2046,27 +2622,22 @@ fi PSBLAS_DIR="$pac_cv_psblas_dir"; PSBLAS_INCDIR="$pac_cv_psblas_incdir"; PSBLAS_LIBDIR="$pac_cv_psblas_libdir"; -{ $as_echo "$as_me:$LINENO: checking for PSBLAS install dir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PSBLAS install dir" >&5 $as_echo_n "checking for PSBLAS install dir... " >&6; } if test "X$PSBLAS_DIR" != "X" ; then case $PSBLAS_DIR in /*) ;; - *) { { $as_echo "$as_me:$LINENO: error: The PSBLAS installation dir must be an absolute pathname - specified with --with-psblas=/path/to/psblas" >&5 -$as_echo "$as_me: error: The PSBLAS installation dir must be an absolute pathname - specified with --with-psblas=/path/to/psblas" >&2;} - { (exit 1); exit 1; }; } + *) as_fn_error $? "The PSBLAS installation dir must be an absolute pathname + specified with --with-psblas=/path/to/psblas" "$LINENO" 5 esac if test ! -d "$PSBLAS_DIR" ; then - { { $as_echo "$as_me:$LINENO: error: Could not find PSBLAS build dir $PSBLAS_DIR!" >&5 -$as_echo "$as_me: error: Could not find PSBLAS build dir $PSBLAS_DIR!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Could not find PSBLAS build dir $PSBLAS_DIR!" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: $PSBLAS_DIR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PSBLAS_DIR" >&5 $as_echo "$PSBLAS_DIR" >&6; } pac_cv_status_file="$PSBLAS_INCDIR/Make.inc.psblas" if test ! -f "$pac_cv_status_file" ; then - { $as_echo "$as_me:$LINENO: Could not find an installation in $PSBLAS_DIR." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find an installation in $PSBLAS_DIR." >&5 $as_echo "$as_me: Could not find an installation in $PSBLAS_DIR." >&6;} pac_cv_status_file="NONE"; fi @@ -2074,9 +2645,9 @@ else pac_cv_status_file="NONE"; fi -{ $as_echo "$as_me:$LINENO: Loaded $pac_cv_status_file $FC $MPIFC $BLACS_LIBS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: Loaded $pac_cv_status_file $FC $MPIFC $BLACS_LIBS" >&5 $as_echo "$as_me: Loaded $pac_cv_status_file $FC $MPIFC $BLACS_LIBS" >&6;} -am__api_version='1.11' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2095,9 +2666,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2123,10 +2692,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2134,11 +2703,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2146,7 +2715,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2175,7 +2744,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2191,7 +2760,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2202,68 +2771,73 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2274,8 +2848,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2286,15 +2860,15 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2303,17 +2877,17 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2324,24 +2898,24 @@ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2351,9 +2925,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2364,24 +2938,24 @@ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2390,7 +2964,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -2403,10 +2977,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2414,9 +2988,9 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do + for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2426,11 +3000,12 @@ do esac done done -done + done IFS=$as_save_IFS fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2438,26 +3013,19 @@ fi # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2468,24 +3036,24 @@ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2493,11 +3061,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2505,7 +3073,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2515,11 +3083,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2533,15 +3101,52 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2557,7 +3162,7 @@ fi # Define the identity of the package. PACKAGE='mld2p4' - VERSION='2.0' + VERSION='2.1' cat >>confdefs.h <<_ACEOF @@ -2585,118 +3190,79 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' -AMTAR=${AMTAR-"${am_missing_run}tar"} +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -# -# Installation. -# -# -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +# +# Installation. +# +# -{ $as_echo "$as_me:$LINENO: checking where to install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install" >&5 $as_echo_n "checking where to install... " >&6; } case $prefix in \/* ) eval "INSTALL_DIR=$prefix";; @@ -2718,12 +3284,10 @@ case $samplesdir in \/* ) eval "INSTALL_SAMPLESDIR=$samplesdir";; * ) eval "INSTALL_SAMPLESDIR=$INSTALL_DIR/samples";; esac -{ $as_echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR $INSTALL_SAMPLESDIR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR $INSTALL_SAMPLESDIR" >&5 $as_echo "$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR $INSTALL_SAMPLESDIR" >&6; } -############################################################################### -# Compilers detection: FC,F77,CC should be set, if found. -############################################################################### +save_FCFLAGS="$FCFLAGS"; 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' @@ -2733,9 +3297,9 @@ if test -n "$ac_tool_prefix"; then 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_FC+set}" = set; then +if ${ac_cv_prog_FC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FC"; then @@ -2746,24 +3310,24 @@ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { $as_echo "$as_me:$LINENO: result: $FC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 $as_echo "$FC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2777,9 +3341,9 @@ if test -z "$FC"; then 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_FC+set}" = set; then +if ${ac_cv_prog_ac_ct_FC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_FC"; then @@ -2790,24 +3354,24 @@ 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -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:$LINENO: result: $ac_ct_FC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 $as_echo "$ac_ct_FC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2820,7 +3384,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -2830,45 +3394,32 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for Fortran compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +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:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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 -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main end @@ -2878,8 +3429,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for Fortran compiler default output file name" >&5 -$as_echo_n "checking for Fortran compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler works" >&5 +$as_echo_n "checking whether the Fortran compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -2895,17 +3446,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2922,7 +3473,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2941,84 +3492,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: Fortran compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: Fortran compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "Fortran compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler default output file name" >&5 +$as_echo_n "checking for Fortran compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the Fortran compiler works" >&5 -$as_echo_n "checking whether the Fortran compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run Fortran compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run Fortran compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3033,44 +3541,93 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat > conftest.$ac_ext <<_ACEOF + program main + open(unit=9,file='conftest.out') + close(unit=9) + + end +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +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_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { 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_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run Fortran compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3083,18 +3640,14 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT @@ -3102,12 +3655,12 @@ ac_objext=$OBJEXT # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5 +{ $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 test "${ac_cv_fc_compiler_gnu+set}" = set; then +if ${ac_cv_fc_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me @@ -3115,1188 +3668,271 @@ else end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5 +{ $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_FFLAGS=${FCFLAGS+set} -ac_save_FFLAGS=$FCFLAGS +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ $as_echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 $as_echo_n "checking whether $FC accepts -g... " >&6; } -if test "${ac_cv_prog_fc_g+set}" = set; then +if ${ac_cv_prog_fc_g+:} false; then : $as_echo_n "(cached) " >&6 else FCFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_prog_fc_g=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FCFLAGS=$ac_save_FFLAGS -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" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in xlc pgcc icc gcc cc - 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:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in xlc pgcc icc gcc cc -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:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$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 - CC=$ac_ct_CC - fi -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -if test "X$CC" == "X" ; then - { { $as_echo "$as_me:$LINENO: error: Problem : No C compiler specified nor found!" >&5 -$as_echo "$as_me: error: Problem : No C compiler specified nor found!" >&2;} - { (exit 1); exit 1; }; } -fi -if eval "$FC -qversion 2>&1 | grep XL 2>/dev/null" ; then - # Some configurations of the XLF want "-WF," prepended to -D.. flags. - # TODO : discover the exact conditions when the usage of -WF is needed. - mld_cv_define_prepend="-WF," - if eval "$MPIFC -qversion 2>&1 | grep -e\"Version: 10\.\" 2>/dev/null"; then - FDEFINES="$mld_cv_define_prepend-DXLF_10 $FDEFINES" - fi - - # Note : there coule be problems with old xlf compiler versions ( <10.1 ) - # since (as far as it is known to us) -WF, is not used in earlier versions. - # More problems could be undocumented yet. -fi -############################################################################### -# Suitable MPI compilers detection -############################################################################### -# Note: Someday we will contemplate a fake MPI - configured version of PSBLAS -############################################################################### -# First check whether the user required our serial (fake) mpi. -{ $as_echo "$as_me:$LINENO: checking whether we want serial mpi stubs" >&5 -$as_echo_n "checking whether we want serial mpi stubs... " >&6; } -# Check whether --enable-serial was given. -if test "${enable_serial+set}" = set; then - enableval=$enable_serial; -pac_cv_serial_mpi="yes"; - - -fi - -if test x"$pac_cv_serial_mpi" == x"yes" ; then - { $as_echo "$as_me:$LINENO: result: yes." >&5 -$as_echo "yes." >&6; } -else - pac_cv_serial_mpi="no"; - { $as_echo "$as_me:$LINENO: result: no." >&5 -$as_echo "no." >&6; } + ac_cv_prog_fc_g=no 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" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi - -#Note : we miss the name of the Intel C compiler -if test x"$pac_cv_serial_mpi" == x"yes" ; then - FAKEMPI="fakempi.o"; - MPIFC="$FC"; - MPIF77="$F77"; - MPICC="$CC"; +if test $ac_compiler_gnu = yes; then + GFC=yes else + GFC= +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "X$MPICC" = "X" ; then - # This is our MPICC compiler preference: it will override ACX_MPI's first try. - for ac_prog in mpxlc mpcc mpicc cc -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:$LINENO: checking for $ac_word" >&5 +FCFLAGS="$save_FCFLAGS"; +save_CFLAGS="$CFLAGS"; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in xlc pgcc icc gcc cc + 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 test "${ac_cv_prog_MPICC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MPICC"; then - ac_cv_prog_MPICC="$MPICC" # Let the user override the test. + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPICC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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_CC="$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 + done IFS=$as_save_IFS fi fi -MPICC=$ac_cv_prog_MPICC -if test -n "$MPICC"; then - { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 -$as_echo "$MPICC" >&6; } +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MPICC" && break -done - + test -n "$CC" && break + done fi - - - - - - - for ac_prog in mpicc hcc mpxlc_r mpxlc mpcc cmpicc +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in xlc pgcc icc gcc cc 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPICC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MPICC"; then - ac_cv_prog_MPICC="$MPICC" # Let the user override the test. + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPICC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -MPICC=$ac_cv_prog_MPICC -if test -n "$MPICC"; then - { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 -$as_echo "$MPICC" >&6; } +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MPICC" && break + test -n "$ac_ct_CC" && break done -test -n "$MPICC" || MPICC="$CC" - - acx_mpi_save_CC="$CC" - CC="$MPICC" - - - -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } -if test "${ac_cv_func_MPI_Init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define MPI_Init to an innocuous variant, in case declares MPI_Init. - For example, HP-UX 11i declares gettimeofday. */ -#define MPI_Init innocuous_MPI_Init - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char MPI_Init (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +fi -#undef MPI_Init -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_MPI_Init || defined __stub___MPI_Init -choke me -#endif +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } -int -main () -{ -return MPI_Init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C 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:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +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=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_MPI_Init=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_MPI_Init=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 -$as_echo "$ac_cv_func_MPI_Init" >&6; } -if test "x$ac_cv_func_MPI_Init" = x""yes; then - MPILIBS=" " -fi - -fi + 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 -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 -$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } -if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); int main () { -return MPI_Init (); +#ifndef __GNUC__ + choke me +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mpi_MPI_Init=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpi_MPI_Init=no + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then - MPILIBS="-lmpi" fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= fi -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 -$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } -if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); int -main () -{ -return MPI_Init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mpich_MPI_Init=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpich_MPI_Init=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then - MPILIBS="-lmpich" -fi - -fi +main () +{ -if test x != x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for mpi.h" >&5 -$as_echo_n "checking for mpi.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { @@ -4305,802 +3941,742 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +if ac_fn_c_try_compile "$LINENO"; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - MPILIBS="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - -CC="$acx_mpi_save_CC" - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x = x"$MPILIBS"; then - { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for C" >&5 -$as_echo "$as_me: error: Cannot find any suitable MPI implementation for C" >&2;} - { (exit 1); exit 1; }; } - : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi else - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MPI 1 -_ACEOF - - : + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; -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 "X$MPIFC" = "X" ; then - # This is our MPIFC compiler preference: it will override ACX_MPI's first try. - for ac_prog in mpxlf2003_r mpxlf2003 mpxlf95_r mpxlf90 mpf95 mpf90 mpifort mpif95 mpif90 ftn -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:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPIFC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$MPIFC"; then - ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPIFC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -IFS=$as_save_IFS +rm -f conftest.$ac_ext +CC=$ac_save_CC fi -fi -MPIFC=$ac_cv_prog_MPIFC -if test -n "$MPIFC"; then - { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 -$as_echo "$MPIFC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$MPIFC" && break -done +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" +ac_config_commands="$ac_config_commands depfiles" - for ac_prog in mpif90 hf90 mpxlf90 mpxlf95 mpf90 cmpifc cmpif90c -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:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPIFC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$MPIFC"; then - ac_cv_prog_MPIFC="$MPIFC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPIFC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -fi -MPIFC=$ac_cv_prog_MPIFC -if test -n "$MPIFC"; then - { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 -$as_echo "$MPIFC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$MPIFC" && break -done -test -n "$MPIFC" || MPIFC="$FC" - - acx_mpi_save_FC="$FC" - FC="$MPIFC" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } - cat >conftest.$ac_ext <<_ACEOF - program main - call MPI_Init - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - MPILIBS=" " - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' fi - - if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 -$as_echo_n "checking for MPI_Init in -lfmpi... " >&6; } -if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lfmpi $LIBS" -cat >conftest.$ac_ext <<_ACEOF - program main - call MPI_Init - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_fmpi_MPI_Init=yes + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_fmpi_MPI_Init=no + AMDEP_TRUE='#' + AMDEP_FALSE= fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 -$as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then - MPILIBS="-lfmpi" -fi - fi - if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpichf90" >&5 -$as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; } -if test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpichf90 $LIBS" -cat >conftest.$ac_ext <<_ACEOF - program main - call MPI_Init - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mpichf90_MPI_Init=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub - ac_cv_lib_mpichf90_MPI_Init=no -fi + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpichf90_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpichf90_MPI_Init" = x""yes; then - MPILIBS="-lmpichf90" -fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - fi + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 -$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } -if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" -cat >conftest.$ac_ext <<_ACEOF - program main - call MPI_Init - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mpi_MPI_Init=yes + cd .. + rm -rf conftest.dir else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpi_MPI_Init=no + am_cv_CC_dependencies_compiler_type=none fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then - MPILIBS="-lmpi" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type -fi -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 -$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } -if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" -cat >conftest.$ac_ext <<_ACEOF - program main - call MPI_Init - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mpich_MPI_Init=yes + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpich_MPI_Init=no + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then - MPILIBS="-lmpich" -fi -fi +CFLAGS="$save_CFLAGS"; -if test x != x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for mpif.h" >&5 -$as_echo_n "checking for mpif.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF - program main - include 'mpif.h' - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - MPILIBS="" - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } +# Sanity checks, although redundant (useful when debugging this configure.ac)! +if test "X$FC" == "X" ; then + as_fn_error $? "Problem : No Fortran compiler specified nor found!" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "X$CC" == "X" ; then + as_fn_error $? "Problem : No C compiler specified nor found!" "$LINENO" 5 fi +if eval "$FC -qversion 2>&1 | grep XL 2>/dev/null" ; then + # Some configurations of the XLF want "-WF," prepended to -D.. flags. + # TODO : discover the exact conditions when the usage of -WF is needed. + mld_cv_define_prepend="-WF," + if eval "$MPIFC -qversion 2>&1 | grep -e\"Version: 10\.\" 2>/dev/null"; then + FDEFINES="$mld_cv_define_prepend-DXLF_10 $FDEFINES" + fi -FC="$acx_mpi_save_FC" + # Note : there could be problems with old xlf compiler versions ( <10.1 ) + # since (as far as it is known to us) -WF, is not used in earlier versions. + # More problems could be undocumented yet. +fi +############################################################################### +# Suitable MPI compilers detection +############################################################################### +# Note: Someday we will contemplate a fake MPI - configured version of PSBLAS +############################################################################### +# First check whether the user required our serial (fake) mpi. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we want serial mpi stubs" >&5 +$as_echo_n "checking whether we want serial mpi stubs... " >&6; } +# Check whether --enable-serial was given. +if test "${enable_serial+set}" = set; then : + enableval=$enable_serial; +pac_cv_serial_mpi="yes"; +fi -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x = x"$MPILIBS"; then - { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran" >&5 -$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran" >&2;} - { (exit 1); exit 1; }; } - : +if test x"$pac_cv_serial_mpi" == x"yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 +$as_echo "yes." >&6; } else - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MPI 1 -_ACEOF - - : + pac_cv_serial_mpi="no"; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no." >&5 +$as_echo "no." >&6; } fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test "X$MPIF77" = "X" ; then - # This is our MPIFC compiler preference: it will override ACX_MPI's first try. - for ac_prog in mpxlf mpf77 mpif77 ftn +#Note : we miss the name of the Intel C compiler +if test x"$pac_cv_serial_mpi" == x"yes" ; then + FAKEMPI="fakempi.o"; + MPIFC="$FC"; + MPICC="$CC"; +else +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test "X$MPICC" = "X" ; then + # This is our MPICC compiler preference: it will override ACX_MPI's first try. + for ac_prog in mpxlc mpcc mpicc cc 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPIF77+set}" = set; then +if ${ac_cv_prog_MPICC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MPIF77"; then - ac_cv_prog_MPIF77="$MPIF77" # Let the user override the test. + if test -n "$MPICC"; then + ac_cv_prog_MPICC="$MPICC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPIF77="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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_MPICC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -MPIF77=$ac_cv_prog_MPIF77 -if test -n "$MPIF77"; then - { $as_echo "$as_me:$LINENO: result: $MPIF77" >&5 -$as_echo "$MPIF77" >&6; } +MPICC=$ac_cv_prog_MPICC +if test -n "$MPICC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5 +$as_echo "$MPICC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MPIF77" && break + test -n "$MPICC" && break done fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - 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:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:$LINENO: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + + + + for ac_prog in mpicc hcc mpxlc_r mpxlc mpcc cmpicc 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then +if ${ac_cv_prog_MPICC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. + if test -n "$MPICC"; then + ac_cv_prog_MPICC="$MPICC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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_MPICC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } +MPICC=$ac_cv_prog_MPICC +if test -n "$MPICC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5 +$as_echo "$MPICC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_F77" && break + test -n "$MPICC" && break done +test -n "$MPICC" || MPICC="$CC" - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$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 - F77=$ac_ct_F77 - fi + acx_mpi_save_CC="$CC" + CC="$MPICC" + + + +if test x = x"$MPILIBS"; then + ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" +if test "x$ac_cv_func_MPI_Init" = xyes; then : + MPILIBS=" " fi +fi -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } +if ${ac_cv_lib_mpi_MPI_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# 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:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Init (); +int +main () +{ +return MPI_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mpi_MPI_Init=yes +else + ac_cv_lib_mpi_MPI_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : + MPILIBS="-lmpi" +fi + +fi +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } +if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif +char MPI_Init (); +int +main () +{ +return MPI_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mpich_MPI_Init=yes +else + ac_cv_lib_mpich_MPI_Init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : + MPILIBS="-lmpich" +fi - end +fi + +if test x != x"$MPILIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 +$as_echo_n "checking for mpi.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + MPILIBS="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +CC="$acx_mpi_save_CC" + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x = x"$MPILIBS"; then + as_fn_error $? "Cannot find any suitable MPI implementation for C" "$LINENO" 5 + : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +$as_echo "#define HAVE_MPI 1" >>confdefs.h + + : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then + +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 "X$MPIFC" = "X" ; then + # This is our MPIFC compiler preference: it will override ACX_MPI's first try. + for ac_prog in mpxlf2003_r mpxlf2003 mpxlf95_r mpxlf90 mpf95 mpf90 mpifort mpif95 mpif90 ftn +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_MPIFC+:} false; then : $as_echo_n "(cached) " >&6 else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes + if test -n "$MPIFC"; then + ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +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_MPIFC="$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 - ac_cv_prog_f77_g=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi +MPIFC=$ac_cv_prog_MPIFC +if test -n "$MPIFC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5 +$as_echo "$MPIFC" >&6; } else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= + + test -n "$MPIFC" && break +done + fi -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu @@ -5108,383 +4684,231 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu - for ac_prog in mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c + for ac_prog in mpif90 hf90 mpxlf90 mpxlf95 mpf90 cmpifc cmpif90c 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:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPIF77+set}" = set; then +if ${ac_cv_prog_MPIFC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MPIF77"; then - ac_cv_prog_MPIF77="$MPIF77" # Let the user override the test. + if test -n "$MPIFC"; then + ac_cv_prog_MPIFC="$MPIFC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPIF77="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + 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_MPIFC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi -MPIF77=$ac_cv_prog_MPIF77 -if test -n "$MPIF77"; then - { $as_echo "$as_me:$LINENO: result: $MPIF77" >&5 -$as_echo "$MPIF77" >&6; } +MPIFC=$ac_cv_prog_MPIFC +if test -n "$MPIFC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5 +$as_echo "$MPIFC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MPIF77" && break + test -n "$MPIFC" && break done -test -n "$MPIF77" || MPIF77="$F77" +test -n "$MPIFC" || MPIFC="$FC" - acx_mpi_save_F77="$F77" - F77="$MPIF77" + acx_mpi_save_FC="$FC" + FC="$MPIFC" if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 $as_echo_n "checking for MPI_Init... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : MPILIBS=" " - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lfmpi" >&5 $as_echo_n "checking for MPI_Init in -lfmpi... " >&6; } -if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then +if ${ac_cv_lib_fmpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfmpi $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_fmpi_MPI_Init=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_fmpi_MPI_Init=no + ac_cv_lib_fmpi_MPI_Init=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then +if test "x$ac_cv_lib_fmpi_MPI_Init" = xyes; then : MPILIBS="-lfmpi" fi fi if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpich" >&5 -$as_echo_n "checking for MPI_Init in -lfmpich... " >&6; } -if test "${ac_cv_lib_fmpich_MPI_Init+set}" = set; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpichf90" >&5 +$as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; } +if ${ac_cv_lib_mpichf90_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lfmpich $LIBS" -cat >conftest.$ac_ext <<_ACEOF +LIBS="-lmpichf90 $LIBS" +cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_fmpich_MPI_Init=yes +if ac_fn_fc_try_link "$LINENO"; then : + ac_cv_lib_mpichf90_MPI_Init=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_fmpich_MPI_Init=no + ac_cv_lib_mpichf90_MPI_Init=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpich_MPI_Init" >&5 -$as_echo "$ac_cv_lib_fmpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_fmpich_MPI_Init" = x""yes; then - MPILIBS="-lfmpich" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpichf90_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpichf90_MPI_Init" = xyes; then : + MPILIBS="-lmpichf90" fi fi if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } -if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then +if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_mpi_MPI_Init=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpi_MPI_Init=no + ac_cv_lib_mpi_MPI_Init=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then +if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } -if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then +if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_mpich_MPI_Init=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpich_MPI_Init=no + ac_cv_lib_mpich_MPI_Init=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then +if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then - { $as_echo "$as_me:$LINENO: checking for mpif.h" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpif.h" >&5 $as_echo_n "checking for mpif.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main include 'mpif.h' end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - MPILIBS="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + MPILIBS="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -F77="$acx_mpi_save_F77" +FC="$acx_mpi_save_FC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then - { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran 77" >&5 -$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran 77" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find any suitable MPI implementation for Fortran" "$LINENO" 5 : else -cat >>confdefs.h <<\_ACEOF -#define HAVE_MPI 1 -_ACEOF +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi + FC="$MPIFC" ; -F77="$MPIF77"; CC="$MPICC"; fi - -# We leave a default language for the next checks. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5498,15 +4922,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ############################################################################### if test "X$MPIFC" == "X" ; then - { { $as_echo "$as_me:$LINENO: error: Problem : No MPI Fortran compiler specified nor found!" >&5 -$as_echo "$as_me: error: Problem : No MPI Fortran compiler specified nor found!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Problem : No MPI Fortran compiler specified nor found!" "$LINENO" 5 fi if test "X$MPICC" == "X" ; then - { { $as_echo "$as_me:$LINENO: error: Problem : No MPI C compiler specified nor found!" >&5 -$as_echo "$as_me: error: Problem : No MPI C compiler specified nor found!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Problem : No MPI C compiler specified nor found!" "$LINENO" 5 fi ############################################################################### @@ -5514,56 +4934,54 @@ fi ############################################################################### -{ $as_echo "$as_me:$LINENO: checking whether additional CCOPT flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional CCOPT flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional CCOPT flags should be added (should be invoked only once)... " >&6; } # Check whether --with-ccopt was given. -if test "${with_ccopt+set}" = set; then +if test "${with_ccopt+set}" = set; then : withval=$with_ccopt; CCOPT="${withval} ${CCOPT}" -{ $as_echo "$as_me:$LINENO: result: CCOPT = ${CCOPT}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CCOPT = ${CCOPT}" >&5 $as_echo "CCOPT = ${CCOPT}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether additional FCOPT flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional FCOPT flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional FCOPT flags should be added (should be invoked only once)... " >&6; } # Check whether --with-fcopt was given. -if test "${with_fcopt+set}" = set; then +if test "${with_fcopt+set}" = set; then : withval=$with_fcopt; FCOPT="${withval} ${FCOPT}" -{ $as_echo "$as_me:$LINENO: result: FCOPT = ${FCOPT}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: FCOPT = ${FCOPT}" >&5 $as_echo "FCOPT = ${FCOPT}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -#PAC_ARG_WITH_FLAGS(f90copt,F90COPT) -#PAC_ARG_WITH_FLAGS(ldflags,LDFLAGS) -{ $as_echo "$as_me:$LINENO: checking whether additional libraries are needed" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional libraries are needed" >&5 $as_echo_n "checking whether additional libraries are needed... " >&6; } # Check whether --with-libs was given. -if test "${with_libs+set}" = set; then +if test "${with_libs+set}" = set; then : withval=$with_libs; LIBS="${withval} ${LIBS}" -{ $as_echo "$as_me:$LINENO: result: LIBS = ${LIBS}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: LIBS = ${LIBS}" >&5 $as_echo "LIBS = ${LIBS}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5571,36 +4989,36 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether additional CLIBS flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional CLIBS flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional CLIBS flags should be added (should be invoked only once)... " >&6; } # Check whether --with-clibs was given. -if test "${with_clibs+set}" = set; then +if test "${with_clibs+set}" = set; then : withval=$with_clibs; CLIBS="${withval} ${CLIBS}" -{ $as_echo "$as_me:$LINENO: result: CLIBS = ${CLIBS}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CLIBS = ${CLIBS}" >&5 $as_echo "CLIBS = ${CLIBS}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether additional FLIBS flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional FLIBS flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional FLIBS flags should be added (should be invoked only once)... " >&6; } # Check whether --with-flibs was given. -if test "${with_flibs+set}" = set; then +if test "${with_flibs+set}" = set; then : withval=$with_flibs; FLIBS="${withval} ${FLIBS}" -{ $as_echo "$as_me:$LINENO: result: FLIBS = ${FLIBS}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: FLIBS = ${FLIBS}" >&5 $as_echo "FLIBS = ${FLIBS}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5608,54 +5026,54 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether additional LIBRARYPATH flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional LIBRARYPATH flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional LIBRARYPATH flags should be added (should be invoked only once)... " >&6; } # Check whether --with-library-path was given. -if test "${with_library_path+set}" = set; then +if test "${with_library_path+set}" = set; then : withval=$with_library_path; LIBRARYPATH="${withval} ${LIBRARYPATH}" -{ $as_echo "$as_me:$LINENO: result: LIBRARYPATH = ${LIBRARYPATH}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: LIBRARYPATH = ${LIBRARYPATH}" >&5 $as_echo "LIBRARYPATH = ${LIBRARYPATH}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether additional INCLUDEPATH flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional INCLUDEPATH flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional INCLUDEPATH flags should be added (should be invoked only once)... " >&6; } # Check whether --with-include-path was given. -if test "${with_include_path+set}" = set; then +if test "${with_include_path+set}" = set; then : withval=$with_include_path; INCLUDEPATH="${withval} ${INCLUDEPATH}" -{ $as_echo "$as_me:$LINENO: result: INCLUDEPATH = ${INCLUDEPATH}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: INCLUDEPATH = ${INCLUDEPATH}" >&5 $as_echo "INCLUDEPATH = ${INCLUDEPATH}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether additional MODULE_PATH flags should be added (should be invoked only once)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional MODULE_PATH flags should be added (should be invoked only once)" >&5 $as_echo_n "checking whether additional MODULE_PATH flags should be added (should be invoked only once)... " >&6; } # Check whether --with-module-path was given. -if test "${with_module_path+set}" = set; then +if test "${with_module_path+set}" = set; then : withval=$with_module_path; MODULE_PATH="${withval} ${MODULE_PATH}" -{ $as_echo "$as_me:$LINENO: result: MODULE_PATH = ${MODULE_PATH}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MODULE_PATH = ${MODULE_PATH}" >&5 $as_echo "MODULE_PATH = ${MODULE_PATH}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5664,18 +5082,18 @@ fi # we just gave the user the chance to append values to these variables -{ $as_echo "$as_me:$LINENO: checking whether additional libraries are needed" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether additional libraries are needed" >&5 $as_echo_n "checking whether additional libraries are needed... " >&6; } # Check whether --with-extra-libs was given. -if test "${with_extra_libs+set}" = set; then +if test "${with_extra_libs+set}" = set; then : withval=$with_extra_libs; EXTRA_LIBS="${withval}" -{ $as_echo "$as_me:$LINENO: result: EXTRA_LIBS = ${EXTRA_LIBS}" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: EXTRA_LIBS = ${EXTRA_LIBS}" >&5 $as_echo "EXTRA_LIBS = ${EXTRA_LIBS}" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5688,10 +5106,12 @@ fi ############################################################################### ############################################################################### -# PSBLAS library presence checks +# Compiler identification (sadly, it is necessary) ############################################################################### +psblas_cv_fc="" -{ $as_echo "$as_me:$LINENO: checking for GNU Fortran" >&5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Fortran" >&5 $as_echo_n "checking for GNU Fortran... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -5701,7 +5121,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main #ifdef __GNUC__ @@ -5711,38 +5131,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #endif end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } psblas_cv_fc="gcc" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5752,7 +5151,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for Cray Fortran" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cray Fortran" >&5 $as_echo_n "checking for Cray Fortran... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -5762,7 +5161,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main #ifdef _CRAYFTN @@ -5772,38 +5171,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #endif end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } psblas_cv_fc="cray" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5841,16 +5219,15 @@ if test x"$psblas_cv_fc" == "x" ; then elif eval "$MPIFC -v 2>&1 | grep NAG 2>/dev/null" ; then psblas_cv_fc="nag" FC="$MPIFC" - F77="$MPIFC" else psblas_cv_fc="" # unsupported MPI Fortran compiler - { $as_echo "$as_me:$LINENO: Unknown Fortran compiler, proceeding with fingers crossed !" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown Fortran compiler, proceeding with fingers crossed !" >&5 $as_echo "$as_me: Unknown Fortran compiler, proceeding with fingers crossed !" >&6;} fi fi if test "X$psblas_cv_fc" == "Xgcc" ; then -{ $as_echo "$as_me:$LINENO: checking for recent GNU Fortran" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent GNU Fortran" >&5 $as_echo_n "checking for recent GNU Fortran... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -5860,7 +5237,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main #if ( __GNUC__ >= 4 && __GNUC_MINOR__ >= 8 ) || ( __GNUC__ > 4 ) @@ -5870,43 +5247,20 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #endif end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: Sorry, we require GNU Fortran version 4.8.4 or later." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Sorry, we require GNU Fortran version 4.8.4 or later." >&5 $as_echo "$as_me: Sorry, we require GNU Fortran version 4.8.4 or later." >&6;} echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Bailing out." >&5 -$as_echo "$as_me: error: Bailing out." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Bailing out." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5917,6 +5271,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi + +############################################################################### +# Linking, symbol mangling, and misc tests +############################################################################### + +# Note : This is functional to Make.inc rules and structure (see below). ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5928,14 +5288,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5950,11 +5310,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5963,78 +5319,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -6046,7 +5358,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -6057,11 +5369,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6070,87 +5378,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +else # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6160,9 +5421,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -6173,10 +5434,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -6193,7 +5454,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -6208,26 +5469,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -6241,10 +5500,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -6261,7 +5520,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -6276,12 +5535,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -6289,21 +5546,17 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6318,48 +5571,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -6369,18 +5597,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -6388,513 +5612,98 @@ rm -f conftest* fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_lo=`expr '(' $ac_mid ')' + 1` fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (void *)); } -static unsigned long int ulongval () { return (long int) (sizeof (void *)); } -#include -#include -int -main () -{ +$as_echo "#define STDC_HEADERS 1" >>confdefs.h - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (void *))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (void *)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (void *)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; +fi - ; - return 0; -} +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` + +fi + +done + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : -( exit $ac_status ) -if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } @@ -6913,16 +5722,12 @@ 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 "X$psblas_cv_fc" == X"pg" ; then - save_FC=$FC - FC=$F77 -fi -{ $as_echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 $as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if test "${ac_cv_fc_mangling+set}" = set; then +if ${ac_cv_fc_mangling+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return end @@ -6930,24 +5735,7 @@ else return end _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -6962,11 +5750,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6984,38 +5768,11 @@ return $ac_func (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done done ac_ext=${ac_fc_srcext-f} @@ -7043,11 +5800,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7065,38 +5818,11 @@ return $ac_func (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7105,16 +5831,16 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "$ac_success_extra" = "yes"; then ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi else ac_cv_fc_mangling="unknown" fi @@ -7126,22 +5852,15 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu rm -rf conftest* rm -f cfortran_test* else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compile a simple Fortran program -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 $as_echo "$ac_cv_fc_mangling" >&6; } if test "X$psblas_cv_fc" == X"pg" ; then @@ -7159,7 +5878,7 @@ pac_fc_sec_under=${pac_fc_under#*,} pac_fc_sec_under=${pac_fc_sec_under# } pac_fc_under=${pac_fc_under%%,*} pac_fc_under=${pac_fc_under# } -{ $as_echo "$as_me:$LINENO: checking defines for C/Fortran name interfaces" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking defines for C/Fortran name interfaces" >&5 $as_echo_n "checking defines for C/Fortran name interfaces... " >&6; } if test "x$pac_fc_case" == "xlower case"; then if test "x$pac_fc_under" == "xunderscore"; then @@ -7194,14 +5913,16 @@ else fi CDEFINES="$pac_f_c_names $CDEFINES" -{ $as_echo "$as_me:$LINENO: result: $pac_f_c_names " >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_f_c_names " >&5 $as_echo " $pac_f_c_names " >&6; } ############################################################################### # Make.inc generation logic ############################################################################### -F90COPT="$FCOPT" - +# Honor CFLAGS if they were specified explicitly, but --with-ccopt take precedence +if test "X$CCOPT" == "X" ; then + CCOPT="$CFLAGS"; +fi if test "X$CCOPT" == "X" ; then if test "X$psblas_cv_fc" == "Xgcc" ; then # note that no space should be placed around the equality symbol in assignements @@ -7233,6 +5954,10 @@ if test "X$CCOPT" == "X" ; then fi #CFLAGS="${CCOPT}" +# Honor FCFLAGS if they were specified explicitly, but --with-fcopt take precedence +if test "X$FCOPT" == "X" ; then + FCOPT="$FCFLAGS"; +fi if test "X$FCOPT" == "X" ; then if test "X$psblas_cv_fc" == "Xgcc" ; then # note that no space should be placed around the equality symbol in assignations @@ -7264,60 +5989,24 @@ if test "X$FCOPT" == "X" ; then fi if test "X$psblas_cv_fc" == X"nag" ; then # Add needed options - FCOPT="$FCOPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv" -fi -#FFLAGS="${FCOPT}" - -if test "X$F90COPT" == "X" ; then - if test "X$psblas_cv_fc" == "Xgcc" ; then - # note that no space should be placed around the equality symbol in assignations - # Note : 'native' is valid _only_ on GCC/x86 (32/64 bits) - F90COPT="-O3 $F90COPT" - elif test "X$psblas_cv_fc" == X"xlf" ; then - # XL compiler : consider using -qarch=auto - F90COPT="-O3 -qarch=auto -qsuffix=f=f90:cpp=F90 -qlanglvl=extended $F90COPT" - elif test "X$psblas_cv_fc" == X"ifc" ; then - # other compilers .. - F90COPT="-O3 $F90COPT" - elif test "X$psblas_cv_fc" == X"pg" ; then - # other compilers .. - F90COPT="-fast $F90COPT" - elif test "X$psblas_cv_fc" == X"sun" ; then - F90COPT="-fast $F90COPT" - elif test "X$psblas_cv_fc" == X"cray" ; then - MPIFC="ftn" - F90COPT="-O3 -em $F90COPT" - elif test "X$psblas_cv_fc" == X"nag" ; then - # NAG compiler - F90COPT="-O2" - else - # other compilers .. - F90COPT="-O2 $F90COPT" - fi -else - echo "Found FCFLAGS $F90COPT" - #F90COPT="${FCFLAGS}" -fi -if test "X$psblas_cv_fc" == X"nag" ; then - # Add needed options - F90COPT="$F90COPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv" + FCOPT="$FCOPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv" EXTRA_OPT="-mismatch_all" fi -#FCFLAGS="${F90COPT}" -# COPT,FCOPT, F90COPT are aliases for FFLAGS,CFLAGS,FCFLAGS . +# COPT,FCOPT are aliases for CFLAGS,FCFLAGS . ############################################################################## # Compilers variables selection ############################################################################## -F90=${FC} -MPF90=${MPIFC} FC=${FC} -MPF77=${MPIFC} CC=${CC} MPCC=${MPICC} + +############################################################################## +# Choice of our compilers, needed by Make.inc +############################################################################## if test "X$psblas_cv_fc" == X"cray" then MODEXT=".mod" @@ -7330,9 +6019,9 @@ then else -{ $as_echo "$as_me:$LINENO: checking fortran 90 modules extension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules extension" >&5 $as_echo_n "checking fortran 90 modules extension... " >&6; } -if test "${ax_cv_f90_modext+set}" = set; then +if ${ax_cv_f90_modext+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=${ac_fc_srcext-f} @@ -7346,7 +6035,7 @@ while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do done mkdir tmpdir_$i cd tmpdir_$i -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF module conftest_module contains @@ -7356,24 +6045,7 @@ cat >conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : ax_cv_f90_modext=`ls | sed -n 's,conftest_module\.,,p'` if test x$ax_cv_f90_modext = x ; then ax_cv_f90_modext=`ls | sed -n 's,CONFTEST_MODULE\.,,p'` @@ -7383,12 +6055,8 @@ $as_echo "$ac_try_echo") >&5 fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ax_cv_f90_modext=unknown + ax_cv_f90_modext=unknown fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cd .. rm -fr tmpdir_$i @@ -7400,12 +6068,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ax_cv_f90_modext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modext" >&5 $as_echo "$ax_cv_f90_modext" >&6; } -{ $as_echo "$as_me:$LINENO: checking fortran 90 modules inclusion flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 $as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } -if test "${ax_cv_f90_modflag+set}" = set; then +if ${ax_cv_f90_modflag+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=${ac_fc_srcext-f} @@ -7420,7 +6088,7 @@ done mkdir tmpdir_$i cd tmpdir_$i ac_ext='f90'; -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF module conftest_module contains @@ -7430,32 +6098,9 @@ cat >conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +if ac_fn_fc_try_compile "$LINENO"; then : fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cd ..; ax_cv_f90_modflag="not found" @@ -7463,7 +6108,7 @@ for ax_flag in "-I " "-M" "-p"; do if test "$ax_cv_f90_modflag" = "not found" ; then ax_save_FCFLAGS="$FCFLAGS" FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i" - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program conftest_program use conftest_module @@ -7471,41 +6116,16 @@ for ax_flag in "-I " "-M" "-p"; do end program conftest_program _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : ax_cv_f90_modflag="$ax_flag" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS="$ax_save_FCFLAGS" fi done rm -fr tmpdir_$i if test "$ax_cv_f90_modflag" = "not found" ; then - { { $as_echo "$as_me:$LINENO: error: unable to find compiler flag for modules inclusion" >&5 -$as_echo "$as_me: error: unable to find compiler flag for modules inclusion" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7515,7 +6135,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ax_cv_f90_modflag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 $as_echo "$ax_cv_f90_modflag" >&6; } MODEXT=".$ax_cv_f90_modext" FMFLAG="${ax_cv_f90_modflag%% *}" @@ -7531,15 +6151,10 @@ fi # Choice of our compilers, needed by Make.inc ############################################################################## if test "X$FLINK" == "X" ; then - FLINK=${MPF77} -fi - -if test "X$F90LINK" == "X" ; then - F90LINK=${MPF90} + FLINK=${MPF90} fi - -{ $as_echo "$as_me:$LINENO: checking for working installation of PSBLAS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working installation of PSBLAS" >&5 $as_echo_n "checking for working installation of PSBLAS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7557,41 +6172,18 @@ elif test "x$pac_cv_psblas_dir" != "x"; then PSBLAS_INCLUDES="$FMFLAG$pac_cv_psblas_dir/include" fi FCFLAGS=" $PSBLAS_INCLUDES $save_FCFLAGS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program test use psb_base_mod end program test _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes." >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 $as_echo "yes." >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:$LINENO: error: no. Could not find working version of PSBLAS." >&5 -$as_echo "$as_me: error: no. Could not find working version of PSBLAS." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no. Could not find working version of PSBLAS." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7601,7 +6193,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f conftest* -{ $as_echo "$as_me:$LINENO: checking for version of PSBLAS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for version of PSBLAS" >&5 $as_echo_n "checking for version of PSBLAS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7625,129 +6217,54 @@ PSBLAS_LIBS="-lpsb_krylov -lpsb_prec -lpsb_util -lpsb_base -L$PSBLAS_LIBDIR" LDFLAGS=" $PSBLAS_LIBS $save_LDFLAGS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program test - use psb_base_mod - print *,psb_version_major_ - end program test -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + use psb_base_mod + print *,psb_version_major_ + end program test +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : pac_cv_psblas_major=`./conftest${ac_exeext} | sed 's/^ *//'` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - pac_cv_psblas_major="unknown" + pac_cv_psblas_major="unknown" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program test use psb_base_mod print *,psb_version_minor_ end program test _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : pac_cv_psblas_minor=`./conftest${ac_exeext} | sed 's/^ *//'` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - pac_cv_psblas_minor="unknown" + pac_cv_psblas_minor="unknown" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program test use psb_base_mod print *,psb_patchlevel_ end program test _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : pac_cv_psblas_patchlevel=`./conftest${ac_exeext} | sed 's/^ *//'` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - pac_cv_psblas_patchlevel="unknown" + pac_cv_psblas_patchlevel="unknown" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS"; FCFLAGS="$save_FCFLAGS"; -{ $as_echo "$as_me:$LINENO: result: Done" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Done" >&5 $as_echo "Done" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7757,27 +6274,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$pac_cv_psblas_major" == "xunknown"; then - { { $as_echo "$as_me:$LINENO: error: PSBLAS version major \"$pac_cv_psblas_major\"." >&5 -$as_echo "$as_me: error: PSBLAS version major \"$pac_cv_psblas_major\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "PSBLAS version major \"$pac_cv_psblas_major\"." "$LINENO" 5 fi if test "x$pac_cv_psblas_minor" == "xunknown"; then - { { $as_echo "$as_me:$LINENO: error: PSBLAS version minor \"$pac_cv_psblas_minor\"." >&5 -$as_echo "$as_me: error: PSBLAS version minor \"$pac_cv_psblas_minor\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "PSBLAS version minor \"$pac_cv_psblas_minor\"." "$LINENO" 5 fi if test "x$pac_cv_psblas_patchlevel" == "xunknown"; then - { { $as_echo "$as_me:$LINENO: error: PSBLAS patchlevel \"$pac_cv_psblas_patchlevel\"." >&5 -$as_echo "$as_me: error: PSBLAS patchlevel \"$pac_cv_psblas_patchlevel\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "PSBLAS patchlevel \"$pac_cv_psblas_patchlevel\"." "$LINENO" 5 fi if (( $pac_cv_psblas_major < 3 )) || ( (( $pac_cv_psblas_major == 3 )) && (( $pac_cv_psblas_minor < 4 ))) ; then - { { $as_echo "$as_me:$LINENO: error: I need at least PSBLAS version 3.4." >&5 -$as_echo "$as_me: error: I need at least PSBLAS version 3.4." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "I need at least PSBLAS version 3.4." "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.$pac_cv_psblas_patchlevel." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.$pac_cv_psblas_patchlevel." >&5 $as_echo "$as_me: Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.$pac_cv_psblas_patchlevel." >&6;} fi ############################################################################### @@ -7810,7 +6319,7 @@ AR="${AR} -cur" if test x"$pac_cv_serial_mpi" == x"yes" ; then FDEFINES="$psblas_cv_define_prepend-DSERIAL_MPI $psblas_cv_define_prepend-DMPI_MOD $FDEFINES"; else - { $as_echo "$as_me:$LINENO: checking for Fortran MPI mod" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran MPI mod" >&5 $as_echo_n "checking for Fortran MPI mod... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7820,44 +6329,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program test use mpi end program test _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7869,10 +6357,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: checking whether we want long (8 bytes) integers" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we want long (8 bytes) integers" >&5 $as_echo_n "checking whether we want long (8 bytes) integers... " >&6; } # Check whether --enable-long-integers was given. -if test "${enable_long_integers+set}" = set; then +if test "${enable_long_integers+set}" = set; then : enableval=$enable_long_integers; pac_cv_long_integers="yes"; @@ -7880,11 +6368,11 @@ pac_cv_long_integers="yes"; fi if test x"$pac_cv_long_integers" == x"yes" ; then - { $as_echo "$as_me:$LINENO: result: yes." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 $as_echo "yes." >&6; } else pac_cv_long_integers="no"; - { $as_echo "$as_me:$LINENO: result: no." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no." >&5 $as_echo "no." >&6; } fi @@ -7901,7 +6389,7 @@ fi ac_exeext='' ac_ext='f90' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ $as_echo "$as_me:$LINENO: checking support for Fortran EXTENDS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran EXTENDS" >&5 $as_echo_n "checking support for Fortran EXTENDS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7911,7 +6399,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program conftest type foo @@ -7923,43 +6411,19 @@ program conftest type(bar) :: barvar end program conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for EXTENDS. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&5 -$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for EXTENDS. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Sorry, cannot build PSBLAS without support for EXTENDS. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7969,7 +6433,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran CLASS TBP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran CLASS TBP" >&5 $as_echo_n "checking support for Fortran CLASS TBP... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7979,7 +6443,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF module conftest_mod type foo @@ -8010,43 +6474,19 @@ program conftest type(foo) :: foovar end program conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures. - Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.8." >&5 -$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for CLASS and type bound procedures. - Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.8." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Sorry, cannot build PSBLAS without support for CLASS and type bound procedures. + Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.8." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8056,7 +6496,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran SOURCE= allocation" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran SOURCE= allocation" >&5 $as_echo_n "checking support for Fortran SOURCE= allocation... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8066,7 +6506,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program xtt type foo @@ -8083,43 +6523,19 @@ program xtt end program xtt _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for SOURCE= allocation. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&5 -$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for SOURCE= allocation. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Sorry, cannot build PSBLAS without support for SOURCE= allocation. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8129,7 +6545,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran MOVE_ALLOC intrinsic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran MOVE_ALLOC intrinsic" >&5 $as_echo_n "checking support for Fortran MOVE_ALLOC intrinsic... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8137,7 +6553,7 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_ext='f90'; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program test_move_alloc integer, allocatable :: a(:), b(:) allocate(a(3)) @@ -8146,43 +6562,19 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu print *, b end program test_move_alloc _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&5 -$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for MOVE_ALLOC. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Sorry, cannot build PSBLAS without support for MOVE_ALLOC. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8192,7 +6584,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran ISO_C_BINDING module" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran ISO_C_BINDING module" >&5 $as_echo_n "checking support for Fortran ISO_C_BINDING module... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8202,49 +6594,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program conftest use iso_c_binding end program conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for ISO_C_BINDING. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&5 -$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for ISO_C_BINDING. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Sorry, cannot build PSBLAS without support for ISO_C_BINDING. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.8." "$LINENO" 5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8258,7 +6626,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Optional features # -{ $as_echo "$as_me:$LINENO: checking support for Fortran VOLATILE" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran VOLATILE" >&5 $as_echo_n "checking support for Fortran VOLATILE... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8268,44 +6636,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program conftest integer, volatile :: i, j end program conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8315,7 +6662,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking test GENERIC interfaces" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking test GENERIC interfaces" >&5 $as_echo_n "checking test GENERIC interfaces... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8325,7 +6672,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='F90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF module conftest @@ -8341,39 +6688,18 @@ module conftest end module conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 FDEFINES="$psblas_cv_define_prepend-DHAVE_BUGGY_GENERICS $FDEFINES" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8383,7 +6709,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran FLUSH statement" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran FLUSH statement" >&5 $as_echo_n "checking support for Fortran FLUSH statement... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8393,7 +6719,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program conftest integer :: iunit=10 @@ -8403,38 +6729,17 @@ program conftest close(10) end program conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8444,7 +6749,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for ISO_FORTRAN_ENV" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ISO_FORTRAN_ENV" >&5 $as_echo_n "checking support for ISO_FORTRAN_ENV... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8454,44 +6759,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program test use iso_fortran_env end program test _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_FORTRAN_ENV $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8501,7 +6785,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran FINAL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran FINAL" >&5 $as_echo_n "checking support for Fortran FINAL... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8511,7 +6795,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF module conftest_mod type foo @@ -8532,38 +6816,17 @@ program conftest type(foo) :: foovar end program conftest _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_FINAL $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8573,7 +6836,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran SAME_TYPE_AS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran SAME_TYPE_AS" >&5 $as_echo_n "checking support for Fortran SAME_TYPE_AS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8583,7 +6846,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program stt type foo @@ -8600,38 +6863,17 @@ program stt write(*,*) 'nfv2 == nfv1? ', same_type_as(nfv2,nfv1) end program stt _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_SAME_TYPE_AS $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8641,7 +6883,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran EXTENDS_TYPE_OF" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran EXTENDS_TYPE_OF" >&5 $as_echo_n "checking support for Fortran EXTENDS_TYPE_OF... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8651,7 +6893,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program xtt type foo @@ -8666,38 +6908,17 @@ program xtt write(*,*) 'nfv1 extends foov? ', extends_type_of(nfv1,foov) end program xtt _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_EXTENDS_TYPE_OF $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8707,7 +6928,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking support for Fortran MOLD= allocation" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking support for Fortran MOLD= allocation" >&5 $as_echo_n "checking support for Fortran MOLD= allocation... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8717,7 +6938,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_exeext='' ac_ext='f90' ac_fc=${MPIFC-$FC}; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program xtt type foo @@ -8734,38 +6955,17 @@ program xtt end program xtt _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_fc_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_MOLD $FDEFINES" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8796,7 +6996,7 @@ pac_blas_ok=no # Check whether --with-blas was given. -if test "${with_blas+set}" = set; then +if test "${with_blas+set}" = set; then : withval=$with_blas; fi @@ -8808,7 +7008,7 @@ case $with_blas in esac # Check whether --with-blasdir was given. -if test "${with_blasdir+set}" = set; then +if test "${with_blasdir+set}" = set; then : withval=$with_blasdir; fi @@ -8834,46 +7034,21 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test $pac_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $BLAS_LIBDIR $LIBS" - { $as_echo "$as_me:$LINENO: checking for sgemm in $BLAS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in $BLAS_LIBS" >&5 $as_echo_n "checking for sgemm in $BLAS_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : pac_blas_ok=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - BLAS_LIBS="" + BLAS_LIBS="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $pac_blas_ok" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_blas_ok" >&5 $as_echo "$pac_blas_ok" >&6; } LIBS="$save_LIBS" fi @@ -8888,18 +7063,14 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } -if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then +if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8917,115 +7088,61 @@ return ATL_xerbla (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_atlas_ATL_xerbla=no + ac_cv_lib_atlas_ATL_xerbla=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : 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 - { $as_echo "$as_me:$LINENO: checking for sgemm in -lf77blas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lf77blas" >&5 $as_echo_n "checking for sgemm in -lf77blas... " >&6; } -if test "${ac_cv_lib_f77blas_sgemm+set}" = set; then +if ${ac_cv_lib_f77blas_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_f77blas_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_f77blas_sgemm=no + ac_cv_lib_f77blas_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_f77blas_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_f77blas_sgemm" >&5 $as_echo "$ac_cv_lib_f77blas_sgemm" >&6; } -if test "x$ac_cv_lib_f77blas_sgemm" = x""yes; then +if test "x$ac_cv_lib_f77blas_sgemm" = xyes; then : ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } -if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then +if ${ac_cv_lib_cblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9043,43 +7160,18 @@ return cblas_dgemm (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_dgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_cblas_cblas_dgemm=no + ac_cv_lib_cblas_cblas_dgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } -if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then +if test "x$ac_cv_lib_cblas_cblas_dgemm" = xyes; then : pac_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas $BLAS_LIBDIR" fi @@ -9097,18 +7189,14 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -lsatlas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -lsatlas" >&5 $as_echo_n "checking for ATL_xerbla in -lsatlas... " >&6; } -if test "${ac_cv_lib_satlas_ATL_xerbla+set}" = set; then +if ${ac_cv_lib_satlas_ATL_xerbla+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsatlas $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9126,115 +7214,61 @@ return ATL_xerbla (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_satlas_ATL_xerbla=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_satlas_ATL_xerbla=no + ac_cv_lib_satlas_ATL_xerbla=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_satlas_ATL_xerbla" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_satlas_ATL_xerbla" >&5 $as_echo "$ac_cv_lib_satlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_satlas_ATL_xerbla" = x""yes; then +if test "x$ac_cv_lib_satlas_ATL_xerbla" = xyes; then : 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 - { $as_echo "$as_me:$LINENO: checking for sgemm in -lsatlas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lsatlas" >&5 $as_echo_n "checking for sgemm in -lsatlas... " >&6; } -if test "${ac_cv_lib_satlas_sgemm+set}" = set; then +if ${ac_cv_lib_satlas_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsatlas -lsatlas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_satlas_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_satlas_sgemm=no + ac_cv_lib_satlas_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_satlas_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_satlas_sgemm" >&5 $as_echo "$ac_cv_lib_satlas_sgemm" >&6; } -if test "x$ac_cv_lib_satlas_sgemm" = x""yes; then +if test "x$ac_cv_lib_satlas_sgemm" = xyes; then : ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lsatlas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lsatlas" >&5 $as_echo_n "checking for cblas_dgemm in -lsatlas... " >&6; } -if test "${ac_cv_lib_satlas_cblas_dgemm+set}" = set; then +if ${ac_cv_lib_satlas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsatlas -lsatlas $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9252,43 +7286,18 @@ return cblas_dgemm (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_satlas_cblas_dgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_satlas_cblas_dgemm=no + ac_cv_lib_satlas_cblas_dgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_satlas_cblas_dgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_satlas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_satlas_cblas_dgemm" >&6; } -if test "x$ac_cv_lib_satlas_cblas_dgemm" = x""yes; then +if test "x$ac_cv_lib_satlas_cblas_dgemm" = xyes; then : pac_blas_ok=yes BLAS_LIBS="-lsatlas $BLAS_LIBDIR" fi @@ -9307,153 +7316,78 @@ 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 - { $as_echo "$as_me:$LINENO: checking for sgemm in -lblas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lblas" >&5 $as_echo_n "checking for sgemm in -lblas... " >&6; } -if test "${ac_cv_lib_blas_sgemm+set}" = set; then +if ${ac_cv_lib_blas_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_blas_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_blas_sgemm=no + ac_cv_lib_blas_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blas_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blas_sgemm" >&5 $as_echo "$ac_cv_lib_blas_sgemm" >&6; } -if test "x$ac_cv_lib_blas_sgemm" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for dgemm in -ldgemm" >&5 +if test "x$ac_cv_lib_blas_sgemm" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgemm in -ldgemm" >&5 $as_echo_n "checking for dgemm in -ldgemm... " >&6; } -if test "${ac_cv_lib_dgemm_dgemm+set}" = set; then +if ${ac_cv_lib_dgemm_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call dgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_dgemm_dgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dgemm_dgemm=no + ac_cv_lib_dgemm_dgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dgemm_dgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgemm_dgemm" >&5 $as_echo "$ac_cv_lib_dgemm_dgemm" >&6; } -if test "x$ac_cv_lib_dgemm_dgemm" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for sgemm in -lsgemm" >&5 +if test "x$ac_cv_lib_dgemm_dgemm" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lsgemm" >&5 $as_echo_n "checking for sgemm in -lsgemm... " >&6; } -if test "${ac_cv_lib_sgemm_sgemm+set}" = set; then +if ${ac_cv_lib_sgemm_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sgemm_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sgemm_sgemm=no + ac_cv_lib_sgemm_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sgemm_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sgemm_sgemm" >&5 $as_echo "$ac_cv_lib_sgemm_sgemm" >&6; } -if test "x$ac_cv_lib_sgemm_sgemm" = x""yes; then +if test "x$ac_cv_lib_sgemm_sgemm" = xyes; then : pac_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas $BLAS_LIBDIR" fi @@ -9471,110 +7405,60 @@ 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 - { $as_echo "$as_me:$LINENO: checking for sgemm in -lopenblas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lopenblas" >&5 $as_echo_n "checking for sgemm in -lopenblas... " >&6; } -if test "${ac_cv_lib_openblas_sgemm+set}" = set; then +if ${ac_cv_lib_openblas_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lopenblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_openblas_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_openblas_sgemm=no + ac_cv_lib_openblas_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_openblas_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openblas_sgemm" >&5 $as_echo "$ac_cv_lib_openblas_sgemm" >&6; } -if test "x$ac_cv_lib_openblas_sgemm" = x""yes; then +if test "x$ac_cv_lib_openblas_sgemm" = xyes; then : pac_blas_ok=yes;BLAS_LIBS="-lopenblas $BLAS_LIBDIR" fi fi # BLAS in Alpha CXML library? if test $pac_blas_ok = no; then - { $as_echo "$as_me:$LINENO: checking for sgemm in -lcxml" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lcxml" >&5 $as_echo_n "checking for sgemm in -lcxml... " >&6; } -if test "${ac_cv_lib_cxml_sgemm+set}" = set; then +if ${ac_cv_lib_cxml_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_cxml_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_cxml_sgemm=no + ac_cv_lib_cxml_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cxml_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cxml_sgemm" >&5 $as_echo "$ac_cv_lib_cxml_sgemm" >&6; } -if test "x$ac_cv_lib_cxml_sgemm" = x""yes; then +if test "x$ac_cv_lib_cxml_sgemm" = xyes; then : pac_blas_ok=yes;BLAS_LIBS="-lcxml $BLAS_LIBDIR" fi @@ -9582,55 +7466,30 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $pac_blas_ok = no; then - { $as_echo "$as_me:$LINENO: checking for sgemm in -ldxml" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -ldxml" >&5 $as_echo_n "checking for sgemm in -ldxml... " >&6; } -if test "${ac_cv_lib_dxml_sgemm+set}" = set; then +if ${ac_cv_lib_dxml_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_dxml_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dxml_sgemm=no + ac_cv_lib_dxml_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dxml_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dxml_sgemm" >&5 $as_echo "$ac_cv_lib_dxml_sgemm" >&6; } -if test "x$ac_cv_lib_dxml_sgemm" = x""yes; then +if test "x$ac_cv_lib_dxml_sgemm" = xyes; then : pac_blas_ok=yes;BLAS_LIBS="-ldxml $BLAS_LIBDIR" fi @@ -9640,104 +7499,54 @@ fi # BLAS in Sun Performance library? if test $pac_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { $as_echo "$as_me:$LINENO: checking for acosp in -lsunmath" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 $as_echo_n "checking for acosp in -lsunmath... " >&6; } -if test "${ac_cv_lib_sunmath_acosp+set}" = set; then +if ${ac_cv_lib_sunmath_acosp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call acosp end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sunmath_acosp=no + ac_cv_lib_sunmath_acosp=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_acosp" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 $as_echo "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for sgemm in -lsunperf" >&5 +if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lsunperf" >&5 $as_echo_n "checking for sgemm in -lsunperf... " >&6; } -if test "${ac_cv_lib_sunperf_sgemm+set}" = set; then +if ${ac_cv_lib_sunperf_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sunperf_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sunperf_sgemm=no + ac_cv_lib_sunperf_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunperf_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunperf_sgemm" >&5 $as_echo "$ac_cv_lib_sunperf_sgemm" >&6; } -if test "x$ac_cv_lib_sunperf_sgemm" = x""yes; then +if test "x$ac_cv_lib_sunperf_sgemm" = xyes; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath $BLAS_LIBDIR" pac_blas_ok=yes fi @@ -9750,55 +7559,30 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $pac_blas_ok = no; then - { $as_echo "$as_me:$LINENO: checking for sgemm in -lscs" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lscs" >&5 $as_echo_n "checking for sgemm in -lscs... " >&6; } -if test "${ac_cv_lib_scs_sgemm+set}" = set; then +if ${ac_cv_lib_scs_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_scs_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_scs_sgemm=no + ac_cv_lib_scs_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_scs_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_scs_sgemm" >&5 $as_echo "$ac_cv_lib_scs_sgemm" >&6; } -if test "x$ac_cv_lib_scs_sgemm" = x""yes; then +if test "x$ac_cv_lib_scs_sgemm" = xyes; then : pac_blas_ok=yes; BLAS_LIBS="-lscs $BLAS_LIBDIR" fi @@ -9807,59 +7591,31 @@ fi # BLAS in SGIMATH library? if test $pac_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lcomplib.sgimath" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lcomplib.sgimath" >&5 $as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call $sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : pac_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath $BLAS_LIBDIR" fi @@ -9868,108 +7624,55 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $pac_blas_ok = no; then as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $sgemm in -lblas" >&5 $as_echo_n "checking for $sgemm in -lblas... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call $sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for sgemm in -lessl" >&5 +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lessl" >&5 $as_echo_n "checking for sgemm in -lessl... " >&6; } -if test "${ac_cv_lib_essl_sgemm+set}" = set; then +if ${ac_cv_lib_essl_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_essl_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_essl_sgemm=no + ac_cv_lib_essl_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_essl_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_essl_sgemm" >&5 $as_echo "$ac_cv_lib_essl_sgemm" >&6; } -if test "x$ac_cv_lib_essl_sgemm" = x""yes; then +if test "x$ac_cv_lib_essl_sgemm" = xyes; then : pac_blas_ok=yes; BLAS_LIBS="-lessl -lblas $BLAS_LIBDIR" fi @@ -9983,56 +7686,30 @@ 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 - -{ $as_echo "$as_me:$LINENO: checking for sgemm in -lblas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lblas" >&5 $as_echo_n "checking for sgemm in -lblas... " >&6; } -if test "${ac_cv_lib_blas_sgemm+set}" = set; then +if ${ac_cv_lib_blas_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_blas_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_blas_sgemm=no + ac_cv_lib_blas_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blas_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blas_sgemm" >&5 $as_echo "$ac_cv_lib_blas_sgemm" >&6; } -if test "x$ac_cv_lib_blas_sgemm" = x""yes; then +if test "x$ac_cv_lib_blas_sgemm" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBLAS 1 _ACEOF @@ -10047,43 +7724,18 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $pac_blas_ok = no; then - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : pac_blas_ok=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - BLAS_LIBS="" + BLAS_LIBS="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi # Generic BLAS library? @@ -10093,55 +7745,30 @@ 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 - { $as_echo "$as_me:$LINENO: checking for sgemm in -lblas" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sgemm in -lblas" >&5 $as_echo_n "checking for sgemm in -lblas... " >&6; } -if test "${ac_cv_lib_blas_sgemm+set}" = set; then +if ${ac_cv_lib_blas_sgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call sgemm end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_blas_sgemm=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_blas_sgemm=no + ac_cv_lib_blas_sgemm=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blas_sgemm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blas_sgemm" >&5 $as_echo "$ac_cv_lib_blas_sgemm" >&6; } -if test "x$ac_cv_lib_blas_sgemm" = x""yes; then +if test "x$ac_cv_lib_blas_sgemm" = xyes; then : pac_blas_ok=yes; BLAS_LIBS="-lblas $BLAS_LIBDIR" fi @@ -10153,16 +7780,12 @@ LIBS="$pac_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$pac_blas_ok" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_BLAS 1 -_ACEOF +$as_echo "#define HAVE_BLAS 1" >>confdefs.h : else pac_blas_ok=no - { { $as_echo "$as_me:$LINENO: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&5 -$as_echo "$as_me: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" "$LINENO" 5 fi @@ -10171,7 +7794,7 @@ pac_lapack_ok=no # Check whether --with-lapack was given. -if test "${with_lapack+set}" = set; then +if test "${with_lapack+set}" = set; then : withval=$with_lapack; fi @@ -10193,7 +7816,7 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { $as_echo "$as_me:$LINENO: checking for cheev in $LAPACK_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cheev in $LAPACK_LIBS" >&5 $as_echo_n "checking for cheev in $LAPACK_LIBS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -10205,16 +7828,16 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call cheev end EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pac_lapack_ok=yes - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -10235,7 +7858,7 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $pac_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - { $as_echo "$as_me:$LINENO: checking for cheev in default libs" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cheev in default libs" >&5 $as_echo_n "checking for cheev in default libs... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -10247,16 +7870,16 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call cheev end EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pac_lapack_ok=yes - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -10281,59 +7904,31 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_cheev" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for cheev in -l$lapack" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cheev in -l$lapack" >&5 $as_echo_n "checking for cheev in -l$lapack... " >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program main call cheev end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Lib'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : pac_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -10371,7 +7966,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --with-mumps was given. -if test "${with_mumps+set}" = set; then +if test "${with_mumps+set}" = set; then : withval=$with_mumps; mld2p4_cv_mumps=$withval else mld2p4_cv_mumps='-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common -lpord' @@ -10379,7 +7974,7 @@ fi # Check whether --with-mumpsdir was given. -if test "${with_mumpsdir+set}" = set; then +if test "${with_mumpsdir+set}" = set; then : withval=$with_mumpsdir; mld2p4_cv_mumpsdir=$withval else mld2p4_cv_mumpsdir='' @@ -10388,7 +7983,7 @@ fi # Check whether --with-mumpsincdir was given. -if test "${with_mumpsincdir+set}" = set; then +if test "${with_mumpsincdir+set}" = set; then : withval=$with_mumpsincdir; mld2p4_cv_mumpsincdir=$withval else mld2p4_cv_mumpsincdir='' @@ -10397,7 +7992,7 @@ fi # Check whether --with-mumpslibdir was given. -if test "${with_mumpslibdir+set}" = set; then +if test "${with_mumpslibdir+set}" = set; then : withval=$with_mumpslibdir; mld2p4_cv_mumpslibdir=$withval else mld2p4_cv_mumpslibdir='' @@ -10413,11 +8008,11 @@ save_LIBS="$LIBS" save_FC="$FC" FC=${MPIFC} if test "x$mld2p4_cv_mumpsincdir" != "x"; then - { $as_echo "$as_me:$LINENO: mumps dir $mld2p4_cv_mumpsincdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: mumps dir $mld2p4_cv_mumpsincdir" >&5 $as_echo "$as_me: mumps dir $mld2p4_cv_mumpsincdir" >&6;} MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsincdir" elif test "x$mld2p4_cv_mumpsdir" != "x"; then - { $as_echo "$as_me:$LINENO: mumps dir $mld2p4_cv_mumpsdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: mumps dir $mld2p4_cv_mumpsdir" >&5 $as_echo "$as_me: mumps dir $mld2p4_cv_mumpsdir" >&6;} MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsdir" fi @@ -10435,113 +8030,50 @@ ac_ext='f90' ac_fc="${MPIFC-$FC}"; save_FCFLAGS="$FCFLAGS"; FCFLAGS=" $MUMPS_INCLUDES $save_FCFLAGS" -cat >conftest.$ac_ext <<_ACEOF +cat > conftest.$ac_ext <<_ACEOF program test use dmumps_struc_def end program test _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : pac_mumps_header_ok=yes; mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES"; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - pac_mumps_header_ok=no; MUMPS_INCLUDES="" + pac_mumps_header_ok=no; MUMPS_INCLUDES="" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$pac_mumps_header_ok" == "xno" ; then MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsdir/include" FCFLAGS="$MUMPS_INCLUDES $save_CPPFLAGS" - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program test use dmumps_struc_def end program test -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : pac_mumps_header_ok=yes mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES"; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - pac_mumps_header_ok=no; MUMPS_INCLUDES="" + pac_mumps_header_ok=no; MUMPS_INCLUDES="" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x$pac_mumps_header_ok" == "xno" ; then MUMPS_INCLUDES="$FMFLAG$mld2p4_cv_mumpsdir/Include" FCFLAGS="$MUMPS_INCLUDES $save_CPPFLAGS" - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program test use dmumps_struc_def end program test _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_fc_try_compile "$LINENO"; then : pac_mumps_header_ok=yes mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES"; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - pac_mumps_header_ok=no; MUMPS_INCLUDES="" + pac_mumps_header_ok=no; MUMPS_INCLUDES="" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -10549,89 +8081,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$pac_mumps_header_ok" == "xyes" ; then MUMPS_LIBS="$mld2p4_cv_mumps $MUMPS_LIBS" LIBS="$MUMPS_LIBS $save_LIBS $EXTRA_LIBS"; - { $as_echo "$as_me:$LINENO: checking for dmumps in $MUMPS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dmumps in $MUMPS_LIBS" >&5 $as_echo_n "checking for dmumps in $MUMPS_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main call dmumps end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : mld2p4_cv_have_mumps=yes;pac_mumps_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_mumps=no;pac_mumps_lib_ok=no; + mld2p4_cv_have_mumps=no;pac_mumps_lib_ok=no; MUMPS_LIBS=""; fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "x$pac_mumps_lib_ok" == "xno" ; then MUMPS_LIBS="$mld2p4_cv_mumps -L$mld2p4_cv_mumpsdir/lib"; LIBS="$MUMPS_LIBS $save_LIBS $EXTRA_LIBS"; - cat >conftest.$ac_ext <<_ACEOF + cat > conftest.$ac_ext <<_ACEOF program main call dmumps end _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_fc_try_link "$LINENO"; then : mld2p4_cv_have_mumps=yes;pac_mumps_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_mumps=no;pac_mumps_lib_ok=no; + mld2p4_cv_have_mumps=no;pac_mumps_lib_ok=no; MUMPS_LIBS="";MUMPS_INCLUDES="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - { $as_echo "$as_me:$LINENO: result: $pac_mumps_lib_ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_mumps_lib_ok" >&5 $as_echo "$pac_mumps_lib_ok" >&6; } fi LIBS="$save_LIBS"; @@ -10653,7 +8135,7 @@ fi # Check whether --with-umfpack was given. -if test "${with_umfpack+set}" = set; then +if test "${with_umfpack+set}" = set; then : withval=$with_umfpack; mld2p4_cv_umfpack=$withval else mld2p4_cv_umfpack='-lumfpack -lamd' @@ -10661,7 +8143,7 @@ fi # Check whether --with-umfpackdir was given. -if test "${with_umfpackdir+set}" = set; then +if test "${with_umfpackdir+set}" = set; then : withval=$with_umfpackdir; mld2p4_cv_umfpackdir=$withval else mld2p4_cv_umfpackdir='' @@ -10669,7 +8151,7 @@ fi # Check whether --with-umfpackincdir was given. -if test "${with_umfpackincdir+set}" = set; then +if test "${with_umfpackincdir+set}" = set; then : withval=$with_umfpackincdir; mld2p4_cv_umfpackincdir=$withval else mld2p4_cv_umfpackincdir='' @@ -10677,7 +8159,7 @@ fi # Check whether --with-umfpacklibdir was given. -if test "${with_umfpacklibdir+set}" = set; then +if test "${with_umfpacklibdir+set}" = set; then : withval=$with_umfpacklibdir; mld2p4_cv_umfpacklibdir=$withval else mld2p4_cv_umfpacklibdir='' @@ -10692,590 +8174,66 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" save_CPPFLAGS="$CPPFLAGS" -if test "x$mld2p4_cv_umfpackincdir" != "x"; then - { $as_echo "$as_me:$LINENO: umfp include dir $mld2p4_cv_umfpackincdir" >&5 -$as_echo "$as_me: umfp include dir $mld2p4_cv_umfpackincdir" >&6;} - UMF_INCLUDES="-I$mld2p4_cv_umfpackincdir" -elif test "x$mld2p4_cv_umfpackdir" != "x"; then - { $as_echo "$as_me:$LINENO: umfp dir $mld2p4_cv_umfpackdir" >&5 -$as_echo "$as_me: umfp dir $mld2p4_cv_umfpackdir" >&6;} - UMF_INCLUDES="-I$mld2p4_cv_umfpackdir" -fi -CPPFLAGS="$UMF_INCLUDES $CPPFLAGS" -if test "${ac_cv_header_umfpack_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking umfpack.h usability" >&5 -$as_echo_n "checking umfpack.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking umfpack.h presence" >&5 -$as_echo_n "checking umfpack.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: umfpack.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: umfpack.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: umfpack.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: umfpack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_umfpack_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } - -fi -if test "x$ac_cv_header_umfpack_h" = x""yes; then - pac_umf_header_ok=yes -else - pac_umf_header_ok=no; UMF_INCLUDES="" -fi - - -if test "x$mld2p4_cv_umfpacklibdir" != "x"; then - LIBS="-L$mld2p4_cv_umfpacklibdir $LIBS $EXTRA_LIBS" - UMF_LIBDIR="-L$mld2p4_cv_umfpacklibdir" -elif test "x$mld2p4_cv_umfpackdir" != "x"; then - LIBS="-L$mld2p4_cv_umfpackdir $LIBS $EXTRA_LIBS" - UMF_LIBDIR="-L$mld2p4_cv_umfpackdir" -fi -if test "x$pac_umf_header_ok" == "xno" ; then - unset ac_cv_header_umfpack_h - UMF_INCLUDES="-I$mld2p4_cv_umfpackdir" - CPPFLAGS="$UMF_INCLUDES $SAVE_CPPFLAGS" - if test "${ac_cv_header_umfpack_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking umfpack.h usability" >&5 -$as_echo_n "checking umfpack.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking umfpack.h presence" >&5 -$as_echo_n "checking umfpack.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: umfpack.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: umfpack.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: umfpack.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: umfpack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_umfpack_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } - -fi -if test "x$ac_cv_header_umfpack_h" = x""yes; then - pac_umf_header_ok=yes -else - pac_umf_header_ok=no; UMF_INCLUDES="" -fi - - -fi -if test "x$pac_umf_header_ok" == "xno" ; then - unset ac_cv_header_umfpack_h - UMF_INCLUDES="-I$mld2p4_cv_umfpackdir/include -I$mld2p4_cv_umfpackdir/Include " - CPPFLAGS="$UMF_INCLUDES $SAVE_CPPFLAGS" - - { $as_echo "$as_me:$LINENO: checking for umfpack_di_symbolic in $UMF_INCLUDES" >&5 -$as_echo_n "checking for umfpack_di_symbolic in $UMF_INCLUDES... " >&6; } - if test "${ac_cv_header_umfpack_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking umfpack.h usability" >&5 -$as_echo_n "checking umfpack.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking umfpack.h presence" >&5 -$as_echo_n "checking umfpack.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: umfpack.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: umfpack.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: umfpack.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: umfpack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_umfpack_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } - +if test "x$mld2p4_cv_umfpackincdir" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: umfp include dir $mld2p4_cv_umfpackincdir" >&5 +$as_echo "$as_me: umfp include dir $mld2p4_cv_umfpackincdir" >&6;} + UMF_INCLUDES="-I$mld2p4_cv_umfpackincdir" +elif test "x$mld2p4_cv_umfpackdir" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: umfp dir $mld2p4_cv_umfpackdir" >&5 +$as_echo "$as_me: umfp dir $mld2p4_cv_umfpackdir" >&6;} + UMF_INCLUDES="-I$mld2p4_cv_umfpackdir" fi -if test "x$ac_cv_header_umfpack_h" = x""yes; then +CPPFLAGS="$UMF_INCLUDES $CPPFLAGS" +ac_fn_c_check_header_mongrel "$LINENO" "umfpack.h" "ac_cv_header_umfpack_h" "$ac_includes_default" +if test "x$ac_cv_header_umfpack_h" = xyes; then : pac_umf_header_ok=yes else pac_umf_header_ok=no; UMF_INCLUDES="" fi +if test "x$mld2p4_cv_umfpacklibdir" != "x"; then + LIBS="-L$mld2p4_cv_umfpacklibdir $LIBS $EXTRA_LIBS" + UMF_LIBDIR="-L$mld2p4_cv_umfpacklibdir" +elif test "x$mld2p4_cv_umfpackdir" != "x"; then + LIBS="-L$mld2p4_cv_umfpackdir $LIBS $EXTRA_LIBS" + UMF_LIBDIR="-L$mld2p4_cv_umfpackdir" fi if test "x$pac_umf_header_ok" == "xno" ; then - unset ac_cv_header_umfpack_h - UMF_INCLUDES="-I$mld2p4_cv_umfpackdir/UFconfig -I$mld2p4_cv_umfpackdir/UMFPACK/Include -I$mld2p4_cv_umfpackdir/AMD/Include" - CPPFLAGS="$UMF_INCLUDES $SAVE_CPPFLAGS" - if test "${ac_cv_header_umfpack_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking umfpack.h usability" >&5 -$as_echo_n "checking umfpack.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + unset ac_cv_header_umfpack_h + UMF_INCLUDES="-I$mld2p4_cv_umfpackdir" + CPPFLAGS="$UMF_INCLUDES $SAVE_CPPFLAGS" + ac_fn_c_check_header_mongrel "$LINENO" "umfpack.h" "ac_cv_header_umfpack_h" "$ac_includes_default" +if test "x$ac_cv_header_umfpack_h" = xyes; then : + pac_umf_header_ok=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + pac_umf_header_ok=no; UMF_INCLUDES="" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking umfpack.h presence" >&5 -$as_echo_n "checking umfpack.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi +if test "x$pac_umf_header_ok" == "xno" ; then + unset ac_cv_header_umfpack_h + UMF_INCLUDES="-I$mld2p4_cv_umfpackdir/include -I$mld2p4_cv_umfpackdir/Include " + CPPFLAGS="$UMF_INCLUDES $SAVE_CPPFLAGS" -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: umfpack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: umfpack.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: umfpack.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: umfpack.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: umfpack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: umfpack.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: umfpack.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: umfpack.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for umfpack.h" >&5 -$as_echo_n "checking for umfpack.h... " >&6; } -if test "${ac_cv_header_umfpack_h+set}" = set; then - $as_echo_n "(cached) " >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_symbolic in $UMF_INCLUDES" >&5 +$as_echo_n "checking for umfpack_di_symbolic in $UMF_INCLUDES... " >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "umfpack.h" "ac_cv_header_umfpack_h" "$ac_includes_default" +if test "x$ac_cv_header_umfpack_h" = xyes; then : + pac_umf_header_ok=yes else - ac_cv_header_umfpack_h=$ac_header_preproc + pac_umf_header_ok=no; UMF_INCLUDES="" fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_umfpack_h" >&5 -$as_echo "$ac_cv_header_umfpack_h" >&6; } + fi -if test "x$ac_cv_header_umfpack_h" = x""yes; then +if test "x$pac_umf_header_ok" == "xno" ; then + unset ac_cv_header_umfpack_h + UMF_INCLUDES="-I$mld2p4_cv_umfpackdir/UFconfig -I$mld2p4_cv_umfpackdir/UMFPACK/Include -I$mld2p4_cv_umfpackdir/AMD/Include" + CPPFLAGS="$UMF_INCLUDES $SAVE_CPPFLAGS" + ac_fn_c_check_header_mongrel "$LINENO" "umfpack.h" "ac_cv_header_umfpack_h" "$ac_includes_default" +if test "x$ac_cv_header_umfpack_h" = xyes; then : pac_umf_header_ok=yes else pac_umf_header_ok=no; UMF_INCLUDES="" @@ -11288,13 +8246,9 @@ fi if test "x$pac_umf_header_ok" == "xyes" ; then UMF_LIBS="$mld2p4_cv_umfpack $UMF_LIBDIR" LIBS="$UMF_LIBS -lm $LIBS $EXTRA_LIBS"; - { $as_echo "$as_me:$LINENO: checking for umfpack_di_symbolic in $UMF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_symbolic in $UMF_LIBS" >&5 $as_echo_n "checking for umfpack_di_symbolic in $UMF_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11312,52 +8266,23 @@ return umfpack_di_symbolic (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_umfpack=yes;pac_umf_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS="" + mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $pac_umf_lib_ok" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_umf_lib_ok" >&5 $as_echo "$pac_umf_lib_ok" >&6; } if test "x$pac_umf_lib_ok" == "xno" ; then UMF_LIBDIR="-L$mld2p4_cv_umfpackdir/Lib -L$mld2p4_cv_umfpackdir/lib" UMF_LIBS="$mld2p4_cv_umfpack $UMF_LIBDIR -lm $SAVE_LIBS $EXTRA_LIBS" LIBS="$UMF_LIBS" - { $as_echo "$as_me:$LINENO: checking for umfpack_di_symbolic in $UMF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_symbolic in $UMF_LIBS" >&5 $as_echo_n "checking for umfpack_di_symbolic in $UMF_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11375,52 +8300,23 @@ return umfpack_di_symbolic (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_umfpack=yes;pac_umf_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS="" + mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $pac_umf_lib_ok" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_umf_lib_ok" >&5 $as_echo "$pac_umf_lib_ok" >&6; } fi if test "x$pac_umf_lib_ok" == "xno" ; then UMF_LIBDIR="-L$mld2p4_cv_umfpackdir/AMD/Lib -L$mld2p4_cv_umfpackdir/UMFPACK/Lib" UMF_LIBS="$mld2p4_cv_umfpack $UMF_LIBDIR -lm $SAVE_LIBS $EXTRA_LIBS" LIBS="$UMF_LIBS" - { $as_echo "$as_me:$LINENO: checking for umfpack_di_symbolic in $UMF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for umfpack_di_symbolic in $UMF_LIBS" >&5 $as_echo_n "checking for umfpack_di_symbolic in $UMF_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11438,39 +8334,14 @@ return umfpack_di_symbolic (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_umfpack=yes;pac_umf_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS="" + mld2p4_cv_have_umfpack=no;pac_umf_lib_ok=no; UMF_LIBS="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $pac_umf_lib_ok" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_umf_lib_ok" >&5 $as_echo "$pac_umf_lib_ok" >&6; } fi fi @@ -11492,7 +8363,7 @@ fi # Check whether --with-superlu was given. -if test "${with_superlu+set}" = set; then +if test "${with_superlu+set}" = set; then : withval=$with_superlu; mld2p4_cv_superlu=$withval else mld2p4_cv_superlu='-lsuperlu' @@ -11500,7 +8371,7 @@ fi # Check whether --with-superludir was given. -if test "${with_superludir+set}" = set; then +if test "${with_superludir+set}" = set; then : withval=$with_superludir; mld2p4_cv_superludir=$withval else mld2p4_cv_superludir='' @@ -11508,7 +8379,7 @@ fi # Check whether --with-superluincdir was given. -if test "${with_superluincdir+set}" = set; then +if test "${with_superluincdir+set}" = set; then : withval=$with_superluincdir; mld2p4_cv_superluincdir=$withval else mld2p4_cv_superluincdir='' @@ -11516,7 +8387,7 @@ fi # Check whether --with-superlulibdir was given. -if test "${with_superlulibdir+set}" = set; then +if test "${with_superlulibdir+set}" = set; then : withval=$with_superlulibdir; mld2p4_cv_superlulibdir=$withval else mld2p4_cv_superlulibdir='' @@ -11531,325 +8402,47 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu save_LIBS="$LIBS" save_CPPFLAGS="$CPPFLAGS" if test "x$mld2p4_cv_superluincdir" != "x"; then - { $as_echo "$as_me:$LINENO: slu include dir $mld2p4_cv_superluincdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: slu include dir $mld2p4_cv_superluincdir" >&5 $as_echo "$as_me: slu include dir $mld2p4_cv_superluincdir" >&6;} SLU_INCLUDES="-I$mld2p4_cv_superluincdir" elif test "x$mld2p4_cv_superludir" != "x"; then - { $as_echo "$as_me:$LINENO: slu dir $mld2p4_cv_superludir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: slu dir $mld2p4_cv_superludir" >&5 $as_echo "$as_me: slu dir $mld2p4_cv_superludir" >&6;} SLU_INCLUDES="-I$mld2p4_cv_superludir" fi -if test "x$mld2p4_cv_superlulibdir" != "x"; then - SLU_LIBS="-L$mld2p4_cv_superlulibdir" -elif test "x$mld2p4_cv_superludir" != "x"; then - SLU_LIBS="-L$mld2p4_cv_superludir" -fi - -LIBS="$SLU_LIBS $LIBS" -CPPFLAGS="$SLU_INCLUDES $save_CPPFLAGS" - -for ac_header in slu_ddefs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - pac_slu_header_ok=yes -else - pac_slu_header_ok=no; SLU_INCLUDES="" -fi - -done - -if test "x$pac_slu_header_ok" == "xno" ; then - unset ac_cv_header_slu_ddefs_h - SLU_INCLUDES="-I$mld2p4_cv_superludir/include -I$mld2p4_cv_superludir/Include " - CPPFLAGS="$SLU_INCLUDES $save_CPPFLAGS" - - -for ac_header in slu_ddefs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no +if test "x$mld2p4_cv_superlulibdir" != "x"; then + SLU_LIBS="-L$mld2p4_cv_superlulibdir" +elif test "x$mld2p4_cv_superludir" != "x"; then + SLU_LIBS="-L$mld2p4_cv_superludir" fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +LIBS="$SLU_LIBS $LIBS" +CPPFLAGS="$SLU_INCLUDES $save_CPPFLAGS" +for ac_header in slu_ddefs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "slu_ddefs.h" "ac_cv_header_slu_ddefs_h" "$ac_includes_default" +if test "x$ac_cv_header_slu_ddefs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SLU_DDEFS_H 1 +_ACEOF + pac_slu_header_ok=yes else - eval "$as_ac_Header=\$ac_header_preproc" + pac_slu_header_ok=no; SLU_INCLUDES="" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +done + +if test "x$pac_slu_header_ok" == "xno" ; then + unset ac_cv_header_slu_ddefs_h + SLU_INCLUDES="-I$mld2p4_cv_superludir/include -I$mld2p4_cv_superludir/Include " + CPPFLAGS="$SLU_INCLUDES $save_CPPFLAGS" + + for ac_header in slu_ddefs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "slu_ddefs.h" "ac_cv_header_slu_ddefs_h" "$ac_includes_default" +if test "x$ac_cv_header_slu_ddefs_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SLU_DDEFS_H 1 _ACEOF pac_slu_header_ok=yes else @@ -11863,13 +8456,9 @@ fi if test "x$pac_slu_header_ok" == "xyes" ; then SLU_LIBS="$mld2p4_cv_superlu $SLU_LIBS" LIBS="$SLU_LIBS -lm $save_LIBS"; - { $as_echo "$as_me:$LINENO: checking for superlu_malloc in $SLU_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu_malloc in $SLU_LIBS" >&5 $as_echo_n "checking for superlu_malloc in $SLU_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11887,46 +8476,17 @@ return superlu_malloc (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_superlu=yes;pac_slu_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; + mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "x$pac_slu_lib_ok" == "xno" ; then SLU_LIBS="$mld2p4_cv_superlu -L$mld2p4_cv_superludir/lib"; LIBS="$SLU_LIBS -lm $save_LIBS"; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11944,47 +8504,18 @@ return superlu_malloc (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_superlu=yes;pac_slu_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; SLU_INCLUDES="" + mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; SLU_INCLUDES="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi if test "x$pac_slu_lib_ok" == "xno" ; then SLU_LIBS="$mld2p4_cv_superlu -L$mld2p4_cv_superludir/lib64"; LIBS="$SLU_LIBS -lm $save_LIBS"; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12002,44 +8533,19 @@ return superlu_malloc (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_superlu=yes;pac_slu_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; SLU_INCLUDES="" + mld2p4_cv_have_superlu=no;pac_slu_lib_ok=no; SLU_LIBS=""; SLU_INCLUDES="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - { $as_echo "$as_me:$LINENO: result: $pac_slu_lib_ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_slu_lib_ok" >&5 $as_echo "$pac_slu_lib_ok" >&6; } fi if test "x$pac_slu_header_ok" == "xyes" ; then - { $as_echo "$as_me:$LINENO: checking for superlu version 5" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu version 5" >&5 $as_echo_n "checking for superlu version 5... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12047,11 +8553,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "slu_ddefs.h" int testdslu() @@ -12064,34 +8566,13 @@ cat >>conftest.$ac_ext <<_ACEOF } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; pac_slu_version="5"; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; pac_slu_version="4"; fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12119,7 +8600,7 @@ fi # Check whether --with-superludist was given. -if test "${with_superludist+set}" = set; then +if test "${with_superludist+set}" = set; then : withval=$with_superludist; mld2p4_cv_superludist=$withval else mld2p4_cv_superludist='-lsuperlu_dist' @@ -12127,7 +8608,7 @@ fi # Check whether --with-superludistdir was given. -if test "${with_superludistdir+set}" = set; then +if test "${with_superludistdir+set}" = set; then : withval=$with_superludistdir; mld2p4_cv_superludistdir=$withval else mld2p4_cv_superludistdir='' @@ -12136,7 +8617,7 @@ fi # Check whether --with-superludistincdir was given. -if test "${with_superludistincdir+set}" = set; then +if test "${with_superludistincdir+set}" = set; then : withval=$with_superludistincdir; mld2p4_cv_superludistincdir=$withval else mld2p4_cv_superludistincdir='' @@ -12145,7 +8626,7 @@ fi # Check whether --with-superludistlibdir was given. -if test "${with_superludistlibdir+set}" = set; then +if test "${with_superludistlibdir+set}" = set; then : withval=$with_superludistlibdir; mld2p4_cv_superludistlibdir=$withval else mld2p4_cv_superludistlibdir='' @@ -12164,11 +8645,11 @@ save_CC="$CC" CC=${MPICC} CPP="${CC} -E" if test "x$mld2p4_cv_superludistincdir" != "x"; then - { $as_echo "$as_me:$LINENO: sludist dir $mld2p4_cv_superludistincdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: sludist dir $mld2p4_cv_superludistincdir" >&5 $as_echo "$as_me: sludist dir $mld2p4_cv_superludistincdir" >&6;} SLUDIST_INCLUDES="-I$mld2p4_cv_superludistincdir" elif test "x$mld2p4_cv_superludistdir" != "x"; then - { $as_echo "$as_me:$LINENO: sludist dir $mld2p4_cv_superludistdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: sludist dir $mld2p4_cv_superludistdir" >&5 $as_echo "$as_me: sludist dir $mld2p4_cv_superludistdir" >&6;} SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir" fi @@ -12181,151 +8662,12 @@ fi LIBS="$SLUDIST_LIBS $save_LIBS" CPPFLAGS="$SLUDIST_INCLUDES $save_CPPFLAGS" - for ac_header in superlu_ddefs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "superlu_ddefs.h" "ac_cv_header_superlu_ddefs_h" "$ac_includes_default" +if test "x$ac_cv_header_superlu_ddefs_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SUPERLU_DDEFS_H 1 _ACEOF pac_sludist_header_ok=yes else @@ -12339,151 +8681,12 @@ if test "x$pac_sludist_header_ok" == "xno" ; then SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir/include -I$mld2p4_cv_superludistdir/Include" CPPFLAGS="$SLUDIST_INCLUDES $save_CPPFLAGS" - -for ac_header in superlu_ddefs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------------- ## -## Report this to bugreport@mld2p4.it ## -## ---------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_header in superlu_ddefs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "superlu_ddefs.h" "ac_cv_header_superlu_ddefs_h" "$ac_includes_default" +if test "x$ac_cv_header_superlu_ddefs_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SUPERLU_DDEFS_H 1 _ACEOF pac_sludist_header_ok=yes else @@ -12497,13 +8700,9 @@ fi if test "x$pac_sludist_header_ok" == "xyes" ; then SLUDIST_LIBS="$mld2p4_cv_superludist $SLUDIST_LIBS" LIBS="$SLUDIST_LIBS -lm $save_LIBS"; - { $as_echo "$as_me:$LINENO: checking for superlu_malloc_dist in $SLUDIST_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu_malloc_dist in $SLUDIST_LIBS" >&5 $as_echo_n "checking for superlu_malloc_dist in $SLUDIST_LIBS... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12521,47 +8720,18 @@ return superlu_malloc_dist (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_superludist=yes;pac_sludist_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_superludist=no;pac_sludist_lib_ok=no; + mld2p4_cv_have_superludist=no;pac_sludist_lib_ok=no; SLUDIST_LIBS=""; fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "x$pac_sludist_lib_ok" == "xno" ; then SLUDIST_LIBS="$mld2p4_cv_superludist -L$mld2p4_cv_superludistdir/lib"; LIBS="$SLUDIST_LIBS -lm $save_LIBS"; - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12579,43 +8749,18 @@ return superlu_malloc_dist (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : mld2p4_cv_have_superludist=yes;pac_sludist_lib_ok=yes; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mld2p4_cv_have_superludist=no;pac_sludist_lib_ok=no; + mld2p4_cv_have_superludist=no;pac_sludist_lib_ok=no; SLUDIST_LIBS="";SLUDIST_INCLUDES="" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - { $as_echo "$as_me:$LINENO: result: $pac_sludist_lib_ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_sludist_lib_ok" >&5 $as_echo "$pac_sludist_lib_ok" >&6; } - { $as_echo "$as_me:$LINENO: checking for superlu_dist version 4" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu_dist version 4" >&5 $as_echo_n "checking for superlu_dist version 4... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12624,47 +8769,22 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_cc=${MPICC-$CC} - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "superlu_ddefs.h" int testdslud() { LUstruct_t *LUstruct; - int n; - LUstructInit(n, LUstruct); - } -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + int n; + LUstructInit(n, LUstruct); + } +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; pac_sludist_version="4"; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; pac_sludist_version="3"; fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12673,7 +8793,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$pac_sludist_version" == "x4" ; then - { $as_echo "$as_me:$LINENO: checking for superlu_dist version 5" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for superlu_dist version 5" >&5 $as_echo_n "checking for superlu_dist version 5... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12682,11 +8802,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_cc=${MPICC-$CC} - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "superlu_ddefs.h" int testdslud() @@ -12695,34 +8811,13 @@ cat >>conftest.$ac_ext <<_ACEOF set_default_options_dist(&options); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; pac_sludist_version="5"; else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; pac_sludist_version="4"; fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12765,28 +8860,21 @@ if test "x$pac_cv_status_file" != "xNONE"; then COMPILERULES=''; else COMPILERULES=' -F90LINK=$(MPF90) -FLINK=$(MPF77) +FLINK=$(MPF90) # These should be portable rules, arent they? .c.o: $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< -o $@ -.f.o: - $(FC) $(FCOPT) $(FINCLUDES) -c $< -o $@ .f90.o: - $(F90) $(FCOPT) $(FINCLUDES) -c $< -o $@ -.F.o: - $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< -o $@ + $(FC) $(FCOPT) $(FINCLUDES) -c $< -o $@ .F90.o: - $(F90) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< -o $@' + $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< -o $@' COMPILERULES=" # The following ones are the variables used by the PSBLAS make scripts. -F90=$F90 FC=$FC CC=$CC -F90COPT=$F90COPT FCOPT=$FCOPT CCOPT=$CCOPT FMFLAG=$FMFLAG @@ -12802,8 +8890,7 @@ LIBS=$LIBS BLAS=$BLAS_LIBS # These three should be always set! -MPF90=$MPF90 -MPF77=$MPF77 +MPFC=$MPFC MPCC=$MPCC AR=$AR @@ -12876,13 +8963,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -12890,8 +8977,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -12913,12 +9000,23 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -12968,20 +9066,29 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -12991,27 +9098,22 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -13021,17 +9123,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -13039,23 +9142,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -13063,7 +9158,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -13074,7 +9175,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -13097,13 +9198,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -13113,15 +9207,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -13133,12 +9228,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -13150,7 +9249,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -13164,8 +9345,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -13185,76 +9370,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -13269,49 +9403,85 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -13321,13 +9491,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by MLD2P4 $as_me 2.0, which was -generated by GNU Autoconf 2.63. Invocation command line was +This file was extended by MLD2P4 $as_me 2.1, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13355,13 +9531,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -13375,16 +9553,17 @@ $config_files Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -MLD2P4 config.status 2.0 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +MLD2P4 config.status 2.1 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13402,11 +9581,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -13420,14 +9604,17 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -13436,11 +9623,10 @@ do ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -13457,7 +9643,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -13494,9 +9680,7 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Make.inc") CONFIG_FILES="$CONFIG_FILES Make.inc" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -13518,26 +9702,24 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -13545,7 +9727,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -13553,7 +9741,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -13562,24 +9750,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -13587,7 +9769,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -13601,7 +9783,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -13615,7 +9797,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -13635,7 +9817,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -13667,23 +9849,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -13701,9 +9889,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -13722,7 +9908,7 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -13731,12 +9917,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -13747,7 +9931,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -13759,10 +9943,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -13790,47 +9972,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -13887,7 +10029,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -13897,12 +10038,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -13912,7 +10052,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -13940,31 +10080,28 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -13972,7 +10109,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -13985,7 +10122,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -14019,21 +10156,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -14059,47 +10194,7 @@ $as_echo X"$file" | q } s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done @@ -14111,15 +10206,12 @@ $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -14140,17 +10232,17 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ############################################################################### -{ $as_echo "$as_me:$LINENO: +{ $as_echo "$as_me:${as_lineno-$LINENO}: ${PACKAGE_NAME} ${mld2p4_cv_version} has been configured as follows: PSBLAS library : ${PSBLAS_DIR} diff --git a/configure.ac b/configure.ac index 16e8db5b..d369a078 100755 --- a/configure.ac +++ b/configure.ac @@ -34,11 +34,11 @@ dnl NOTE : odd configurations like ifc + gcc still await in the mist of the unkn ############################################################################### # NOTE: the literal for version (the second argument to AC_INIT should be a literal!) -AC_INIT([MLD2P4],2.0, bugreport@mld2p4.it) +AC_INIT([MLD2P4],2.1, bugreport@mld2p4.it) # VERSION is the file containing the PSBLAS version code # FIXME -mld2p4_cv_version="2.0" +mld2p4_cv_version="2.1" # A sample source file AC_CONFIG_SRCDIR([mlprec/mld_prec_type.f90]) @@ -119,13 +119,26 @@ case $samplesdir in esac AC_MSG_RESULT([$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR $INSTALL_SAMPLESDIR]) -############################################################################### -# Compilers detection: FC,F77,CC should be set, if found. -############################################################################### +dnl +dnl We set our own FC flags, ignore those from AC_PROG_FC but not those from the +dnl environment variable. Same for C +dnl +save_FCFLAGS="$FCFLAGS"; AC_PROG_FC([ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran]) -AC_PROG_CC([xlc pgcc icc gcc cc]) +FCFLAGS="$save_FCFLAGS"; +save_CFLAGS="$CFLAGS"; +AC_PROG_CC([xlc pgcc icc gcc cc ]) +CFLAGS="$save_CFLAGS"; dnl AC_PROG_CXX +dnl AC_PROG_F90 doesn't exist, at the time of writing this ! +dnl AC_PROG_F90 + +# Sanity checks, although redundant (useful when debugging this configure.ac)! +if test "X$FC" == "X" ; then + AC_MSG_ERROR([Problem : No Fortran compiler specified nor found!]) +fi + if test "X$CC" == "X" ; then AC_MSG_ERROR([Problem : No C compiler specified nor found!]) fi @@ -137,7 +150,7 @@ if eval "$FC -qversion 2>&1 | grep XL 2>/dev/null" ; then FDEFINES="$mld_cv_define_prepend-DXLF_10 $FDEFINES" fi - # Note : there coule be problems with old xlf compiler versions ( <10.1 ) + # Note : there could be problems with old xlf compiler versions ( <10.1 ) # since (as far as it is known to us) -WF, is not used in earlier versions. # More problems could be undocumented yet. fi @@ -153,7 +166,6 @@ PAC_ARG_SERIAL_MPI if test x"$pac_cv_serial_mpi" == x"yes" ; then FAKEMPI="fakempi.o"; MPIFC="$FC"; - MPIF77="$F77"; MPICC="$CC"; else AC_LANG([C]) @@ -173,23 +185,13 @@ fi ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran]])]) -AC_LANG(Fortran 77) -if test "X$MPIF77" = "X" ; then - # This is our MPIFC compiler preference: it will override ACX_MPI's first try. - AC_CHECK_PROGS([MPIF77],[mpxlf mpf77 mpif77 ftn]) -fi -ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran 77]])]) FC="$MPIFC" ; -F77="$MPIF77"; CC="$MPICC"; fi - -# We leave a default language for the next checks. -dnl AC_LANG([Fortran 77]) AC_LANG([C]) -dnl Now on, MPIFC should be set, as MPIF77 and MPICC +dnl Now on, MPIFC should be set, and MPICC ############################################################################### # Sanity checks, although redundant (useful when debugging this configure.ac)! @@ -210,8 +212,6 @@ fi dnl NOTE : no spaces before the comma, and no brackets before the second argument! PAC_ARG_WITH_FLAGS(ccopt,CCOPT) PAC_ARG_WITH_FLAGS(fcopt,FCOPT) -#PAC_ARG_WITH_FLAGS(f90copt,F90COPT) -#PAC_ARG_WITH_FLAGS(ldflags,LDFLAGS) PAC_ARG_WITH_LIBS PAC_ARG_WITH_FLAGS(clibs,CLIBS) PAC_ARG_WITH_FLAGS(flibs,FLIBS) @@ -229,8 +229,12 @@ PAC_ARG_WITH_EXTRA_LIBS ############################################################################### ############################################################################### -# PSBLAS library presence checks +# Compiler identification (sadly, it is necessary) ############################################################################### +psblas_cv_fc="" + +dnl Do we use gfortran & co ? Compiler identification. +dnl NOTE : in /autoconf/autoconf/fortran.m4 there are plenty of better tests! PAC_CHECK_HAVE_GFORTRAN( [psblas_cv_fc="gcc"], @@ -268,7 +272,6 @@ if test x"$psblas_cv_fc" == "x" ; then elif eval "$MPIFC -v 2>&1 | grep NAG 2>/dev/null" ; then psblas_cv_fc="nag" FC="$MPIFC" - F77="$MPIFC" else psblas_cv_fc="" # unsupported MPI Fortran compiler @@ -282,6 +285,12 @@ PAC_HAVE_MODERN_GFORTRAN( ) fi + +############################################################################### +# Linking, symbol mangling, and misc tests +############################################################################### + +# Note : This is functional to Make.inc rules and structure (see below). AC_LANG([C]) AC_CHECK_SIZEOF(void *) # Define for platforms with 64 bit (void * ) pointers @@ -289,10 +298,6 @@ if test X"$ac_cv_sizeof_void_p" == X"8" ; then CDEFINES="-DPtr64Bits $CDEFINES" fi AC_LANG([Fortran]) -if test "X$psblas_cv_fc" == X"pg" ; then - save_FC=$FC - FC=$F77 -fi __AC_FC_NAME_MANGLING if test "X$psblas_cv_fc" == X"pg" ; then FC=$save_FC @@ -350,8 +355,10 @@ AC_MSG_RESULT([ $pac_f_c_names ]) ############################################################################### # Make.inc generation logic ############################################################################### -F90COPT="$FCOPT" - +# Honor CFLAGS if they were specified explicitly, but --with-ccopt take precedence +if test "X$CCOPT" == "X" ; then + CCOPT="$CFLAGS"; +fi if test "X$CCOPT" == "X" ; then if test "X$psblas_cv_fc" == "Xgcc" ; then # note that no space should be placed around the equality symbol in assignements @@ -383,6 +390,10 @@ if test "X$CCOPT" == "X" ; then fi #CFLAGS="${CCOPT}" +# Honor FCFLAGS if they were specified explicitly, but --with-fcopt take precedence +if test "X$FCOPT" == "X" ; then + FCOPT="$FCFLAGS"; +fi if test "X$FCOPT" == "X" ; then if test "X$psblas_cv_fc" == "Xgcc" ; then # note that no space should be placed around the equality symbol in assignations @@ -414,60 +425,24 @@ if test "X$FCOPT" == "X" ; then fi if test "X$psblas_cv_fc" == X"nag" ; then # Add needed options - FCOPT="$FCOPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv" -fi -#FFLAGS="${FCOPT}" - -if test "X$F90COPT" == "X" ; then - if test "X$psblas_cv_fc" == "Xgcc" ; then - # note that no space should be placed around the equality symbol in assignations - # Note : 'native' is valid _only_ on GCC/x86 (32/64 bits) - F90COPT="-O3 $F90COPT" - elif test "X$psblas_cv_fc" == X"xlf" ; then - # XL compiler : consider using -qarch=auto - F90COPT="-O3 -qarch=auto -qsuffix=f=f90:cpp=F90 -qlanglvl=extended $F90COPT" - elif test "X$psblas_cv_fc" == X"ifc" ; then - # other compilers .. - F90COPT="-O3 $F90COPT" - elif test "X$psblas_cv_fc" == X"pg" ; then - # other compilers .. - F90COPT="-fast $F90COPT" - elif test "X$psblas_cv_fc" == X"sun" ; then - F90COPT="-fast $F90COPT" - elif test "X$psblas_cv_fc" == X"cray" ; then - MPIFC="ftn" - F90COPT="-O3 -em $F90COPT" - elif test "X$psblas_cv_fc" == X"nag" ; then - # NAG compiler - F90COPT="-O2" - else - # other compilers .. - F90COPT="-O2 $F90COPT" - fi -else - echo "Found FCFLAGS $F90COPT" - #F90COPT="${FCFLAGS}" -fi -if test "X$psblas_cv_fc" == X"nag" ; then - # Add needed options - F90COPT="$F90COPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv" + FCOPT="$FCOPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv" EXTRA_OPT="-mismatch_all" fi -#FCFLAGS="${F90COPT}" -# COPT,FCOPT, F90COPT are aliases for FFLAGS,CFLAGS,FCFLAGS . +# COPT,FCOPT are aliases for CFLAGS,FCFLAGS . ############################################################################## # Compilers variables selection ############################################################################## -F90=${FC} -MPF90=${MPIFC} FC=${FC} -MPF77=${MPIFC} CC=${CC} MPCC=${MPICC} + +############################################################################## +# Choice of our compilers, needed by Make.inc +############################################################################## if test "X$psblas_cv_fc" == X"cray" then MODEXT=".mod" @@ -495,14 +470,9 @@ fi # Choice of our compilers, needed by Make.inc ############################################################################## if test "X$FLINK" == "X" ; then - FLINK=${MPF77} -fi - -if test "X$F90LINK" == "X" ; then - F90LINK=${MPF90} + FLINK=${MPF90} fi - PAC_FORTRAN_HAVE_PSBLAS([AC_MSG_RESULT([yes.])], [AC_MSG_ERROR([no. Could not find working version of PSBLAS.])]) @@ -518,8 +488,8 @@ if test "x$pac_cv_psblas_patchlevel" == "xunknown"; then AC_MSG_ERROR([PSBLAS patchlevel "$pac_cv_psblas_patchlevel".]) fi if (( $pac_cv_psblas_major < 3 )) || - ( (( $pac_cv_psblas_major == 3 )) && (( $pac_cv_psblas_minor < 4 ))) ; then - AC_MSG_ERROR([I need at least PSBLAS version 3.4.]) + ( (( $pac_cv_psblas_major == 3 )) && (( $pac_cv_psblas_minor < 5 ))) ; then + AC_MSG_ERROR([I need at least PSBLAS version 3.5.]) else AC_MSG_NOTICE([Am configuring with PSBLAS version $pac_cv_psblas_major.$pac_cv_psblas_minor.$pac_cv_psblas_patchlevel.]) fi @@ -702,28 +672,21 @@ if test "x$pac_cv_status_file" != "xNONE"; then COMPILERULES=''; else COMPILERULES=' -F90LINK=$(MPF90) -FLINK=$(MPF77) +FLINK=$(MPF90) # These should be portable rules, arent they? .c.o: $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< -o $@ -.f.o: - $(FC) $(FCOPT) $(FINCLUDES) -c $< -o $@ .f90.o: - $(F90) $(FCOPT) $(FINCLUDES) -c $< -o $@ -.F.o: - $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< -o $@ + $(FC) $(FCOPT) $(FINCLUDES) -c $< -o $@ .F90.o: - $(F90) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< -o $@' + $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< -o $@' COMPILERULES=" # The following ones are the variables used by the PSBLAS make scripts. -F90=$F90 FC=$FC CC=$CC -F90COPT=$F90COPT FCOPT=$FCOPT CCOPT=$CCOPT FMFLAG=$FMFLAG @@ -739,8 +702,7 @@ LIBS=$LIBS BLAS=$BLAS_LIBS # These three should be always set! -MPF90=$MPF90 -MPF77=$MPF77 +MPFC=$MPFC MPCC=$MPCC AR=$AR diff --git a/examples/fileread/Makefile b/examples/fileread/Makefile index a822a1f4..e847a66f 100644 --- a/examples/fileread/Makefile +++ b/examples/fileread/Makefile @@ -20,12 +20,12 @@ all: mld_dexample_ml mld_dexample_1lev mld_zexample_ml mld_zexample_1lev\ mld_sexample_ml mld_sexample_1lev mld_cexample_ml mld_cexample_1lev mld_dexample_ml: $(DMOBJS) - $(F90LINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \ + $(FLINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_dexample_ml $(EXEDIR) mld_dexample_1lev: $(D1OBJS) - $(F90LINK) $(LINKOPT) $(D1OBJS) -o mld_dexample_1lev \ + $(FLINK) $(LINKOPT) $(D1OBJS) -o mld_dexample_1lev \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_dexample_1lev $(EXEDIR) @@ -33,12 +33,12 @@ mld_dexample_ml.o: data_input.o mld_dexample_1lev.o: data_input.o mld_zexample_ml: $(ZMOBJS) - $(F90LINK) $(LINKOPT) $(ZMOBJS) -o mld_zexample_ml \ + $(FLINK) $(LINKOPT) $(ZMOBJS) -o mld_zexample_ml \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_zexample_ml $(EXEDIR) mld_zexample_1lev: $(Z1OBJS) - $(F90LINK) $(LINKOPT) $(Z1OBJS) -o mld_zexample_1lev \ + $(FLINK) $(LINKOPT) $(Z1OBJS) -o mld_zexample_1lev \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_zexample_1lev $(EXEDIR) @@ -48,12 +48,12 @@ mld_zexample_1lev.o: data_input.o mld_sexample_ml: $(SMOBJS) - $(F90LINK) $(LINKOPT) $(SMOBJS) -o mld_sexample_ml \ + $(FLINK) $(LINKOPT) $(SMOBJS) -o mld_sexample_ml \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_sexample_ml $(EXEDIR) mld_sexample_1lev: $(S1OBJS) - $(F90LINK) $(LINKOPT) $(S1OBJS) -o mld_sexample_1lev \ + $(FLINK) $(LINKOPT) $(S1OBJS) -o mld_sexample_1lev \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_sexample_1lev $(EXEDIR) @@ -61,12 +61,12 @@ mld_sexample_ml.o: data_input.o mld_sexample_1lev.o: data_input.o mld_cexample_ml: $(CMOBJS) - $(F90LINK) $(LINKOPT) $(CMOBJS) -o mld_cexample_ml \ + $(FLINK) $(LINKOPT) $(CMOBJS) -o mld_cexample_ml \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_cexample_ml $(EXEDIR) mld_cexample_1lev: $(C1OBJS) - $(F90LINK) $(LINKOPT) $(C1OBJS) -o mld_cexample_1lev \ + $(FLINK) $(LINKOPT) $(C1OBJS) -o mld_cexample_1lev \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_cexample_1lev $(EXEDIR) @@ -74,9 +74,6 @@ mld_cexample_ml.o: data_input.o mld_cexample_1lev.o: data_input.o -.f90.o: - $(MPF90) $(F90COPT) $(FINCLUDES) -c $< - clean: /bin/rm -f *$(.mod) \ $(DMOBJS) $(D1OBJS) $(ZMOBJS) $(Z1OBJS) \ diff --git a/examples/pdegen/Makefile b/examples/pdegen/Makefile index 8268d8ea..050f077a 100644 --- a/examples/pdegen/Makefile +++ b/examples/pdegen/Makefile @@ -16,12 +16,12 @@ all: mld_sexample_ml mld_sexample_1lev mld_dexample_ml mld_dexample_1lev mld_dexample_ml: $(DMOBJS) - $(F90LINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \ + $(FLINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_dexample_ml $(EXEDIR) mld_dexample_1lev: $(D1OBJS) - $(F90LINK) $(LINKOPT) $(D1OBJS) -o mld_dexample_1lev \ + $(FLINK) $(LINKOPT) $(D1OBJS) -o mld_dexample_1lev \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_dexample_1lev $(EXEDIR) @@ -29,21 +29,18 @@ mld_dexample_ml.o: data_input.o mld_dexample_1lev.o: data_input.o mld_sexample_ml: $(SMOBJS) - $(F90LINK) $(LINKOPT) $(SMOBJS) -o mld_sexample_ml \ + $(FLINK) $(LINKOPT) $(SMOBJS) -o mld_sexample_ml \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_sexample_ml $(EXEDIR) mld_sexample_1lev: $(S1OBJS) - $(F90LINK) $(LINKOPT) $(S1OBJS) -o mld_sexample_1lev \ + $(FLINK) $(LINKOPT) $(S1OBJS) -o mld_sexample_1lev \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_sexample_1lev $(EXEDIR) mld_sexample_ml.o: data_input.o mld_sexample_1lev.o: data_input.o -.f90.o: - $(MPF90) $(F90COPT) $(FINCLUDES) -c $< - clean: /bin/rm -f $(DMOBJS) $(D1OBJS) $(SMOBJS) $(S1OBJS) \ *$(.mod) $(EXEDIR)/mld_dexample_ml $(EXEDIR)/mld_dexample_1lev\ diff --git a/mlprec/impl/Makefile b/mlprec/impl/Makefile index d3033ec0..2f90244e 100644 --- a/mlprec/impl/Makefile +++ b/mlprec/impl/Makefile @@ -82,7 +82,7 @@ solvd: cd solver && $(MAKE) mpobjs: - (make $(MPFOBJS) F90="$(MPF90)" F90COPT="$(F90COPT)") + (make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)") (make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)") veryclean: clean diff --git a/mlprec/impl/level/Makefile b/mlprec/impl/level/Makefile index dbbfae8f..22139218 100644 --- a/mlprec/impl/level/Makefile +++ b/mlprec/impl/level/Makefile @@ -71,7 +71,7 @@ lib: $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) mpobjs: - (make $(MPFOBJS) F90="$(MPF90)" F90COPT="$(F90COPT)") + (make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)") (make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)") veryclean: clean diff --git a/mlprec/impl/mld_c_dec_map_bld.f90 b/mlprec/impl/mld_c_dec_map_bld.f90 index b1ac029f..310705ee 100644 --- a/mlprec/impl/mld_c_dec_map_bld.f90 +++ b/mlprec/impl/mld_c_dec_map_bld.f90 @@ -72,6 +72,7 @@ subroutine mld_c_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_c_dec_map_bld implicit none diff --git a/mlprec/impl/mld_c_hierarchy_bld.f90 b/mlprec/impl/mld_c_hierarchy_bld.f90 index ac326003..eb5f9e74 100644 --- a/mlprec/impl/mld_c_hierarchy_bld.f90 +++ b/mlprec/impl/mld_c_hierarchy_bld.f90 @@ -65,7 +65,7 @@ ! info - integer, output. ! Error code. ! -subroutine mld_c_hierarchy_bld(a,desc_a,p,info) +subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) use psb_base_mod use mld_c_inner_mod @@ -76,7 +76,7 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! Arguments type(psb_cspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_cprec_type),intent(inout),target :: p + class(mld_cprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info !!$ character, intent(in), optional :: upd @@ -106,7 +106,7 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' @@ -127,7 +127,7 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_cprecinit info=3111 call psb_errpush(info,name) @@ -138,31 +138,31 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = p%coarse_aggr_size - mxplevs = p%max_prec_levs - mnaggratio = p%min_aggr_ratio - casize = p%coarse_aggr_size - iszv = size(p%precv) + casize = prec%coarse_aggr_size + mxplevs = prec%max_prec_levs + mnaggratio = prec%min_aggr_ratio + casize = prec%coarse_aggr_size + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) call psb_bcast(ictxt,casize) call psb_bcast(ictxt,mxplevs) call psb_bcast(ictxt,mnaggratio) - if (casize /= p%coarse_aggr_size) then + if (casize /= prec%coarse_aggr_size) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= prec%max_prec_levs) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= prec%min_aggr_ratio) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') goto 9999 end if - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -182,8 +182,8 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! This is OK, since it may be called by the user even if there ! is only one level ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a call psb_erractionrestore(err_act) return @@ -213,13 +213,13 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) end if nplevs = max(itwo,mxplevs) - coarseparms = p%precv(iszv)%parms - baseparms = p%precv(1)%parms - medparms = p%precv(2)%parms + coarseparms = prec%precv(iszv)%parms + baseparms = prec%precv(1)%parms + medparms = prec%precv(2)%parms - call save_smoothers(p%precv(iszv),coarse_sm,coarse_sm2,info) - if (info == 0) call save_smoothers(p%precv(2),med_sm,med_sm2,info) - if (info == 0) call save_smoothers(p%precv(1),base_sm,base_sm2,info) + call save_smoothers(prec%precv(iszv),coarse_sm,coarse_sm2,info) + if (info == 0) call save_smoothers(prec%precv(2),med_sm,med_sm2,info) + if (info == 0) call save_smoothers(prec%precv(1),base_sm,base_sm2,info) if (info /= psb_success_) then write(0,*) 'Error in saving smoothers',info call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') @@ -232,10 +232,10 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) allocate(tprecv(nplevs),stat=info) ! First all existing levels if (info == 0) tprecv(1)%parms = baseparms - if (info == 0) call restore_smoothers(tprecv(1),p%precv(1)%sm,p%precv(1)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(1),prec%precv(1)%sm,prec%precv(1)%sm2a,info) do i=2, min(iszv,nplevs) - 1 if (info == 0) tprecv(i)%parms = medparms - if (info == 0) call restore_smoothers(tprecv(i),p%precv(i)%sm,p%precv(i)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(i),prec%precv(i)%sm,prec%precv(i)%sm2a,info) end do ! Further intermediates, if any do i=iszv-1, nplevs - 1 @@ -252,24 +252,24 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) endif do i=1,iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) - iszv = size(p%precv) + call move_alloc(tprecv,prec%precv) + iszv = size(prec%precv) end if ! ! Finest level first; remember to fix base_a and base_desc ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a newsz = 0 array_build_loop: do i=2, iszv ! ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(i)%parms) + call psb_bcast(ictxt,prec%precv(i)%parms) ! ! Sanity checks on the parameters @@ -278,7 +278,7 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! ! A replicated matrix only makes sense at the coarsest level ! - call mld_check_def(p%precv(i)%parms%coarse_mat,'Coarse matrix',& + call mld_check_def(prec%precv(i)%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_distr_ml_coarse_mat) end if @@ -289,8 +289,8 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! Build the mapping between levels i-1 and i and the matrix ! at level i ! - if (info == psb_success_) call mld_aggrmap_bld(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_aggrmap_bld(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -305,7 +305,7 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! ! Save op_prol just in case ! - call op_prol%clone(p%precv(i)%tprol,info) + call op_prol%clone(prec%precv(i)%tprol,info) ! ! Check for early termination of aggregation loop. ! @@ -315,9 +315,9 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) if (i==2) then sizeratio = desc_a%get_global_rows()/sizeratio else - sizeratio = sum(p%precv(i-1)%map%naggr)/sizeratio + sizeratio = sum(prec%precv(i-1)%map%naggr)/sizeratio end if - p%precv(i)%szratio = sizeratio + prec%precv(i)%szratio = sizeratio if (iaggsize <= casize) then newsz = i end if @@ -334,7 +334,7 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) end if end if - if (all(nlaggr == p%precv(i-1)%map%naggr)) then + if (all(nlaggr == prec%precv(i-1)%map%naggr)) then newsz=i-1 if (me == 0) then write(debug_unit,*) trim(name),& @@ -356,27 +356,27 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! This is awkward, we are saving the aggregation parms, for the sake ! of distr/repl matrix at coarse level. Should be rethought. ! - athresh = p%precv(newsz)%parms%aggr_thresh - ascale = p%precv(newsz)%parms%aggr_scale - aomega = p%precv(newsz)%parms%aggr_omega_val - if (info == 0) p%precv(newsz)%parms = coarseparms - p%precv(newsz)%parms%aggr_thresh = athresh - p%precv(newsz)%parms%aggr_scale = ascale - p%precv(newsz)%parms%aggr_omega_val = aomega + athresh = prec%precv(newsz)%parms%aggr_thresh + ascale = prec%precv(newsz)%parms%aggr_scale + aomega = prec%precv(newsz)%parms%aggr_omega_val + if (info == 0) prec%precv(newsz)%parms = coarseparms + prec%precv(newsz)%parms%aggr_thresh = athresh + prec%precv(newsz)%parms%aggr_scale = ascale + prec%precv(newsz)%parms%aggr_omega_val = aomega - if (info == 0) call restore_smoothers(p%precv(newsz),coarse_sm,coarse_sm2,info) + if (info == 0) call restore_smoothers(prec%precv(newsz),coarse_sm,coarse_sm2,info) if (newsz < i) then ! ! We are going back and revisit a previous leve; ! recover the aggregation. ! - ilaggr = p%precv(newsz)%map%iaggr - nlaggr = p%precv(newsz)%map%naggr - call p%precv(newsz)%tprol%clone(op_prol,info) + ilaggr = prec%precv(newsz)%map%iaggr + nlaggr = prec%precv(newsz)%map%naggr + call prec%precv(newsz)%tprol%clone(op_prol,info) end if - if (info == psb_success_) call mld_lev_mat_asb(p%precv(newsz),& - & p%precv(newsz-1)%base_a,p%precv(newsz-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(newsz),& + & prec%precv(newsz-1)%base_a,prec%precv(newsz-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= 0) then call psb_errpush(psb_err_internal_error_,name,& @@ -385,8 +385,8 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) endif exit array_build_loop else - if (info == psb_success_) call mld_lev_mat_asb(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) end if if (info /= psb_success_) then @@ -409,12 +409,12 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) goto 9999 endif do i=1,newsz - call p%precv(i)%move_alloc(tprecv(i),info) + call prec%precv(i)%move_alloc(tprecv(i),info) end do do i=newsz+1, iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) + call move_alloc(tprecv,prec%precv) ! Ignore errors from transfer info = psb_success_ ! @@ -423,10 +423,10 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) ! Fix the pointers, but the level 1 should ! be already OK do i=2, iszv - p%precv(i)%base_a => p%precv(i)%ac - p%precv(i)%base_desc => p%precv(i)%desc_ac - p%precv(i)%map%p_desc_X => p%precv(i-1)%base_desc - p%precv(i)%map%p_desc_Y => p%precv(i)%base_desc + prec%precv(i)%base_a => prec%precv(i)%ac + prec%precv(i)%base_desc => prec%precv(i)%desc_ac + prec%precv(i)%map%p_desc_X => prec%precv(i-1)%base_desc + prec%precv(i)%map%p_desc_Y => prec%precv(i)%base_desc end do end if @@ -436,9 +436,9 @@ subroutine mld_c_hierarchy_bld(a,desc_a,p,info) goto 9999 endif - iszv = size(p%precv) + iszv = size(prec%precv) - call p%cmp_complexity() + call prec%cmp_complexity() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& diff --git a/mlprec/impl/mld_c_lev_aggrmap_bld.f90 b/mlprec/impl/mld_c_lev_aggrmap_bld.f90 index 84b338df..8a2d3646 100644 --- a/mlprec/impl/mld_c_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_c_lev_aggrmap_bld.f90 @@ -1,3 +1,4 @@ + ! ! ! MLD2P4 version 2.1 @@ -77,6 +78,7 @@ subroutine mld_c_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_c_lev_aggrmap_bld implicit none diff --git a/mlprec/impl/mld_c_lev_aggrmat_asb.f90 b/mlprec/impl/mld_c_lev_aggrmat_asb.f90 index 0d8d9695..ed95d473 100644 --- a/mlprec/impl/mld_c_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_c_lev_aggrmat_asb.f90 @@ -88,6 +88,7 @@ subroutine mld_c_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_c_lev_aggrmat_asb implicit none diff --git a/mlprec/impl/mld_c_smoothers_bld.f90 b/mlprec/impl/mld_c_smoothers_bld.f90 index 7ad8177a..1b132c1f 100644 --- a/mlprec/impl/mld_c_smoothers_bld.f90 +++ b/mlprec/impl/mld_c_smoothers_bld.f90 @@ -79,10 +79,10 @@ ! ! ! -subroutine mld_c_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_c_inner_mod + !use mld_c_inner_mod use mld_c_prec_mod, mld_protect_name => mld_c_smoothers_bld Implicit None @@ -90,7 +90,7 @@ subroutine mld_c_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_cspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_cprec_type),intent(inout),target :: p + class(mld_cprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info class(psb_c_base_sparse_mat), intent(in), optional :: amold class(psb_c_base_vect_type), intent(in), optional :: vmold @@ -140,7 +140,7 @@ subroutine mld_c_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_cprecinit info=3111 call psb_errpush(info,name) @@ -150,9 +150,9 @@ subroutine mld_c_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! Check to ensure all procs have the same ! - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -174,7 +174,7 @@ subroutine mld_c_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call p%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_caggrmap_bld.f90 b/mlprec/impl/mld_caggrmap_bld.f90 index 83706616..eee39792 100644 --- a/mlprec/impl/mld_caggrmap_bld.f90 +++ b/mlprec/impl/mld_caggrmap_bld.f90 @@ -88,6 +88,7 @@ subroutine mld_caggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_caggrmap_bld implicit none diff --git a/mlprec/impl/mld_caggrmat_asb.f90 b/mlprec/impl/mld_caggrmat_asb.f90 index ed877642..eb186ce4 100644 --- a/mlprec/impl/mld_caggrmat_asb.f90 +++ b/mlprec/impl/mld_caggrmat_asb.f90 @@ -120,6 +120,7 @@ subroutine mld_caggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_caggrmat_asb implicit none diff --git a/mlprec/impl/mld_caggrmat_biz_asb.f90 b/mlprec/impl/mld_caggrmat_biz_asb.f90 index 88b4c093..dcd202a1 100644 --- a/mlprec/impl/mld_caggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_caggrmat_biz_asb.f90 @@ -84,6 +84,7 @@ ! subroutine mld_caggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_caggrmat_biz_asb implicit none diff --git a/mlprec/impl/mld_caggrmat_minnrg_asb.f90 b/mlprec/impl/mld_caggrmat_minnrg_asb.f90 index a9a8c246..c545404c 100644 --- a/mlprec/impl/mld_caggrmat_minnrg_asb.f90 +++ b/mlprec/impl/mld_caggrmat_minnrg_asb.f90 @@ -112,6 +112,7 @@ ! subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_caggrmat_minnrg_asb implicit none diff --git a/mlprec/impl/mld_caggrmat_nosmth_asb.f90 b/mlprec/impl/mld_caggrmat_nosmth_asb.f90 index 64c0eff2..33dd91c2 100644 --- a/mlprec/impl/mld_caggrmat_nosmth_asb.f90 +++ b/mlprec/impl/mld_caggrmat_nosmth_asb.f90 @@ -100,6 +100,7 @@ ! subroutine mld_caggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_caggrmat_nosmth_asb implicit none diff --git a/mlprec/impl/mld_caggrmat_smth_asb.f90 b/mlprec/impl/mld_caggrmat_smth_asb.f90 index 71dcd24b..55992069 100644 --- a/mlprec/impl/mld_caggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_caggrmat_smth_asb.f90 @@ -113,6 +113,7 @@ ! subroutine mld_caggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_caggrmat_smth_asb implicit none diff --git a/mlprec/impl/mld_cmlprec_aply.f90 b/mlprec/impl/mld_cmlprec_aply.f90 index 6ecca865..cfc66694 100644 --- a/mlprec/impl/mld_cmlprec_aply.f90 +++ b/mlprec/impl/mld_cmlprec_aply.f90 @@ -299,6 +299,7 @@ subroutine mld_cmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_cmlprec_aply_vect implicit none @@ -1303,6 +1304,7 @@ end subroutine mld_cmlprec_aply_vect subroutine mld_cmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_c_inner_mod, mld_protect_name => mld_cmlprec_aply implicit none diff --git a/mlprec/impl/mld_cmlprec_bld.f90 b/mlprec/impl/mld_cmlprec_bld.f90 index 53948174..d5964b29 100644 --- a/mlprec/impl/mld_cmlprec_bld.f90 +++ b/mlprec/impl/mld_cmlprec_bld.f90 @@ -123,7 +123,7 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' - call mld_c_hierarchy_bld(a,desc_a,p,info) + call p%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then info=psb_err_internal_error_ @@ -133,7 +133,7 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold) iszv = p%get_nlevs() - call mld_c_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) + call p%smoothers_build(a,desc_a,info,amold,vmold,imold) if (info /= psb_success_) then info=psb_err_internal_error_ diff --git a/mlprec/impl/mld_cprecaply.f90 b/mlprec/impl/mld_cprecaply.f90 index 1e249ec0..a0da9b29 100644 --- a/mlprec/impl/mld_cprecaply.f90 +++ b/mlprec/impl/mld_cprecaply.f90 @@ -75,7 +75,7 @@ subroutine mld_cprecaply(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_c_inner_mod, mld_protect_name => mld_cprecaply + use mld_c_inner_mod!, mld_protect_name => mld_cprecaply implicit none @@ -206,7 +206,7 @@ end subroutine mld_cprecaply subroutine mld_cprecaply1(prec,x,desc_data,info,trans) use psb_base_mod - use mld_c_inner_mod, mld_protect_name => mld_cprecaply1 + use mld_c_inner_mod!, mld_protect_name => mld_cprecaply1 implicit none @@ -240,7 +240,7 @@ subroutine mld_cprecaply1(prec,x,desc_data,info,trans) goto 9999 end if - call mld_precaply(prec,x,ww,desc_data,info,trans=trans,work=w1) + call prec%apply(x,ww,desc_data,info,trans=trans,work=w1) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='mld_precaply') goto 9999 @@ -267,7 +267,7 @@ end subroutine mld_cprecaply1 subroutine mld_cprecaply2_vect(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_c_inner_mod, mld_protect_name => mld_cprecaply2_vect + use mld_c_inner_mod!, mld_protect_name => mld_cprecaply2_vect implicit none @@ -368,7 +368,7 @@ end subroutine mld_cprecaply2_vect subroutine mld_cprecaply1_vect(prec,x,desc_data,info,trans,work) use psb_base_mod - use mld_c_inner_mod, mld_protect_name => mld_cprecaply1_vect + use mld_c_inner_mod!, mld_protect_name => mld_cprecaply1_vect implicit none diff --git a/mlprec/impl/mld_cprecbld.f90 b/mlprec/impl/mld_cprecbld.f90 index 6fa11f4f..ad328359 100644 --- a/mlprec/impl/mld_cprecbld.f90 +++ b/mlprec/impl/mld_cprecbld.f90 @@ -59,10 +59,9 @@ ! info - integer, output. ! Error code. ! -subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_c_inner_mod use mld_c_prec_mod, mld_protect_name => mld_cprecbld Implicit None @@ -70,7 +69,7 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_cspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_cprec_type),intent(inout), target :: p + class(mld_cprec_type),intent(inout), target :: prec integer(psb_ipk_), intent(out) :: info class(psb_c_base_sparse_mat), intent(in), optional :: amold class(psb_c_base_vect_type), intent(in), optional :: vmold @@ -100,7 +99,7 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& @@ -122,7 +121,7 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) !!$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_cprecinit info=3111 call psb_errpush(info,name) @@ -133,9 +132,9 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check to ensure all procs have the same ! newsz = -1 - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -157,31 +156,31 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(1)%parms) + call psb_bcast(ictxt,prec%precv(1)%parms) - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') goto 9999 end if - call p%precv(1)%check(info) - if (info /= psb_success_) then - write(0,*) ' Smoother check error',info - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner check.') - goto 9999 - endif - - call p%precv(1)%sm%build(a,desc_a,upd_,info,& - & amold=amold,vmold=vmold,imold=imold) - if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner build.') - goto 9999 - endif + call prec%precv(1)%check(info) + if (info /= psb_success_) then + write(0,*) ' Smoother check error',info + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner check.') + goto 9999 + endif + + call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + & amold=amold,vmold=vmold,imold=imold) + if (info /= psb_success_) then + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner build.') + goto 9999 + endif ! ! Number of levels > 1 @@ -190,16 +189,25 @@ subroutine mld_cprecbld(a,desc_a,p,info,amold,vmold,imold) ! ! Build the multilevel preconditioner ! - call mld_mlprec_bld(a,desc_a,p,info,& - & amold=amold,vmold=vmold,imold=imold) + call prec%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='Multilevel preconditioner build.') + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from hierarchy build') goto 9999 - endif + end if + + + call prec%smoothers_build(a,desc_a,info,amold,vmold,imold) + + if (info /= psb_success_) then + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from smoothers build') + goto 9999 + end if + end if - + call psb_erractionrestore(err_act) return diff --git a/mlprec/impl/mld_cprecinit.F90 b/mlprec/impl/mld_cprecinit.F90 index 18948381..0bb6ae61 100644 --- a/mlprec/impl/mld_cprecinit.F90 +++ b/mlprec/impl/mld_cprecinit.F90 @@ -84,12 +84,8 @@ ! lowercase strings). ! info - integer, output. ! Error code. -! nlev - integer, optional, input. -! The number of levels of the multilevel preconditioner. -! If nlev is not present and ptype='ML', then nlev=2 -! is assumed. If ptype /= 'ML', nlev is ignored. ! -subroutine mld_cprecinit(p,ptype,info,nlev) +subroutine mld_cprecinit(prec,ptype,info) use psb_base_mod use mld_c_prec_mod, mld_protect_name => mld_cprecinit @@ -106,10 +102,9 @@ subroutine mld_cprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_cprec_type), intent(inout) :: p + class(mld_cprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables integer(psb_ipk_) :: nlev_, ilev_ @@ -117,97 +112,92 @@ subroutine mld_cprecinit(p,ptype,info,nlev) character(len=*), parameter :: name='mld_precinit' info = psb_success_ - if (allocated(p%precv)) then - call mld_precfree(p,info) + if (allocated(prec%precv)) then + call prec%free(info) if (info /= psb_success_) then ! Do we want to do something? endif endif - p%coarse_aggr_size = -1 + prec%coarse_aggr_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_c_base_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_c_base_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_c_id_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_c_id_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('JAC','DIAG','JACOBI') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_c_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_c_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_c_diag_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_c_diag_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('BJAC') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_c_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_c_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_c_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_c_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('AS') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_c_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_c_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_c_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_c_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('ML') - if (present(nlev)) then - nlev_ = max(1,nlev) - p%max_prec_levs = nlev_ - else - nlev_ = p%max_prec_levs - end if + nlev_ = prec%max_prec_levs ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_c_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_c_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_c_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_c_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() if (nlev_ == 1) return do ilev_ = 2, nlev_ -1 - allocate(mld_c_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_c_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_c_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_c_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() end do ilev_ = nlev_ - allocate(mld_c_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_c_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return #if defined(HAVE_SLU_) - allocate(mld_c_slu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_c_slu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #else - allocate(mld_c_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_c_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #endif - call p%precv(ilev_)%default() - p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) - call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) + call prec%precv(ilev_)%default() + prec%precv(ilev_)%parms%coarse_solve = mld_bjac_ + call prec%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) + call prec%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.05_psb_spk_ scale = 1.0_psb_spk_ do ilev_=1,nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info) - call p%precv(ilev_)%set(mld_aggr_scale_,scale,info) - call p%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) + call prec%precv(ilev_)%set(mld_aggr_thresh_,thr,info) + call prec%precv(ilev_)%set(mld_aggr_scale_,scale,info) + call prec%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) end do case default diff --git a/mlprec/impl/mld_d_dec_map_bld.f90 b/mlprec/impl/mld_d_dec_map_bld.f90 index 735b2f47..c3739500 100644 --- a/mlprec/impl/mld_d_dec_map_bld.f90 +++ b/mlprec/impl/mld_d_dec_map_bld.f90 @@ -72,6 +72,7 @@ subroutine mld_d_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_d_dec_map_bld implicit none diff --git a/mlprec/impl/mld_d_hierarchy_bld.f90 b/mlprec/impl/mld_d_hierarchy_bld.f90 index d79cde04..5be032ed 100644 --- a/mlprec/impl/mld_d_hierarchy_bld.f90 +++ b/mlprec/impl/mld_d_hierarchy_bld.f90 @@ -65,7 +65,7 @@ ! info - integer, output. ! Error code. ! -subroutine mld_d_hierarchy_bld(a,desc_a,p,info) +subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) use psb_base_mod use mld_d_inner_mod @@ -76,7 +76,7 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! Arguments type(psb_dspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_dprec_type),intent(inout),target :: p + class(mld_dprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info !!$ character, intent(in), optional :: upd @@ -106,7 +106,7 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' @@ -127,7 +127,7 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_dprecinit info=3111 call psb_errpush(info,name) @@ -138,31 +138,31 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = p%coarse_aggr_size - mxplevs = p%max_prec_levs - mnaggratio = p%min_aggr_ratio - casize = p%coarse_aggr_size - iszv = size(p%precv) + casize = prec%coarse_aggr_size + mxplevs = prec%max_prec_levs + mnaggratio = prec%min_aggr_ratio + casize = prec%coarse_aggr_size + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) call psb_bcast(ictxt,casize) call psb_bcast(ictxt,mxplevs) call psb_bcast(ictxt,mnaggratio) - if (casize /= p%coarse_aggr_size) then + if (casize /= prec%coarse_aggr_size) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= prec%max_prec_levs) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= prec%min_aggr_ratio) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') goto 9999 end if - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -182,8 +182,8 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! This is OK, since it may be called by the user even if there ! is only one level ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a call psb_erractionrestore(err_act) return @@ -213,13 +213,13 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) end if nplevs = max(itwo,mxplevs) - coarseparms = p%precv(iszv)%parms - baseparms = p%precv(1)%parms - medparms = p%precv(2)%parms + coarseparms = prec%precv(iszv)%parms + baseparms = prec%precv(1)%parms + medparms = prec%precv(2)%parms - call save_smoothers(p%precv(iszv),coarse_sm,coarse_sm2,info) - if (info == 0) call save_smoothers(p%precv(2),med_sm,med_sm2,info) - if (info == 0) call save_smoothers(p%precv(1),base_sm,base_sm2,info) + call save_smoothers(prec%precv(iszv),coarse_sm,coarse_sm2,info) + if (info == 0) call save_smoothers(prec%precv(2),med_sm,med_sm2,info) + if (info == 0) call save_smoothers(prec%precv(1),base_sm,base_sm2,info) if (info /= psb_success_) then write(0,*) 'Error in saving smoothers',info call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') @@ -232,10 +232,10 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) allocate(tprecv(nplevs),stat=info) ! First all existing levels if (info == 0) tprecv(1)%parms = baseparms - if (info == 0) call restore_smoothers(tprecv(1),p%precv(1)%sm,p%precv(1)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(1),prec%precv(1)%sm,prec%precv(1)%sm2a,info) do i=2, min(iszv,nplevs) - 1 if (info == 0) tprecv(i)%parms = medparms - if (info == 0) call restore_smoothers(tprecv(i),p%precv(i)%sm,p%precv(i)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(i),prec%precv(i)%sm,prec%precv(i)%sm2a,info) end do ! Further intermediates, if any do i=iszv-1, nplevs - 1 @@ -252,24 +252,24 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) endif do i=1,iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) - iszv = size(p%precv) + call move_alloc(tprecv,prec%precv) + iszv = size(prec%precv) end if ! ! Finest level first; remember to fix base_a and base_desc ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a newsz = 0 array_build_loop: do i=2, iszv ! ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(i)%parms) + call psb_bcast(ictxt,prec%precv(i)%parms) ! ! Sanity checks on the parameters @@ -278,7 +278,7 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! ! A replicated matrix only makes sense at the coarsest level ! - call mld_check_def(p%precv(i)%parms%coarse_mat,'Coarse matrix',& + call mld_check_def(prec%precv(i)%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_distr_ml_coarse_mat) end if @@ -289,8 +289,8 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! Build the mapping between levels i-1 and i and the matrix ! at level i ! - if (info == psb_success_) call mld_aggrmap_bld(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_aggrmap_bld(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -305,7 +305,7 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! ! Save op_prol just in case ! - call op_prol%clone(p%precv(i)%tprol,info) + call op_prol%clone(prec%precv(i)%tprol,info) ! ! Check for early termination of aggregation loop. ! @@ -315,9 +315,9 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) if (i==2) then sizeratio = desc_a%get_global_rows()/sizeratio else - sizeratio = sum(p%precv(i-1)%map%naggr)/sizeratio + sizeratio = sum(prec%precv(i-1)%map%naggr)/sizeratio end if - p%precv(i)%szratio = sizeratio + prec%precv(i)%szratio = sizeratio if (iaggsize <= casize) then newsz = i end if @@ -334,7 +334,7 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) end if end if - if (all(nlaggr == p%precv(i-1)%map%naggr)) then + if (all(nlaggr == prec%precv(i-1)%map%naggr)) then newsz=i-1 if (me == 0) then write(debug_unit,*) trim(name),& @@ -356,27 +356,27 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! This is awkward, we are saving the aggregation parms, for the sake ! of distr/repl matrix at coarse level. Should be rethought. ! - athresh = p%precv(newsz)%parms%aggr_thresh - ascale = p%precv(newsz)%parms%aggr_scale - aomega = p%precv(newsz)%parms%aggr_omega_val - if (info == 0) p%precv(newsz)%parms = coarseparms - p%precv(newsz)%parms%aggr_thresh = athresh - p%precv(newsz)%parms%aggr_scale = ascale - p%precv(newsz)%parms%aggr_omega_val = aomega + athresh = prec%precv(newsz)%parms%aggr_thresh + ascale = prec%precv(newsz)%parms%aggr_scale + aomega = prec%precv(newsz)%parms%aggr_omega_val + if (info == 0) prec%precv(newsz)%parms = coarseparms + prec%precv(newsz)%parms%aggr_thresh = athresh + prec%precv(newsz)%parms%aggr_scale = ascale + prec%precv(newsz)%parms%aggr_omega_val = aomega - if (info == 0) call restore_smoothers(p%precv(newsz),coarse_sm,coarse_sm2,info) + if (info == 0) call restore_smoothers(prec%precv(newsz),coarse_sm,coarse_sm2,info) if (newsz < i) then ! ! We are going back and revisit a previous leve; ! recover the aggregation. ! - ilaggr = p%precv(newsz)%map%iaggr - nlaggr = p%precv(newsz)%map%naggr - call p%precv(newsz)%tprol%clone(op_prol,info) + ilaggr = prec%precv(newsz)%map%iaggr + nlaggr = prec%precv(newsz)%map%naggr + call prec%precv(newsz)%tprol%clone(op_prol,info) end if - if (info == psb_success_) call mld_lev_mat_asb(p%precv(newsz),& - & p%precv(newsz-1)%base_a,p%precv(newsz-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(newsz),& + & prec%precv(newsz-1)%base_a,prec%precv(newsz-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= 0) then call psb_errpush(psb_err_internal_error_,name,& @@ -385,8 +385,8 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) endif exit array_build_loop else - if (info == psb_success_) call mld_lev_mat_asb(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) end if if (info /= psb_success_) then @@ -409,12 +409,12 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) goto 9999 endif do i=1,newsz - call p%precv(i)%move_alloc(tprecv(i),info) + call prec%precv(i)%move_alloc(tprecv(i),info) end do do i=newsz+1, iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) + call move_alloc(tprecv,prec%precv) ! Ignore errors from transfer info = psb_success_ ! @@ -423,10 +423,10 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) ! Fix the pointers, but the level 1 should ! be already OK do i=2, iszv - p%precv(i)%base_a => p%precv(i)%ac - p%precv(i)%base_desc => p%precv(i)%desc_ac - p%precv(i)%map%p_desc_X => p%precv(i-1)%base_desc - p%precv(i)%map%p_desc_Y => p%precv(i)%base_desc + prec%precv(i)%base_a => prec%precv(i)%ac + prec%precv(i)%base_desc => prec%precv(i)%desc_ac + prec%precv(i)%map%p_desc_X => prec%precv(i-1)%base_desc + prec%precv(i)%map%p_desc_Y => prec%precv(i)%base_desc end do end if @@ -436,9 +436,9 @@ subroutine mld_d_hierarchy_bld(a,desc_a,p,info) goto 9999 endif - iszv = size(p%precv) + iszv = size(prec%precv) - call p%cmp_complexity() + call prec%cmp_complexity() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& diff --git a/mlprec/impl/mld_d_lev_aggrmap_bld.f90 b/mlprec/impl/mld_d_lev_aggrmap_bld.f90 index c044486a..94839bad 100644 --- a/mlprec/impl/mld_d_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_d_lev_aggrmap_bld.f90 @@ -1,3 +1,4 @@ + ! ! ! MLD2P4 version 2.1 @@ -77,6 +78,7 @@ subroutine mld_d_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_d_lev_aggrmap_bld implicit none diff --git a/mlprec/impl/mld_d_lev_aggrmat_asb.f90 b/mlprec/impl/mld_d_lev_aggrmat_asb.f90 index a451ca46..145eec26 100644 --- a/mlprec/impl/mld_d_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_d_lev_aggrmat_asb.f90 @@ -88,6 +88,7 @@ subroutine mld_d_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_d_lev_aggrmat_asb implicit none diff --git a/mlprec/impl/mld_d_smoothers_bld.f90 b/mlprec/impl/mld_d_smoothers_bld.f90 index a34638f6..5ba6dbb1 100644 --- a/mlprec/impl/mld_d_smoothers_bld.f90 +++ b/mlprec/impl/mld_d_smoothers_bld.f90 @@ -79,10 +79,10 @@ ! ! ! -subroutine mld_d_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_d_inner_mod + !use mld_d_inner_mod use mld_d_prec_mod, mld_protect_name => mld_d_smoothers_bld Implicit None @@ -90,7 +90,7 @@ subroutine mld_d_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_dspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_dprec_type),intent(inout),target :: p + class(mld_dprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_vect_type), intent(in), optional :: vmold @@ -140,7 +140,7 @@ subroutine mld_d_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_dprecinit info=3111 call psb_errpush(info,name) @@ -150,9 +150,9 @@ subroutine mld_d_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! Check to ensure all procs have the same ! - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -174,7 +174,7 @@ subroutine mld_d_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call p%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_daggrmap_bld.f90 b/mlprec/impl/mld_daggrmap_bld.f90 index f7aecb6f..0f5af04c 100644 --- a/mlprec/impl/mld_daggrmap_bld.f90 +++ b/mlprec/impl/mld_daggrmap_bld.f90 @@ -88,6 +88,7 @@ subroutine mld_daggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_daggrmap_bld implicit none diff --git a/mlprec/impl/mld_daggrmat_asb.f90 b/mlprec/impl/mld_daggrmat_asb.f90 index f13ea524..ddd01378 100644 --- a/mlprec/impl/mld_daggrmat_asb.f90 +++ b/mlprec/impl/mld_daggrmat_asb.f90 @@ -120,6 +120,7 @@ subroutine mld_daggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_daggrmat_asb implicit none diff --git a/mlprec/impl/mld_daggrmat_biz_asb.f90 b/mlprec/impl/mld_daggrmat_biz_asb.f90 index dde4d6af..01330b1c 100644 --- a/mlprec/impl/mld_daggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_daggrmat_biz_asb.f90 @@ -84,6 +84,7 @@ ! subroutine mld_daggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_daggrmat_biz_asb implicit none diff --git a/mlprec/impl/mld_daggrmat_minnrg_asb.f90 b/mlprec/impl/mld_daggrmat_minnrg_asb.f90 index c064f9e2..8e73858f 100644 --- a/mlprec/impl/mld_daggrmat_minnrg_asb.f90 +++ b/mlprec/impl/mld_daggrmat_minnrg_asb.f90 @@ -112,6 +112,7 @@ ! subroutine mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_daggrmat_minnrg_asb implicit none diff --git a/mlprec/impl/mld_daggrmat_nosmth_asb.f90 b/mlprec/impl/mld_daggrmat_nosmth_asb.f90 index ae0bec99..48bbf144 100644 --- a/mlprec/impl/mld_daggrmat_nosmth_asb.f90 +++ b/mlprec/impl/mld_daggrmat_nosmth_asb.f90 @@ -100,6 +100,7 @@ ! subroutine mld_daggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_daggrmat_nosmth_asb implicit none diff --git a/mlprec/impl/mld_daggrmat_smth_asb.f90 b/mlprec/impl/mld_daggrmat_smth_asb.f90 index 74b11d4e..9e1c6a94 100644 --- a/mlprec/impl/mld_daggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_daggrmat_smth_asb.f90 @@ -113,6 +113,7 @@ ! subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_daggrmat_smth_asb implicit none diff --git a/mlprec/impl/mld_dmlprec_aply.f90 b/mlprec/impl/mld_dmlprec_aply.f90 index ec79f017..483f5bae 100644 --- a/mlprec/impl/mld_dmlprec_aply.f90 +++ b/mlprec/impl/mld_dmlprec_aply.f90 @@ -299,6 +299,7 @@ subroutine mld_dmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_dmlprec_aply_vect implicit none @@ -1303,6 +1304,7 @@ end subroutine mld_dmlprec_aply_vect subroutine mld_dmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_d_inner_mod, mld_protect_name => mld_dmlprec_aply implicit none diff --git a/mlprec/impl/mld_dmlprec_bld.f90 b/mlprec/impl/mld_dmlprec_bld.f90 index afc4f6eb..7b579fc6 100644 --- a/mlprec/impl/mld_dmlprec_bld.f90 +++ b/mlprec/impl/mld_dmlprec_bld.f90 @@ -123,7 +123,7 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' - call mld_d_hierarchy_bld(a,desc_a,p,info) + call p%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then info=psb_err_internal_error_ @@ -133,7 +133,7 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold) iszv = p%get_nlevs() - call mld_d_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) + call p%smoothers_build(a,desc_a,info,amold,vmold,imold) if (info /= psb_success_) then info=psb_err_internal_error_ diff --git a/mlprec/impl/mld_dprecaply.f90 b/mlprec/impl/mld_dprecaply.f90 index 51b55f84..4964d07a 100644 --- a/mlprec/impl/mld_dprecaply.f90 +++ b/mlprec/impl/mld_dprecaply.f90 @@ -75,7 +75,7 @@ subroutine mld_dprecaply(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_d_inner_mod, mld_protect_name => mld_dprecaply + use mld_d_inner_mod!, mld_protect_name => mld_dprecaply implicit none @@ -206,7 +206,7 @@ end subroutine mld_dprecaply subroutine mld_dprecaply1(prec,x,desc_data,info,trans) use psb_base_mod - use mld_d_inner_mod, mld_protect_name => mld_dprecaply1 + use mld_d_inner_mod!, mld_protect_name => mld_dprecaply1 implicit none @@ -240,7 +240,7 @@ subroutine mld_dprecaply1(prec,x,desc_data,info,trans) goto 9999 end if - call mld_precaply(prec,x,ww,desc_data,info,trans=trans,work=w1) + call prec%apply(x,ww,desc_data,info,trans=trans,work=w1) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='mld_precaply') goto 9999 @@ -267,7 +267,7 @@ end subroutine mld_dprecaply1 subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_d_inner_mod, mld_protect_name => mld_dprecaply2_vect + use mld_d_inner_mod!, mld_protect_name => mld_dprecaply2_vect implicit none @@ -368,7 +368,7 @@ end subroutine mld_dprecaply2_vect subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) use psb_base_mod - use mld_d_inner_mod, mld_protect_name => mld_dprecaply1_vect + use mld_d_inner_mod!, mld_protect_name => mld_dprecaply1_vect implicit none diff --git a/mlprec/impl/mld_dprecbld.f90 b/mlprec/impl/mld_dprecbld.f90 index 4937f4d8..66f4b092 100644 --- a/mlprec/impl/mld_dprecbld.f90 +++ b/mlprec/impl/mld_dprecbld.f90 @@ -59,18 +59,17 @@ ! info - integer, output. ! Error code. ! -subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_d_inner_mod, mld_protect_name1 => mld_dprecbld - use mld_d_prec_mod, mld_protect_name2 => mld_dprecbld + use mld_d_prec_mod, mld_protect_name => mld_dprecbld Implicit None ! Arguments type(psb_dspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_dprec_type),intent(inout), target :: p + class(mld_dprec_type),intent(inout), target :: prec integer(psb_ipk_), intent(out) :: info class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_vect_type), intent(in), optional :: vmold @@ -100,7 +99,7 @@ subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& @@ -122,7 +121,7 @@ subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold) !!$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_dprecinit info=3111 call psb_errpush(info,name) @@ -133,9 +132,9 @@ subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check to ensure all procs have the same ! newsz = -1 - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -157,31 +156,31 @@ subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(1)%parms) + call psb_bcast(ictxt,prec%precv(1)%parms) - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') goto 9999 end if - call p%precv(1)%check(info) - if (info /= psb_success_) then - write(0,*) ' Smoother check error',info - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner check.') - goto 9999 - endif - - call p%precv(1)%sm%build(a,desc_a,upd_,info,& - & amold=amold,vmold=vmold,imold=imold) - if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner build.') - goto 9999 - endif + call prec%precv(1)%check(info) + if (info /= psb_success_) then + write(0,*) ' Smoother check error',info + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner check.') + goto 9999 + endif + + call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + & amold=amold,vmold=vmold,imold=imold) + if (info /= psb_success_) then + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner build.') + goto 9999 + endif ! ! Number of levels > 1 @@ -190,16 +189,25 @@ subroutine mld_dprecbld(a,desc_a,p,info,amold,vmold,imold) ! ! Build the multilevel preconditioner ! - call mld_mlprec_bld(a,desc_a,p,info,& - & amold=amold,vmold=vmold,imold=imold) + call prec%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='Multilevel preconditioner build.') + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from hierarchy build') goto 9999 - endif + end if + + + call prec%smoothers_build(a,desc_a,info,amold,vmold,imold) + + if (info /= psb_success_) then + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from smoothers build') + goto 9999 + end if + end if - + call psb_erractionrestore(err_act) return diff --git a/mlprec/impl/mld_dprecinit.F90 b/mlprec/impl/mld_dprecinit.F90 index e4ea7b43..be29400a 100644 --- a/mlprec/impl/mld_dprecinit.F90 +++ b/mlprec/impl/mld_dprecinit.F90 @@ -84,12 +84,8 @@ ! lowercase strings). ! info - integer, output. ! Error code. -! nlev - integer, optional, input. -! The number of levels of the multilevel preconditioner. -! If nlev is not present and ptype='ML', then nlev=2 -! is assumed. If ptype /= 'ML', nlev is ignored. ! -subroutine mld_dprecinit(p,ptype,info,nlev) +subroutine mld_dprecinit(prec,ptype,info) use psb_base_mod use mld_d_prec_mod, mld_protect_name => mld_dprecinit @@ -109,10 +105,9 @@ subroutine mld_dprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_dprec_type), intent(inout) :: p + class(mld_dprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables integer(psb_ipk_) :: nlev_, ilev_ @@ -120,99 +115,94 @@ subroutine mld_dprecinit(p,ptype,info,nlev) character(len=*), parameter :: name='mld_precinit' info = psb_success_ - if (allocated(p%precv)) then - call mld_precfree(p,info) + if (allocated(prec%precv)) then + call prec%free(info) if (info /= psb_success_) then ! Do we want to do something? endif endif - p%coarse_aggr_size = -1 + prec%coarse_aggr_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_d_base_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_d_base_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_d_id_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_d_id_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('JAC','DIAG','JACOBI') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_d_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_d_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_d_diag_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_d_diag_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('BJAC') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_d_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_d_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_d_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_d_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('AS') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_d_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_d_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_d_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_d_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('ML') - if (present(nlev)) then - nlev_ = max(1,nlev) - p%max_prec_levs = nlev_ - else - nlev_ = p%max_prec_levs - end if + nlev_ = prec%max_prec_levs ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_d_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_d_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_d_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_d_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() if (nlev_ == 1) return do ilev_ = 2, nlev_ -1 - allocate(mld_d_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_d_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_d_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_d_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() end do ilev_ = nlev_ - allocate(mld_d_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_d_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return #if defined(HAVE_UMF_) - allocate(mld_d_umf_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_d_umf_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #elif defined(HAVE_SLU_) - allocate(mld_d_slu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_d_slu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #else - allocate(mld_d_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_d_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #endif - call p%precv(ilev_)%default() - p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) - call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) + call prec%precv(ilev_)%default() + prec%precv(ilev_)%parms%coarse_solve = mld_bjac_ + call prec%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) + call prec%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.05_psb_dpk_ scale = 1.0_psb_dpk_ do ilev_=1,nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info) - call p%precv(ilev_)%set(mld_aggr_scale_,scale,info) - call p%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) + call prec%precv(ilev_)%set(mld_aggr_thresh_,thr,info) + call prec%precv(ilev_)%set(mld_aggr_scale_,scale,info) + call prec%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) end do case default diff --git a/mlprec/impl/mld_s_dec_map_bld.f90 b/mlprec/impl/mld_s_dec_map_bld.f90 index 6753f2ba..fc10a736 100644 --- a/mlprec/impl/mld_s_dec_map_bld.f90 +++ b/mlprec/impl/mld_s_dec_map_bld.f90 @@ -72,6 +72,7 @@ subroutine mld_s_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_s_dec_map_bld implicit none diff --git a/mlprec/impl/mld_s_hierarchy_bld.f90 b/mlprec/impl/mld_s_hierarchy_bld.f90 index 9cea899d..bf3964a8 100644 --- a/mlprec/impl/mld_s_hierarchy_bld.f90 +++ b/mlprec/impl/mld_s_hierarchy_bld.f90 @@ -65,7 +65,7 @@ ! info - integer, output. ! Error code. ! -subroutine mld_s_hierarchy_bld(a,desc_a,p,info) +subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) use psb_base_mod use mld_s_inner_mod @@ -76,7 +76,7 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! Arguments type(psb_sspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_sprec_type),intent(inout),target :: p + class(mld_sprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info !!$ character, intent(in), optional :: upd @@ -106,7 +106,7 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' @@ -127,7 +127,7 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_sprecinit info=3111 call psb_errpush(info,name) @@ -138,31 +138,31 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = p%coarse_aggr_size - mxplevs = p%max_prec_levs - mnaggratio = p%min_aggr_ratio - casize = p%coarse_aggr_size - iszv = size(p%precv) + casize = prec%coarse_aggr_size + mxplevs = prec%max_prec_levs + mnaggratio = prec%min_aggr_ratio + casize = prec%coarse_aggr_size + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) call psb_bcast(ictxt,casize) call psb_bcast(ictxt,mxplevs) call psb_bcast(ictxt,mnaggratio) - if (casize /= p%coarse_aggr_size) then + if (casize /= prec%coarse_aggr_size) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= prec%max_prec_levs) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= prec%min_aggr_ratio) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') goto 9999 end if - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -182,8 +182,8 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! This is OK, since it may be called by the user even if there ! is only one level ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a call psb_erractionrestore(err_act) return @@ -213,13 +213,13 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) end if nplevs = max(itwo,mxplevs) - coarseparms = p%precv(iszv)%parms - baseparms = p%precv(1)%parms - medparms = p%precv(2)%parms + coarseparms = prec%precv(iszv)%parms + baseparms = prec%precv(1)%parms + medparms = prec%precv(2)%parms - call save_smoothers(p%precv(iszv),coarse_sm,coarse_sm2,info) - if (info == 0) call save_smoothers(p%precv(2),med_sm,med_sm2,info) - if (info == 0) call save_smoothers(p%precv(1),base_sm,base_sm2,info) + call save_smoothers(prec%precv(iszv),coarse_sm,coarse_sm2,info) + if (info == 0) call save_smoothers(prec%precv(2),med_sm,med_sm2,info) + if (info == 0) call save_smoothers(prec%precv(1),base_sm,base_sm2,info) if (info /= psb_success_) then write(0,*) 'Error in saving smoothers',info call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') @@ -232,10 +232,10 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) allocate(tprecv(nplevs),stat=info) ! First all existing levels if (info == 0) tprecv(1)%parms = baseparms - if (info == 0) call restore_smoothers(tprecv(1),p%precv(1)%sm,p%precv(1)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(1),prec%precv(1)%sm,prec%precv(1)%sm2a,info) do i=2, min(iszv,nplevs) - 1 if (info == 0) tprecv(i)%parms = medparms - if (info == 0) call restore_smoothers(tprecv(i),p%precv(i)%sm,p%precv(i)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(i),prec%precv(i)%sm,prec%precv(i)%sm2a,info) end do ! Further intermediates, if any do i=iszv-1, nplevs - 1 @@ -252,24 +252,24 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) endif do i=1,iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) - iszv = size(p%precv) + call move_alloc(tprecv,prec%precv) + iszv = size(prec%precv) end if ! ! Finest level first; remember to fix base_a and base_desc ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a newsz = 0 array_build_loop: do i=2, iszv ! ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(i)%parms) + call psb_bcast(ictxt,prec%precv(i)%parms) ! ! Sanity checks on the parameters @@ -278,7 +278,7 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! ! A replicated matrix only makes sense at the coarsest level ! - call mld_check_def(p%precv(i)%parms%coarse_mat,'Coarse matrix',& + call mld_check_def(prec%precv(i)%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_distr_ml_coarse_mat) end if @@ -289,8 +289,8 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! Build the mapping between levels i-1 and i and the matrix ! at level i ! - if (info == psb_success_) call mld_aggrmap_bld(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_aggrmap_bld(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -305,7 +305,7 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! ! Save op_prol just in case ! - call op_prol%clone(p%precv(i)%tprol,info) + call op_prol%clone(prec%precv(i)%tprol,info) ! ! Check for early termination of aggregation loop. ! @@ -315,9 +315,9 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) if (i==2) then sizeratio = desc_a%get_global_rows()/sizeratio else - sizeratio = sum(p%precv(i-1)%map%naggr)/sizeratio + sizeratio = sum(prec%precv(i-1)%map%naggr)/sizeratio end if - p%precv(i)%szratio = sizeratio + prec%precv(i)%szratio = sizeratio if (iaggsize <= casize) then newsz = i end if @@ -334,7 +334,7 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) end if end if - if (all(nlaggr == p%precv(i-1)%map%naggr)) then + if (all(nlaggr == prec%precv(i-1)%map%naggr)) then newsz=i-1 if (me == 0) then write(debug_unit,*) trim(name),& @@ -356,27 +356,27 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! This is awkward, we are saving the aggregation parms, for the sake ! of distr/repl matrix at coarse level. Should be rethought. ! - athresh = p%precv(newsz)%parms%aggr_thresh - ascale = p%precv(newsz)%parms%aggr_scale - aomega = p%precv(newsz)%parms%aggr_omega_val - if (info == 0) p%precv(newsz)%parms = coarseparms - p%precv(newsz)%parms%aggr_thresh = athresh - p%precv(newsz)%parms%aggr_scale = ascale - p%precv(newsz)%parms%aggr_omega_val = aomega + athresh = prec%precv(newsz)%parms%aggr_thresh + ascale = prec%precv(newsz)%parms%aggr_scale + aomega = prec%precv(newsz)%parms%aggr_omega_val + if (info == 0) prec%precv(newsz)%parms = coarseparms + prec%precv(newsz)%parms%aggr_thresh = athresh + prec%precv(newsz)%parms%aggr_scale = ascale + prec%precv(newsz)%parms%aggr_omega_val = aomega - if (info == 0) call restore_smoothers(p%precv(newsz),coarse_sm,coarse_sm2,info) + if (info == 0) call restore_smoothers(prec%precv(newsz),coarse_sm,coarse_sm2,info) if (newsz < i) then ! ! We are going back and revisit a previous leve; ! recover the aggregation. ! - ilaggr = p%precv(newsz)%map%iaggr - nlaggr = p%precv(newsz)%map%naggr - call p%precv(newsz)%tprol%clone(op_prol,info) + ilaggr = prec%precv(newsz)%map%iaggr + nlaggr = prec%precv(newsz)%map%naggr + call prec%precv(newsz)%tprol%clone(op_prol,info) end if - if (info == psb_success_) call mld_lev_mat_asb(p%precv(newsz),& - & p%precv(newsz-1)%base_a,p%precv(newsz-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(newsz),& + & prec%precv(newsz-1)%base_a,prec%precv(newsz-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= 0) then call psb_errpush(psb_err_internal_error_,name,& @@ -385,8 +385,8 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) endif exit array_build_loop else - if (info == psb_success_) call mld_lev_mat_asb(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) end if if (info /= psb_success_) then @@ -409,12 +409,12 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) goto 9999 endif do i=1,newsz - call p%precv(i)%move_alloc(tprecv(i),info) + call prec%precv(i)%move_alloc(tprecv(i),info) end do do i=newsz+1, iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) + call move_alloc(tprecv,prec%precv) ! Ignore errors from transfer info = psb_success_ ! @@ -423,10 +423,10 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) ! Fix the pointers, but the level 1 should ! be already OK do i=2, iszv - p%precv(i)%base_a => p%precv(i)%ac - p%precv(i)%base_desc => p%precv(i)%desc_ac - p%precv(i)%map%p_desc_X => p%precv(i-1)%base_desc - p%precv(i)%map%p_desc_Y => p%precv(i)%base_desc + prec%precv(i)%base_a => prec%precv(i)%ac + prec%precv(i)%base_desc => prec%precv(i)%desc_ac + prec%precv(i)%map%p_desc_X => prec%precv(i-1)%base_desc + prec%precv(i)%map%p_desc_Y => prec%precv(i)%base_desc end do end if @@ -436,9 +436,9 @@ subroutine mld_s_hierarchy_bld(a,desc_a,p,info) goto 9999 endif - iszv = size(p%precv) + iszv = size(prec%precv) - call p%cmp_complexity() + call prec%cmp_complexity() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& diff --git a/mlprec/impl/mld_s_lev_aggrmap_bld.f90 b/mlprec/impl/mld_s_lev_aggrmap_bld.f90 index 38cc5487..94ba585d 100644 --- a/mlprec/impl/mld_s_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_s_lev_aggrmap_bld.f90 @@ -1,3 +1,4 @@ + ! ! ! MLD2P4 version 2.1 @@ -77,6 +78,7 @@ subroutine mld_s_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_s_lev_aggrmap_bld implicit none diff --git a/mlprec/impl/mld_s_lev_aggrmat_asb.f90 b/mlprec/impl/mld_s_lev_aggrmat_asb.f90 index 71306f32..a1dc8ad1 100644 --- a/mlprec/impl/mld_s_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_s_lev_aggrmat_asb.f90 @@ -88,6 +88,7 @@ subroutine mld_s_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_s_lev_aggrmat_asb implicit none diff --git a/mlprec/impl/mld_s_smoothers_bld.f90 b/mlprec/impl/mld_s_smoothers_bld.f90 index 4cbfc8af..b6f4e5b9 100644 --- a/mlprec/impl/mld_s_smoothers_bld.f90 +++ b/mlprec/impl/mld_s_smoothers_bld.f90 @@ -79,10 +79,10 @@ ! ! ! -subroutine mld_s_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_s_inner_mod + !use mld_s_inner_mod use mld_s_prec_mod, mld_protect_name => mld_s_smoothers_bld Implicit None @@ -90,7 +90,7 @@ subroutine mld_s_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_sspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_sprec_type),intent(inout),target :: p + class(mld_sprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info class(psb_s_base_sparse_mat), intent(in), optional :: amold class(psb_s_base_vect_type), intent(in), optional :: vmold @@ -140,7 +140,7 @@ subroutine mld_s_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_sprecinit info=3111 call psb_errpush(info,name) @@ -150,9 +150,9 @@ subroutine mld_s_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! Check to ensure all procs have the same ! - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -174,7 +174,7 @@ subroutine mld_s_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call p%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_saggrmap_bld.f90 b/mlprec/impl/mld_saggrmap_bld.f90 index 6b615fd3..89984bb0 100644 --- a/mlprec/impl/mld_saggrmap_bld.f90 +++ b/mlprec/impl/mld_saggrmap_bld.f90 @@ -88,6 +88,7 @@ subroutine mld_saggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_saggrmap_bld implicit none diff --git a/mlprec/impl/mld_saggrmat_asb.f90 b/mlprec/impl/mld_saggrmat_asb.f90 index 31d6fed3..6806a86b 100644 --- a/mlprec/impl/mld_saggrmat_asb.f90 +++ b/mlprec/impl/mld_saggrmat_asb.f90 @@ -120,6 +120,7 @@ subroutine mld_saggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_saggrmat_asb implicit none diff --git a/mlprec/impl/mld_saggrmat_biz_asb.f90 b/mlprec/impl/mld_saggrmat_biz_asb.f90 index 9b4f9eac..d25bd5fb 100644 --- a/mlprec/impl/mld_saggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_saggrmat_biz_asb.f90 @@ -84,6 +84,7 @@ ! subroutine mld_saggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_saggrmat_biz_asb implicit none diff --git a/mlprec/impl/mld_saggrmat_minnrg_asb.f90 b/mlprec/impl/mld_saggrmat_minnrg_asb.f90 index f855c886..2dad8188 100644 --- a/mlprec/impl/mld_saggrmat_minnrg_asb.f90 +++ b/mlprec/impl/mld_saggrmat_minnrg_asb.f90 @@ -112,6 +112,7 @@ ! subroutine mld_saggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_saggrmat_minnrg_asb implicit none diff --git a/mlprec/impl/mld_saggrmat_nosmth_asb.f90 b/mlprec/impl/mld_saggrmat_nosmth_asb.f90 index 6097a0e6..ba99c2a5 100644 --- a/mlprec/impl/mld_saggrmat_nosmth_asb.f90 +++ b/mlprec/impl/mld_saggrmat_nosmth_asb.f90 @@ -100,6 +100,7 @@ ! subroutine mld_saggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_saggrmat_nosmth_asb implicit none diff --git a/mlprec/impl/mld_saggrmat_smth_asb.f90 b/mlprec/impl/mld_saggrmat_smth_asb.f90 index 488ad6a5..e5d83c7e 100644 --- a/mlprec/impl/mld_saggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_saggrmat_smth_asb.f90 @@ -113,6 +113,7 @@ ! subroutine mld_saggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_saggrmat_smth_asb implicit none diff --git a/mlprec/impl/mld_smlprec_aply.f90 b/mlprec/impl/mld_smlprec_aply.f90 index 0fc7b12b..351fef8b 100644 --- a/mlprec/impl/mld_smlprec_aply.f90 +++ b/mlprec/impl/mld_smlprec_aply.f90 @@ -299,6 +299,7 @@ subroutine mld_smlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_smlprec_aply_vect implicit none @@ -1303,6 +1304,7 @@ end subroutine mld_smlprec_aply_vect subroutine mld_smlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_s_inner_mod, mld_protect_name => mld_smlprec_aply implicit none diff --git a/mlprec/impl/mld_smlprec_bld.f90 b/mlprec/impl/mld_smlprec_bld.f90 index c4995324..20674637 100644 --- a/mlprec/impl/mld_smlprec_bld.f90 +++ b/mlprec/impl/mld_smlprec_bld.f90 @@ -123,7 +123,7 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' - call mld_s_hierarchy_bld(a,desc_a,p,info) + call p%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then info=psb_err_internal_error_ @@ -133,7 +133,7 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold) iszv = p%get_nlevs() - call mld_s_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) + call p%smoothers_build(a,desc_a,info,amold,vmold,imold) if (info /= psb_success_) then info=psb_err_internal_error_ diff --git a/mlprec/impl/mld_sprecaply.f90 b/mlprec/impl/mld_sprecaply.f90 index f49159ba..946001df 100644 --- a/mlprec/impl/mld_sprecaply.f90 +++ b/mlprec/impl/mld_sprecaply.f90 @@ -75,7 +75,7 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_s_inner_mod, mld_protect_name => mld_sprecaply + use mld_s_inner_mod!, mld_protect_name => mld_sprecaply implicit none @@ -206,7 +206,7 @@ end subroutine mld_sprecaply subroutine mld_sprecaply1(prec,x,desc_data,info,trans) use psb_base_mod - use mld_s_inner_mod, mld_protect_name => mld_sprecaply1 + use mld_s_inner_mod!, mld_protect_name => mld_sprecaply1 implicit none @@ -240,7 +240,7 @@ subroutine mld_sprecaply1(prec,x,desc_data,info,trans) goto 9999 end if - call mld_precaply(prec,x,ww,desc_data,info,trans=trans,work=w1) + call prec%apply(x,ww,desc_data,info,trans=trans,work=w1) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='mld_precaply') goto 9999 @@ -267,7 +267,7 @@ end subroutine mld_sprecaply1 subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_s_inner_mod, mld_protect_name => mld_sprecaply2_vect + use mld_s_inner_mod!, mld_protect_name => mld_sprecaply2_vect implicit none @@ -368,7 +368,7 @@ end subroutine mld_sprecaply2_vect subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) use psb_base_mod - use mld_s_inner_mod, mld_protect_name => mld_sprecaply1_vect + use mld_s_inner_mod!, mld_protect_name => mld_sprecaply1_vect implicit none diff --git a/mlprec/impl/mld_sprecbld.f90 b/mlprec/impl/mld_sprecbld.f90 index e36f743c..c2e865a6 100644 --- a/mlprec/impl/mld_sprecbld.f90 +++ b/mlprec/impl/mld_sprecbld.f90 @@ -59,10 +59,9 @@ ! info - integer, output. ! Error code. ! -subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_s_inner_mod use mld_s_prec_mod, mld_protect_name => mld_sprecbld Implicit None @@ -70,7 +69,7 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_sspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_sprec_type),intent(inout), target :: p + class(mld_sprec_type),intent(inout), target :: prec integer(psb_ipk_), intent(out) :: info class(psb_s_base_sparse_mat), intent(in), optional :: amold class(psb_s_base_vect_type), intent(in), optional :: vmold @@ -100,7 +99,7 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& @@ -122,7 +121,7 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) !!$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_sprecinit info=3111 call psb_errpush(info,name) @@ -133,9 +132,9 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check to ensure all procs have the same ! newsz = -1 - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -157,31 +156,31 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(1)%parms) + call psb_bcast(ictxt,prec%precv(1)%parms) - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') goto 9999 end if - call p%precv(1)%check(info) - if (info /= psb_success_) then - write(0,*) ' Smoother check error',info - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner check.') - goto 9999 - endif - - call p%precv(1)%sm%build(a,desc_a,upd_,info,& - & amold=amold,vmold=vmold,imold=imold) - if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner build.') - goto 9999 - endif + call prec%precv(1)%check(info) + if (info /= psb_success_) then + write(0,*) ' Smoother check error',info + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner check.') + goto 9999 + endif + + call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + & amold=amold,vmold=vmold,imold=imold) + if (info /= psb_success_) then + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner build.') + goto 9999 + endif ! ! Number of levels > 1 @@ -190,16 +189,25 @@ subroutine mld_sprecbld(a,desc_a,p,info,amold,vmold,imold) ! ! Build the multilevel preconditioner ! - call mld_mlprec_bld(a,desc_a,p,info,& - & amold=amold,vmold=vmold,imold=imold) + call prec%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='Multilevel preconditioner build.') + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from hierarchy build') goto 9999 - endif + end if + + + call prec%smoothers_build(a,desc_a,info,amold,vmold,imold) + + if (info /= psb_success_) then + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from smoothers build') + goto 9999 + end if + end if - + call psb_erractionrestore(err_act) return diff --git a/mlprec/impl/mld_sprecinit.F90 b/mlprec/impl/mld_sprecinit.F90 index 3a224683..427f3a0c 100644 --- a/mlprec/impl/mld_sprecinit.F90 +++ b/mlprec/impl/mld_sprecinit.F90 @@ -84,12 +84,8 @@ ! lowercase strings). ! info - integer, output. ! Error code. -! nlev - integer, optional, input. -! The number of levels of the multilevel preconditioner. -! If nlev is not present and ptype='ML', then nlev=2 -! is assumed. If ptype /= 'ML', nlev is ignored. ! -subroutine mld_sprecinit(p,ptype,info,nlev) +subroutine mld_sprecinit(prec,ptype,info) use psb_base_mod use mld_s_prec_mod, mld_protect_name => mld_sprecinit @@ -106,10 +102,9 @@ subroutine mld_sprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_sprec_type), intent(inout) :: p + class(mld_sprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables integer(psb_ipk_) :: nlev_, ilev_ @@ -117,97 +112,92 @@ subroutine mld_sprecinit(p,ptype,info,nlev) character(len=*), parameter :: name='mld_precinit' info = psb_success_ - if (allocated(p%precv)) then - call mld_precfree(p,info) + if (allocated(prec%precv)) then + call prec%free(info) if (info /= psb_success_) then ! Do we want to do something? endif endif - p%coarse_aggr_size = -1 + prec%coarse_aggr_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_s_base_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_s_base_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_s_id_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_s_id_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('JAC','DIAG','JACOBI') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_s_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_s_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_s_diag_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_s_diag_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('BJAC') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_s_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_s_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_s_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_s_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('AS') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_s_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_s_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_s_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_s_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('ML') - if (present(nlev)) then - nlev_ = max(1,nlev) - p%max_prec_levs = nlev_ - else - nlev_ = p%max_prec_levs - end if + nlev_ = prec%max_prec_levs ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_s_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_s_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_s_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_s_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() if (nlev_ == 1) return do ilev_ = 2, nlev_ -1 - allocate(mld_s_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_s_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_s_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_s_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() end do ilev_ = nlev_ - allocate(mld_s_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_s_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return #if defined(HAVE_SLU_) - allocate(mld_s_slu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_s_slu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #else - allocate(mld_s_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_s_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #endif - call p%precv(ilev_)%default() - p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) - call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) + call prec%precv(ilev_)%default() + prec%precv(ilev_)%parms%coarse_solve = mld_bjac_ + call prec%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) + call prec%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.05_psb_spk_ scale = 1.0_psb_spk_ do ilev_=1,nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info) - call p%precv(ilev_)%set(mld_aggr_scale_,scale,info) - call p%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) + call prec%precv(ilev_)%set(mld_aggr_thresh_,thr,info) + call prec%precv(ilev_)%set(mld_aggr_scale_,scale,info) + call prec%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) end do case default diff --git a/mlprec/impl/mld_z_dec_map_bld.f90 b/mlprec/impl/mld_z_dec_map_bld.f90 index 965ac732..e738b62e 100644 --- a/mlprec/impl/mld_z_dec_map_bld.f90 +++ b/mlprec/impl/mld_z_dec_map_bld.f90 @@ -72,6 +72,7 @@ subroutine mld_z_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_z_dec_map_bld implicit none diff --git a/mlprec/impl/mld_z_hierarchy_bld.f90 b/mlprec/impl/mld_z_hierarchy_bld.f90 index 91904f9f..19b2537d 100644 --- a/mlprec/impl/mld_z_hierarchy_bld.f90 +++ b/mlprec/impl/mld_z_hierarchy_bld.f90 @@ -65,7 +65,7 @@ ! info - integer, output. ! Error code. ! -subroutine mld_z_hierarchy_bld(a,desc_a,p,info) +subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) use psb_base_mod use mld_z_inner_mod @@ -76,7 +76,7 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! Arguments type(psb_zspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_zprec_type),intent(inout),target :: p + class(mld_zprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info !!$ character, intent(in), optional :: upd @@ -106,7 +106,7 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' @@ -127,7 +127,7 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_zprecinit info=3111 call psb_errpush(info,name) @@ -138,31 +138,31 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = p%coarse_aggr_size - mxplevs = p%max_prec_levs - mnaggratio = p%min_aggr_ratio - casize = p%coarse_aggr_size - iszv = size(p%precv) + casize = prec%coarse_aggr_size + mxplevs = prec%max_prec_levs + mnaggratio = prec%min_aggr_ratio + casize = prec%coarse_aggr_size + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) call psb_bcast(ictxt,casize) call psb_bcast(ictxt,mxplevs) call psb_bcast(ictxt,mnaggratio) - if (casize /= p%coarse_aggr_size) then + if (casize /= prec%coarse_aggr_size) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= prec%max_prec_levs) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= prec%min_aggr_ratio) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') goto 9999 end if - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -182,8 +182,8 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! This is OK, since it may be called by the user even if there ! is only one level ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a call psb_erractionrestore(err_act) return @@ -213,13 +213,13 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) end if nplevs = max(itwo,mxplevs) - coarseparms = p%precv(iszv)%parms - baseparms = p%precv(1)%parms - medparms = p%precv(2)%parms + coarseparms = prec%precv(iszv)%parms + baseparms = prec%precv(1)%parms + medparms = prec%precv(2)%parms - call save_smoothers(p%precv(iszv),coarse_sm,coarse_sm2,info) - if (info == 0) call save_smoothers(p%precv(2),med_sm,med_sm2,info) - if (info == 0) call save_smoothers(p%precv(1),base_sm,base_sm2,info) + call save_smoothers(prec%precv(iszv),coarse_sm,coarse_sm2,info) + if (info == 0) call save_smoothers(prec%precv(2),med_sm,med_sm2,info) + if (info == 0) call save_smoothers(prec%precv(1),base_sm,base_sm2,info) if (info /= psb_success_) then write(0,*) 'Error in saving smoothers',info call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') @@ -232,10 +232,10 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) allocate(tprecv(nplevs),stat=info) ! First all existing levels if (info == 0) tprecv(1)%parms = baseparms - if (info == 0) call restore_smoothers(tprecv(1),p%precv(1)%sm,p%precv(1)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(1),prec%precv(1)%sm,prec%precv(1)%sm2a,info) do i=2, min(iszv,nplevs) - 1 if (info == 0) tprecv(i)%parms = medparms - if (info == 0) call restore_smoothers(tprecv(i),p%precv(i)%sm,p%precv(i)%sm2a,info) + if (info == 0) call restore_smoothers(tprecv(i),prec%precv(i)%sm,prec%precv(i)%sm2a,info) end do ! Further intermediates, if any do i=iszv-1, nplevs - 1 @@ -252,24 +252,24 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) endif do i=1,iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) - iszv = size(p%precv) + call move_alloc(tprecv,prec%precv) + iszv = size(prec%precv) end if ! ! Finest level first; remember to fix base_a and base_desc ! - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a newsz = 0 array_build_loop: do i=2, iszv ! ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(i)%parms) + call psb_bcast(ictxt,prec%precv(i)%parms) ! ! Sanity checks on the parameters @@ -278,7 +278,7 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! ! A replicated matrix only makes sense at the coarsest level ! - call mld_check_def(p%precv(i)%parms%coarse_mat,'Coarse matrix',& + call mld_check_def(prec%precv(i)%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_distr_ml_coarse_mat) end if @@ -289,8 +289,8 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! Build the mapping between levels i-1 and i and the matrix ! at level i ! - if (info == psb_success_) call mld_aggrmap_bld(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_aggrmap_bld(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -305,7 +305,7 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! ! Save op_prol just in case ! - call op_prol%clone(p%precv(i)%tprol,info) + call op_prol%clone(prec%precv(i)%tprol,info) ! ! Check for early termination of aggregation loop. ! @@ -315,9 +315,9 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) if (i==2) then sizeratio = desc_a%get_global_rows()/sizeratio else - sizeratio = sum(p%precv(i-1)%map%naggr)/sizeratio + sizeratio = sum(prec%precv(i-1)%map%naggr)/sizeratio end if - p%precv(i)%szratio = sizeratio + prec%precv(i)%szratio = sizeratio if (iaggsize <= casize) then newsz = i end if @@ -334,7 +334,7 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) end if end if - if (all(nlaggr == p%precv(i-1)%map%naggr)) then + if (all(nlaggr == prec%precv(i-1)%map%naggr)) then newsz=i-1 if (me == 0) then write(debug_unit,*) trim(name),& @@ -356,27 +356,27 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! This is awkward, we are saving the aggregation parms, for the sake ! of distr/repl matrix at coarse level. Should be rethought. ! - athresh = p%precv(newsz)%parms%aggr_thresh - ascale = p%precv(newsz)%parms%aggr_scale - aomega = p%precv(newsz)%parms%aggr_omega_val - if (info == 0) p%precv(newsz)%parms = coarseparms - p%precv(newsz)%parms%aggr_thresh = athresh - p%precv(newsz)%parms%aggr_scale = ascale - p%precv(newsz)%parms%aggr_omega_val = aomega + athresh = prec%precv(newsz)%parms%aggr_thresh + ascale = prec%precv(newsz)%parms%aggr_scale + aomega = prec%precv(newsz)%parms%aggr_omega_val + if (info == 0) prec%precv(newsz)%parms = coarseparms + prec%precv(newsz)%parms%aggr_thresh = athresh + prec%precv(newsz)%parms%aggr_scale = ascale + prec%precv(newsz)%parms%aggr_omega_val = aomega - if (info == 0) call restore_smoothers(p%precv(newsz),coarse_sm,coarse_sm2,info) + if (info == 0) call restore_smoothers(prec%precv(newsz),coarse_sm,coarse_sm2,info) if (newsz < i) then ! ! We are going back and revisit a previous leve; ! recover the aggregation. ! - ilaggr = p%precv(newsz)%map%iaggr - nlaggr = p%precv(newsz)%map%naggr - call p%precv(newsz)%tprol%clone(op_prol,info) + ilaggr = prec%precv(newsz)%map%iaggr + nlaggr = prec%precv(newsz)%map%naggr + call prec%precv(newsz)%tprol%clone(op_prol,info) end if - if (info == psb_success_) call mld_lev_mat_asb(p%precv(newsz),& - & p%precv(newsz-1)%base_a,p%precv(newsz-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(newsz),& + & prec%precv(newsz-1)%base_a,prec%precv(newsz-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) if (info /= 0) then call psb_errpush(psb_err_internal_error_,name,& @@ -385,8 +385,8 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) endif exit array_build_loop else - if (info == psb_success_) call mld_lev_mat_asb(p%precv(i),& - & p%precv(i-1)%base_a,p%precv(i-1)%base_desc,& + if (info == psb_success_) call mld_lev_mat_asb(prec%precv(i),& + & prec%precv(i-1)%base_a,prec%precv(i-1)%base_desc,& & ilaggr,nlaggr,op_prol,info) end if if (info /= psb_success_) then @@ -409,12 +409,12 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) goto 9999 endif do i=1,newsz - call p%precv(i)%move_alloc(tprecv(i),info) + call prec%precv(i)%move_alloc(tprecv(i),info) end do do i=newsz+1, iszv - call p%precv(i)%free(info) + call prec%precv(i)%free(info) end do - call move_alloc(tprecv,p%precv) + call move_alloc(tprecv,prec%precv) ! Ignore errors from transfer info = psb_success_ ! @@ -423,10 +423,10 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) ! Fix the pointers, but the level 1 should ! be already OK do i=2, iszv - p%precv(i)%base_a => p%precv(i)%ac - p%precv(i)%base_desc => p%precv(i)%desc_ac - p%precv(i)%map%p_desc_X => p%precv(i-1)%base_desc - p%precv(i)%map%p_desc_Y => p%precv(i)%base_desc + prec%precv(i)%base_a => prec%precv(i)%ac + prec%precv(i)%base_desc => prec%precv(i)%desc_ac + prec%precv(i)%map%p_desc_X => prec%precv(i-1)%base_desc + prec%precv(i)%map%p_desc_Y => prec%precv(i)%base_desc end do end if @@ -436,9 +436,9 @@ subroutine mld_z_hierarchy_bld(a,desc_a,p,info) goto 9999 endif - iszv = size(p%precv) + iszv = size(prec%precv) - call p%cmp_complexity() + call prec%cmp_complexity() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& diff --git a/mlprec/impl/mld_z_lev_aggrmap_bld.f90 b/mlprec/impl/mld_z_lev_aggrmap_bld.f90 index 828add71..10e7acc7 100644 --- a/mlprec/impl/mld_z_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_z_lev_aggrmap_bld.f90 @@ -1,3 +1,4 @@ + ! ! ! MLD2P4 version 2.1 @@ -77,6 +78,7 @@ subroutine mld_z_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_z_lev_aggrmap_bld implicit none diff --git a/mlprec/impl/mld_z_lev_aggrmat_asb.f90 b/mlprec/impl/mld_z_lev_aggrmat_asb.f90 index 5e8db248..45c806e4 100644 --- a/mlprec/impl/mld_z_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_z_lev_aggrmat_asb.f90 @@ -88,6 +88,7 @@ subroutine mld_z_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_z_lev_aggrmat_asb implicit none diff --git a/mlprec/impl/mld_z_smoothers_bld.f90 b/mlprec/impl/mld_z_smoothers_bld.f90 index 3ada3a3b..2fbaa5a6 100644 --- a/mlprec/impl/mld_z_smoothers_bld.f90 +++ b/mlprec/impl/mld_z_smoothers_bld.f90 @@ -79,10 +79,10 @@ ! ! ! -subroutine mld_z_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_z_inner_mod + !use mld_z_inner_mod use mld_z_prec_mod, mld_protect_name => mld_z_smoothers_bld Implicit None @@ -90,7 +90,7 @@ subroutine mld_z_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_zspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_zprec_type),intent(inout),target :: p + class(mld_zprec_type),intent(inout),target :: prec integer(psb_ipk_), intent(out) :: info class(psb_z_base_sparse_mat), intent(in), optional :: amold class(psb_z_base_vect_type), intent(in), optional :: vmold @@ -140,7 +140,7 @@ subroutine mld_z_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! !$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_zprecinit info=3111 call psb_errpush(info,name) @@ -150,9 +150,9 @@ subroutine mld_z_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! Check to ensure all procs have the same ! - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -174,7 +174,7 @@ subroutine mld_z_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call p%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_zaggrmap_bld.f90 b/mlprec/impl/mld_zaggrmap_bld.f90 index 706bd778..8f7eb4d3 100644 --- a/mlprec/impl/mld_zaggrmap_bld.f90 +++ b/mlprec/impl/mld_zaggrmap_bld.f90 @@ -88,6 +88,7 @@ subroutine mld_zaggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zaggrmap_bld implicit none diff --git a/mlprec/impl/mld_zaggrmat_asb.f90 b/mlprec/impl/mld_zaggrmat_asb.f90 index 69f8a2d7..b1525418 100644 --- a/mlprec/impl/mld_zaggrmat_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_asb.f90 @@ -120,6 +120,7 @@ subroutine mld_zaggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zaggrmat_asb implicit none diff --git a/mlprec/impl/mld_zaggrmat_biz_asb.f90 b/mlprec/impl/mld_zaggrmat_biz_asb.f90 index b0c154dd..d3236d36 100644 --- a/mlprec/impl/mld_zaggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_biz_asb.f90 @@ -84,6 +84,7 @@ ! subroutine mld_zaggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zaggrmat_biz_asb implicit none diff --git a/mlprec/impl/mld_zaggrmat_minnrg_asb.f90 b/mlprec/impl/mld_zaggrmat_minnrg_asb.f90 index 314fcd94..9f9d7e18 100644 --- a/mlprec/impl/mld_zaggrmat_minnrg_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_minnrg_asb.f90 @@ -112,6 +112,7 @@ ! subroutine mld_zaggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zaggrmat_minnrg_asb implicit none diff --git a/mlprec/impl/mld_zaggrmat_nosmth_asb.f90 b/mlprec/impl/mld_zaggrmat_nosmth_asb.f90 index 474ff222..977d1cf7 100644 --- a/mlprec/impl/mld_zaggrmat_nosmth_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_nosmth_asb.f90 @@ -100,6 +100,7 @@ ! subroutine mld_zaggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zaggrmat_nosmth_asb implicit none diff --git a/mlprec/impl/mld_zaggrmat_smth_asb.f90 b/mlprec/impl/mld_zaggrmat_smth_asb.f90 index 92825e22..2dddf177 100644 --- a/mlprec/impl/mld_zaggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_smth_asb.f90 @@ -113,6 +113,7 @@ ! subroutine mld_zaggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zaggrmat_smth_asb implicit none diff --git a/mlprec/impl/mld_zmlprec_aply.f90 b/mlprec/impl/mld_zmlprec_aply.f90 index 22e396f6..56b2ad54 100644 --- a/mlprec/impl/mld_zmlprec_aply.f90 +++ b/mlprec/impl/mld_zmlprec_aply.f90 @@ -299,6 +299,7 @@ subroutine mld_zmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zmlprec_aply_vect implicit none @@ -1303,6 +1304,7 @@ end subroutine mld_zmlprec_aply_vect subroutine mld_zmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) use psb_base_mod + use mld_base_prec_type use mld_z_inner_mod, mld_protect_name => mld_zmlprec_aply implicit none diff --git a/mlprec/impl/mld_zmlprec_bld.f90 b/mlprec/impl/mld_zmlprec_bld.f90 index 6b2c7af3..58349f14 100644 --- a/mlprec/impl/mld_zmlprec_bld.f90 +++ b/mlprec/impl/mld_zmlprec_bld.f90 @@ -123,7 +123,7 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' - call mld_z_hierarchy_bld(a,desc_a,p,info) + call p%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then info=psb_err_internal_error_ @@ -133,7 +133,7 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold) iszv = p%get_nlevs() - call mld_z_smoothers_bld(a,desc_a,p,info,amold,vmold,imold) + call p%smoothers_build(a,desc_a,info,amold,vmold,imold) if (info /= psb_success_) then info=psb_err_internal_error_ diff --git a/mlprec/impl/mld_zprecaply.f90 b/mlprec/impl/mld_zprecaply.f90 index 1b5732cb..96d32a2a 100644 --- a/mlprec/impl/mld_zprecaply.f90 +++ b/mlprec/impl/mld_zprecaply.f90 @@ -75,7 +75,7 @@ subroutine mld_zprecaply(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_z_inner_mod, mld_protect_name => mld_zprecaply + use mld_z_inner_mod!, mld_protect_name => mld_zprecaply implicit none @@ -206,7 +206,7 @@ end subroutine mld_zprecaply subroutine mld_zprecaply1(prec,x,desc_data,info,trans) use psb_base_mod - use mld_z_inner_mod, mld_protect_name => mld_zprecaply1 + use mld_z_inner_mod!, mld_protect_name => mld_zprecaply1 implicit none @@ -240,7 +240,7 @@ subroutine mld_zprecaply1(prec,x,desc_data,info,trans) goto 9999 end if - call mld_precaply(prec,x,ww,desc_data,info,trans=trans,work=w1) + call prec%apply(x,ww,desc_data,info,trans=trans,work=w1) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,a_err='mld_precaply') goto 9999 @@ -267,7 +267,7 @@ end subroutine mld_zprecaply1 subroutine mld_zprecaply2_vect(prec,x,y,desc_data,info,trans,work) use psb_base_mod - use mld_z_inner_mod, mld_protect_name => mld_zprecaply2_vect + use mld_z_inner_mod!, mld_protect_name => mld_zprecaply2_vect implicit none @@ -368,7 +368,7 @@ end subroutine mld_zprecaply2_vect subroutine mld_zprecaply1_vect(prec,x,desc_data,info,trans,work) use psb_base_mod - use mld_z_inner_mod, mld_protect_name => mld_zprecaply1_vect + use mld_z_inner_mod!, mld_protect_name => mld_zprecaply1_vect implicit none diff --git a/mlprec/impl/mld_zprecbld.f90 b/mlprec/impl/mld_zprecbld.f90 index 1632334a..6e9a12d9 100644 --- a/mlprec/impl/mld_zprecbld.f90 +++ b/mlprec/impl/mld_zprecbld.f90 @@ -59,10 +59,9 @@ ! info - integer, output. ! Error code. ! -subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) +subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) use psb_base_mod - use mld_z_inner_mod use mld_z_prec_mod, mld_protect_name => mld_zprecbld Implicit None @@ -70,7 +69,7 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) ! Arguments type(psb_zspmat_type),intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a - type(mld_zprec_type),intent(inout), target :: p + class(mld_zprec_type),intent(inout), target :: prec integer(psb_ipk_), intent(out) :: info class(psb_z_base_sparse_mat), intent(in), optional :: amold class(psb_z_base_vect_type), intent(in), optional :: vmold @@ -100,7 +99,7 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) int_err(1) = 0 ictxt = desc_a%get_context() call psb_info(ictxt, me, np) - p%ictxt = ictxt + prec%ictxt = ictxt if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& @@ -122,7 +121,7 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) !!$ endif upd_ = 'F' - if (.not.allocated(p%precv)) then + if (.not.allocated(prec%precv)) then !! Error: should have called mld_zprecinit info=3111 call psb_errpush(info,name) @@ -133,9 +132,9 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check to ensure all procs have the same ! newsz = -1 - iszv = size(p%precv) + iszv = size(prec%precv) call psb_bcast(ictxt,iszv) - if (iszv /= size(p%precv)) then + if (iszv /= size(prec%precv)) then info=psb_err_internal_error_ call psb_errpush(info,name,a_err='Inconsistent size of precv') goto 9999 @@ -157,31 +156,31 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) ! Check on the iprcparm contents: they should be the same ! on all processes. ! - call psb_bcast(ictxt,p%precv(1)%parms) + call psb_bcast(ictxt,prec%precv(1)%parms) - p%precv(1)%base_a => a - p%precv(1)%base_desc => desc_a + prec%precv(1)%base_a => a + prec%precv(1)%base_desc => desc_a if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') goto 9999 end if - call p%precv(1)%check(info) - if (info /= psb_success_) then - write(0,*) ' Smoother check error',info - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner check.') - goto 9999 - endif - - call p%precv(1)%sm%build(a,desc_a,upd_,info,& - & amold=amold,vmold=vmold,imold=imold) - if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='One level preconditioner build.') - goto 9999 - endif + call prec%precv(1)%check(info) + if (info /= psb_success_) then + write(0,*) ' Smoother check error',info + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner check.') + goto 9999 + endif + + call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + & amold=amold,vmold=vmold,imold=imold) + if (info /= psb_success_) then + call psb_errpush(psb_err_internal_error_,name,& + & a_err='One level preconditioner build.') + goto 9999 + endif ! ! Number of levels > 1 @@ -190,16 +189,25 @@ subroutine mld_zprecbld(a,desc_a,p,info,amold,vmold,imold) ! ! Build the multilevel preconditioner ! - call mld_mlprec_bld(a,desc_a,p,info,& - & amold=amold,vmold=vmold,imold=imold) + call prec%hierarchy_build(a,desc_a,info) if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,name,& - & a_err='Multilevel preconditioner build.') + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from hierarchy build') goto 9999 - endif + end if + + + call prec%smoothers_build(a,desc_a,info,amold,vmold,imold) + + if (info /= psb_success_) then + info=psb_err_internal_error_ + call psb_errpush(info,name,a_err='Error from smoothers build') + goto 9999 + end if + end if - + call psb_erractionrestore(err_act) return diff --git a/mlprec/impl/mld_zprecinit.F90 b/mlprec/impl/mld_zprecinit.F90 index fe6e8ed6..20e03db0 100644 --- a/mlprec/impl/mld_zprecinit.F90 +++ b/mlprec/impl/mld_zprecinit.F90 @@ -84,12 +84,8 @@ ! lowercase strings). ! info - integer, output. ! Error code. -! nlev - integer, optional, input. -! The number of levels of the multilevel preconditioner. -! If nlev is not present and ptype='ML', then nlev=2 -! is assumed. If ptype /= 'ML', nlev is ignored. ! -subroutine mld_zprecinit(p,ptype,info,nlev) +subroutine mld_zprecinit(prec,ptype,info) use psb_base_mod use mld_z_prec_mod, mld_protect_name => mld_zprecinit @@ -109,10 +105,9 @@ subroutine mld_zprecinit(p,ptype,info,nlev) implicit none ! Arguments - type(mld_zprec_type), intent(inout) :: p + class(mld_zprec_type), intent(inout) :: prec character(len=*), intent(in) :: ptype integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev ! Local variables integer(psb_ipk_) :: nlev_, ilev_ @@ -120,99 +115,94 @@ subroutine mld_zprecinit(p,ptype,info,nlev) character(len=*), parameter :: name='mld_precinit' info = psb_success_ - if (allocated(p%precv)) then - call mld_precfree(p,info) + if (allocated(prec%precv)) then + call prec%free(info) if (info /= psb_success_) then ! Do we want to do something? endif endif - p%coarse_aggr_size = -1 + prec%coarse_aggr_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_z_base_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_z_base_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_z_id_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_z_id_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('JAC','DIAG','JACOBI') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_z_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_z_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_z_diag_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_z_diag_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('BJAC') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_z_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_z_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_z_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_z_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('AS') nlev_ = 1 ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_z_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_z_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_z_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_z_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() case ('ML') - if (present(nlev)) then - nlev_ = max(1,nlev) - p%max_prec_levs = nlev_ - else - nlev_ = p%max_prec_levs - end if + nlev_ = prec%max_prec_levs ilev_ = 1 - allocate(p%precv(nlev_),stat=info) - allocate(mld_z_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(prec%precv(nlev_),stat=info) + allocate(mld_z_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_z_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_z_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() if (nlev_ == 1) return do ilev_ = 2, nlev_ -1 - allocate(mld_z_as_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_z_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return - allocate(mld_z_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) - call p%precv(ilev_)%default() + allocate(mld_z_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) + call prec%precv(ilev_)%default() end do ilev_ = nlev_ - allocate(mld_z_jac_smoother_type :: p%precv(ilev_)%sm, stat=info) + allocate(mld_z_jac_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return #if defined(HAVE_UMF_) - allocate(mld_z_umf_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_z_umf_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #elif defined(HAVE_SLU_) - allocate(mld_z_slu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_z_slu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #else - allocate(mld_z_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info) + allocate(mld_z_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) #endif - call p%precv(ilev_)%default() - p%precv(ilev_)%parms%coarse_solve = mld_bjac_ - call p%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) - call p%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) - call p%precv(ilev_)%set(mld_sub_ovr_,izero,info) + call prec%precv(ilev_)%default() + prec%precv(ilev_)%parms%coarse_solve = mld_bjac_ + call prec%precv(ilev_)%set(mld_smoother_sweeps_,4_psb_ipk_,info) + call prec%precv(ilev_)%set(mld_sub_restr_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_prol_,psb_none_,info) + call prec%precv(ilev_)%set(mld_sub_ovr_,izero,info) thr = 0.05_psb_dpk_ scale = 1.0_psb_dpk_ do ilev_=1,nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info) - call p%precv(ilev_)%set(mld_aggr_scale_,scale,info) - call p%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) + call prec%precv(ilev_)%set(mld_aggr_thresh_,thr,info) + call prec%precv(ilev_)%set(mld_aggr_scale_,scale,info) + call prec%precv(ilev_)%set(mld_aggr_filter_,mld_filter_mat_,info) end do case default diff --git a/mlprec/impl/smoother/Makefile b/mlprec/impl/smoother/Makefile index 7e955820..2a4490ab 100644 --- a/mlprec/impl/smoother/Makefile +++ b/mlprec/impl/smoother/Makefile @@ -171,7 +171,7 @@ lib: $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) mpobjs: - (make $(MPFOBJS) F90="$(MPF90)" F90COPT="$(F90COPT)") + (make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)") (make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)") veryclean: clean diff --git a/mlprec/impl/solver/Makefile b/mlprec/impl/solver/Makefile index 2865a322..f7531521 100644 --- a/mlprec/impl/solver/Makefile +++ b/mlprec/impl/solver/Makefile @@ -184,7 +184,7 @@ lib: $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) mpobjs: - (make $(MPFOBJS) F90="$(MPF90)" F90COPT="$(F90COPT)") + (make $(MPFOBJS) FC="$(MPFC)" FCOPT="$(FCOPT)") (make $(MPCOBJS) CC="$(MPCC)" CCOPT="$(CCOPT)") veryclean: clean diff --git a/mlprec/mld_c_inner_mod.f90 b/mlprec/mld_c_inner_mod.f90 index f3e18a3f..ceb45c10 100644 --- a/mlprec/mld_c_inner_mod.f90 +++ b/mlprec/mld_c_inner_mod.f90 @@ -46,13 +46,17 @@ ! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_c_inner_mod - use mld_c_prec_type +! use mld_c_prec_type, only : mld_c_prec_type + use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_i_base_vect_type, & + & psb_spk_, psb_c_base_sparse_mat, psb_c_base_vect_type, psb_ipk_, & + & psb_c_vect_type + use mld_c_prec_type, only : mld_cprec_type, mld_sml_parms, mld_c_onelev_type interface mld_mlprec_bld subroutine mld_cmlprec_bld(a,desc_a,prec,info, amold, vmold,imold) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_i_base_vect_type, & + import :: psb_cspmat_type, psb_desc_type, psb_i_base_vect_type, & & psb_spk_, psb_c_base_sparse_mat, psb_c_base_vect_type, psb_ipk_ - use mld_c_prec_type, only : mld_cprec_type + import :: mld_cprec_type implicit none type(psb_cspmat_type), intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a @@ -61,14 +65,13 @@ module mld_c_inner_mod class(psb_c_base_sparse_mat), intent(in), optional :: amold class(psb_c_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold -! !$ character, intent(in),optional :: upd end subroutine mld_cmlprec_bld end interface mld_mlprec_bld interface mld_mlprec_aply subroutine mld_cmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_c_prec_type, only : mld_cprec_type + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_cprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_cprec_type), intent(inout) :: p @@ -80,9 +83,9 @@ module mld_c_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_cmlprec_aply subroutine mld_cmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, & + import :: psb_cspmat_type, psb_desc_type, & & psb_spk_, psb_c_vect_type, psb_ipk_ - use mld_c_prec_type, only : mld_cprec_type + import :: mld_cprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_cprec_type), intent(inout) :: p @@ -97,8 +100,8 @@ module mld_c_inner_mod interface mld_aggrmap_bld subroutine mld_c_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_c_prec_type, only : mld_c_onelev_type + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_c_onelev_type implicit none type(mld_c_onelev_type), intent(inout), target :: p type(psb_cspmat_type), intent(in) :: a @@ -108,7 +111,7 @@ module mld_c_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_c_lev_aggrmap_bld subroutine mld_caggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder integer(psb_ipk_), intent(in) :: aggr_type @@ -124,7 +127,7 @@ module mld_c_inner_mod interface mld_dec_map_bld subroutine mld_c_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder type(psb_cspmat_type), intent(in) :: a @@ -138,8 +141,8 @@ module mld_c_inner_mod interface mld_lev_mat_asb subroutine mld_c_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_c_prec_type, only : mld_c_onelev_type + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_c_onelev_type implicit none type(mld_c_onelev_type), intent(inout), target :: p type(psb_cspmat_type), intent(in) :: a @@ -152,8 +155,8 @@ module mld_c_inner_mod interface mld_aggrmat_asb subroutine mld_caggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_c_prec_type, only : mld_sml_parms + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_sml_parms implicit none type(psb_cspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a @@ -166,8 +169,8 @@ module mld_c_inner_mod abstract interface subroutine mld_caggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_c_prec_type, only : mld_c_onelev_type, mld_sml_parms + import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_c_onelev_type, mld_sml_parms implicit none type(psb_cspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a diff --git a/mlprec/mld_c_onelev_mod.f90 b/mlprec/mld_c_onelev_mod.f90 index 9c633d25..a2facb61 100644 --- a/mlprec/mld_c_onelev_mod.f90 +++ b/mlprec/mld_c_onelev_mod.f90 @@ -435,7 +435,7 @@ contains lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_mult_ml_ + lv%parms%ml_type = mld_vcycle_ml_ lv%parms%aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ lv%parms%aggr_kind = mld_smooth_prol_ diff --git a/mlprec/mld_c_prec_mod.f90 b/mlprec/mld_c_prec_mod.f90 index 360ba8cd..81cf6db6 100644 --- a/mlprec/mld_c_prec_mod.f90 +++ b/mlprec/mld_c_prec_mod.f90 @@ -54,53 +54,12 @@ module mld_c_prec_mod use mld_c_ilu_solver use mld_c_gs_solver - interface mld_precinit - subroutine mld_cprecinit(p,ptype,info,nlev) - import :: psb_cspmat_type, psb_desc_type, psb_spk_, & - & mld_cprec_type, psb_ipk_ - type(mld_cprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev - end subroutine mld_cprecinit - end interface mld_precinit - interface mld_precset module procedure mld_c_iprecsetsm, mld_c_iprecsetsv, & & mld_c_iprecseti, mld_c_iprecsetc, mld_c_iprecsetr, & & mld_c_cprecseti, mld_c_cprecsetc, mld_c_cprecsetr end interface mld_precset - interface mld_precbld - subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_cspmat_type, psb_desc_type, psb_spk_, & - & psb_c_base_sparse_mat, psb_c_base_vect_type, & - & psb_i_base_vect_type, mld_cprec_type, psb_ipk_ - implicit none - type(psb_cspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_cprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_c_base_sparse_mat), intent(in), optional :: amold - class(psb_c_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_cprecbld - end interface mld_precbld - - interface mld_hierarchy_bld - subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) - import :: psb_cspmat_type, psb_desc_type, psb_spk_, & - & mld_cprec_type, psb_ipk_ - implicit none - type(psb_cspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_cprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - ! character, intent(in),optional :: upd - end subroutine mld_c_hierarchy_bld - end interface mld_hierarchy_bld - interface mld_extprol_bld subroutine mld_c_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) import :: psb_cspmat_type, psb_desc_type, psb_spk_, & @@ -121,23 +80,6 @@ module mld_c_prec_mod end subroutine mld_c_extprol_bld end interface mld_extprol_bld - interface mld_smoothers_bld - subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_cspmat_type, psb_desc_type, psb_spk_, & - & psb_c_base_sparse_mat, psb_c_base_vect_type, & - & psb_i_base_vect_type, mld_cprec_type, psb_ipk_ - implicit none - type(psb_cspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_cprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_c_base_sparse_mat), intent(in), optional :: amold - class(psb_c_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_c_smoothers_bld - end interface mld_smoothers_bld - contains subroutine mld_c_iprecsetsm(p,val,info,pos) diff --git a/mlprec/mld_c_prec_type.f90 b/mlprec/mld_c_prec_type.f90 index 60ce904c..92ecd8b2 100644 --- a/mlprec/mld_c_prec_type.f90 +++ b/mlprec/mld_c_prec_type.f90 @@ -136,6 +136,11 @@ module mld_c_prec_type procedure, pass(prec) :: get_smoother => mld_c_get_smootherp procedure, pass(prec) :: get_solver => mld_c_get_solverp procedure, pass(prec) :: move_alloc => c_prec_move_alloc + procedure, pass(prec) :: init => mld_cprecinit + procedure, pass(prec) :: build => mld_cprecbld + procedure, pass(prec) :: hierarchy_build => mld_c_hierarchy_bld + procedure, pass(prec) :: smoothers_build => mld_c_smoothers_bld + procedure, pass(prec) :: descr => mld_cfile_prec_descr end type mld_cprec_type private :: mld_c_dump, mld_c_get_compl, mld_c_cmp_compl,& @@ -160,7 +165,7 @@ module mld_c_prec_type module procedure mld_cprec_sizeof end interface - interface mld_precaply + interface mld_precapply subroutine mld_cprecaply2_vect(prec,x,y,desc_data,info,trans,work) import :: psb_cspmat_type, psb_desc_type, & & psb_spk_, psb_c_vect_type, mld_cprec_type, psb_ipk_ @@ -283,6 +288,63 @@ module mld_c_prec_type end subroutine mld_ccprecsetc end interface + interface mld_precinit + subroutine mld_cprecinit(prec,ptype,info) + import :: psb_cspmat_type, psb_desc_type, psb_spk_, & + & mld_cprec_type, psb_ipk_ + class(mld_cprec_type), intent(inout) :: prec + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + end subroutine mld_cprecinit + end interface mld_precinit + + interface mld_precbld + subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_cspmat_type, psb_desc_type, psb_spk_, & + & psb_c_base_sparse_mat, psb_c_base_vect_type, & + & psb_i_base_vect_type, mld_cprec_type, psb_ipk_ + implicit none + type(psb_cspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_cprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_c_base_sparse_mat), intent(in), optional :: amold + class(psb_c_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_cprecbld + end interface mld_precbld + + interface mld_hierarchy_bld + subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) + import :: psb_cspmat_type, psb_desc_type, psb_spk_, & + & mld_cprec_type, psb_ipk_ + implicit none + type(psb_cspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_cprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + ! character, intent(in),optional :: upd + end subroutine mld_c_hierarchy_bld + end interface mld_hierarchy_bld + + interface mld_smoothers_bld + subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_cspmat_type, psb_desc_type, psb_spk_, & + & psb_c_base_sparse_mat, psb_c_base_vect_type, & + & psb_i_base_vect_type, mld_cprec_type, psb_ipk_ + implicit none + type(psb_cspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_cprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_c_base_sparse_mat), intent(in), optional :: amold + class(psb_c_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_c_smoothers_bld + end interface mld_smoothers_bld + contains ! ! Function returning a pointer to the smoother @@ -450,16 +512,15 @@ contains ! The id of the process printing the message; -1 acts as a wildcard. ! Default is psb_root_ ! - subroutine mld_cfile_prec_descr(p,info,iout,root) + subroutine mld_cfile_prec_descr(prec,iout,root) implicit none ! Arguments - type(mld_cprec_type), intent(in) :: p - integer(psb_ipk_), intent(out) :: info + class(mld_cprec_type), intent(in) :: prec integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin + integer(psb_ipk_) :: ilev, nlev, ilmin, info integer(psb_ipk_) :: ictxt, me, np character(len=20), parameter :: name='mld_file_prec_descr' integer(psb_ipk_) :: iout_ @@ -473,9 +534,9 @@ contains end if if (iout_ < 0) iout_ = 6 - ictxt = p%ictxt + ictxt = prec%ictxt - if (allocated(p%precv)) then + if (allocated(prec%precv)) then call psb_info(ictxt,me,np) if (present(root)) then @@ -492,9 +553,9 @@ contains ! ensured by mld_precbld). ! if (me == root_) then - nlev = size(p%precv) + nlev = size(prec%precv) do ilev = 1, nlev - if (.not.allocated(p%precv(ilev)%sm)) then + if (.not.allocated(prec%precv(ilev)%sm)) then info = 3111 write(iout_,*) ' ',name,& & ': error: inconsistent MLPREC part, should call MLD_PRECINIT' @@ -510,26 +571,26 @@ contains ! if (nlev > 1) then write(iout_,*) 'Multilevel Preconditioner' - write(iout_,*) 'Outer sweeps:',p%outer_sweeps + write(iout_,*) 'Outer sweeps:',prec%outer_sweeps write(iout_,*) write(iout_,*) 'Base preconditioner (smoother) details' endif - call p%precv(1)%sm%descr(info,iout=iout_) + call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return end if - if (allocated(p%precv(1)%sm2a)) then + if (allocated(prec%precv(1)%sm2a)) then write(iout_,*) 'Post smoother details' - call p%precv(1)%sm2a%descr(info,iout=iout_) + call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return @@ -543,11 +604,11 @@ contains write(iout_,*) write(iout_,*) 'Multilevel details' write(iout_,*) ' Number of levels : ',nlev - write(iout_,*) ' Operator complexity: ',p%get_complexity() + write(iout_,*) ' Operator complexity: ',prec%get_complexity() ilmin = 2 if (nlev == 2) ilmin=1 do ilev=ilmin,nlev - call p%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) + call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) end do write(iout_,*) @@ -656,7 +717,7 @@ contains select type(prec) type is (mld_cprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -686,7 +747,7 @@ contains select type(prec) type is (mld_cprec_type) - call mld_precaply(prec,x,desc_data,info,trans,work) + call mld_precapply(prec,x,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -718,7 +779,7 @@ contains select type(prec) type is (mld_cprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -747,7 +808,7 @@ contains select type(prec) type is (mld_cprec_type) - call mld_precaply(prec,x,desc_data,info,trans) + call mld_precapply(prec,x,desc_data,info,trans) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) diff --git a/mlprec/mld_d_inner_mod.f90 b/mlprec/mld_d_inner_mod.f90 index b573f70b..99ee3ffc 100644 --- a/mlprec/mld_d_inner_mod.f90 +++ b/mlprec/mld_d_inner_mod.f90 @@ -46,13 +46,17 @@ ! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_d_inner_mod - use mld_d_prec_type +! use mld_d_prec_type, only : mld_d_prec_type + use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_i_base_vect_type, & + & psb_dpk_, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_ipk_, & + & psb_d_vect_type + use mld_d_prec_type, only : mld_dprec_type, mld_dml_parms, mld_d_onelev_type interface mld_mlprec_bld subroutine mld_dmlprec_bld(a,desc_a,prec,info, amold, vmold,imold) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_i_base_vect_type, & + import :: psb_dspmat_type, psb_desc_type, psb_i_base_vect_type, & & psb_dpk_, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_ipk_ - use mld_d_prec_type, only : mld_dprec_type + import :: mld_dprec_type implicit none type(psb_dspmat_type), intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a @@ -61,14 +65,13 @@ module mld_d_inner_mod class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold -! !$ character, intent(in),optional :: upd end subroutine mld_dmlprec_bld end interface mld_mlprec_bld interface mld_mlprec_aply subroutine mld_dmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_d_prec_type, only : mld_dprec_type + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_dprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_dprec_type), intent(inout) :: p @@ -80,9 +83,9 @@ module mld_d_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_dmlprec_aply subroutine mld_dmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, & + import :: psb_dspmat_type, psb_desc_type, & & psb_dpk_, psb_d_vect_type, psb_ipk_ - use mld_d_prec_type, only : mld_dprec_type + import :: mld_dprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_dprec_type), intent(inout) :: p @@ -97,8 +100,8 @@ module mld_d_inner_mod interface mld_aggrmap_bld subroutine mld_d_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_d_prec_type, only : mld_d_onelev_type + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_d_onelev_type implicit none type(mld_d_onelev_type), intent(inout), target :: p type(psb_dspmat_type), intent(in) :: a @@ -108,7 +111,7 @@ module mld_d_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_d_lev_aggrmap_bld subroutine mld_daggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder integer(psb_ipk_), intent(in) :: aggr_type @@ -124,7 +127,7 @@ module mld_d_inner_mod interface mld_dec_map_bld subroutine mld_d_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder type(psb_dspmat_type), intent(in) :: a @@ -138,8 +141,8 @@ module mld_d_inner_mod interface mld_lev_mat_asb subroutine mld_d_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_d_prec_type, only : mld_d_onelev_type + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_d_onelev_type implicit none type(mld_d_onelev_type), intent(inout), target :: p type(psb_dspmat_type), intent(in) :: a @@ -152,8 +155,8 @@ module mld_d_inner_mod interface mld_aggrmat_asb subroutine mld_daggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_d_prec_type, only : mld_dml_parms + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_dml_parms implicit none type(psb_dspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a @@ -166,8 +169,8 @@ module mld_d_inner_mod abstract interface subroutine mld_daggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_d_prec_type, only : mld_d_onelev_type, mld_dml_parms + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_d_onelev_type, mld_dml_parms implicit none type(psb_dspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a diff --git a/mlprec/mld_d_onelev_mod.f90 b/mlprec/mld_d_onelev_mod.f90 index 65b9d1ee..fecfd8b5 100644 --- a/mlprec/mld_d_onelev_mod.f90 +++ b/mlprec/mld_d_onelev_mod.f90 @@ -435,7 +435,7 @@ contains lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_mult_ml_ + lv%parms%ml_type = mld_vcycle_ml_ lv%parms%aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ lv%parms%aggr_kind = mld_smooth_prol_ diff --git a/mlprec/mld_d_prec_mod.f90 b/mlprec/mld_d_prec_mod.f90 index 31879b92..79a2a6ab 100644 --- a/mlprec/mld_d_prec_mod.f90 +++ b/mlprec/mld_d_prec_mod.f90 @@ -54,53 +54,12 @@ module mld_d_prec_mod use mld_d_ilu_solver use mld_d_gs_solver - interface mld_precinit - subroutine mld_dprecinit(p,ptype,info,nlev) - import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & - & mld_dprec_type, psb_ipk_ - type(mld_dprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev - end subroutine mld_dprecinit - end interface mld_precinit - interface mld_precset module procedure mld_d_iprecsetsm, mld_d_iprecsetsv, & & mld_d_iprecseti, mld_d_iprecsetc, mld_d_iprecsetr, & & mld_d_cprecseti, mld_d_cprecsetc, mld_d_cprecsetr end interface mld_precset -!!$ interface mld_precbld -!!$ subroutine mld_dprecbld(a,desc_a,prec,info,upd,amold,vmold,imold) -!!$ import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & -!!$ & psb_d_base_sparse_mat, psb_d_base_vect_type, & -!!$ & psb_i_base_vect_type, mld_dprec_type, psb_ipk_ -!!$ implicit none -!!$ type(psb_dspmat_type), intent(in), target :: a -!!$ type(psb_desc_type), intent(inout), target :: desc_a -!!$ type(mld_dprec_type), intent(inout), target :: prec -!!$ integer(psb_ipk_), intent(out) :: info -!!$ class(psb_d_base_sparse_mat), intent(in), optional :: amold -!!$ class(psb_d_base_vect_type), intent(in), optional :: vmold -!!$ class(psb_i_base_vect_type), intent(in), optional :: imold -!!$ character, intent(in),optional :: upd -!!$ end subroutine mld_dprecbld -!!$ end interface mld_precbld -!!$ - interface mld_hierarchy_bld - subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) - import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & - & mld_dprec_type, psb_ipk_ - implicit none - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_dprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - ! character, intent(in),optional :: upd - end subroutine mld_d_hierarchy_bld - end interface mld_hierarchy_bld - interface mld_extprol_bld subroutine mld_d_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & @@ -121,23 +80,6 @@ module mld_d_prec_mod end subroutine mld_d_extprol_bld end interface mld_extprol_bld - interface mld_smoothers_bld - subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & - & psb_d_base_sparse_mat, psb_d_base_vect_type, & - & psb_i_base_vect_type, mld_dprec_type, psb_ipk_ - implicit none - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_dprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_d_base_sparse_mat), intent(in), optional :: amold - class(psb_d_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_d_smoothers_bld - end interface mld_smoothers_bld - contains subroutine mld_d_iprecsetsm(p,val,info,pos) diff --git a/mlprec/mld_d_prec_type.f90 b/mlprec/mld_d_prec_type.f90 index 6f85356a..07aafbc5 100644 --- a/mlprec/mld_d_prec_type.f90 +++ b/mlprec/mld_d_prec_type.f90 @@ -136,28 +136,16 @@ module mld_d_prec_type procedure, pass(prec) :: get_smoother => mld_d_get_smootherp procedure, pass(prec) :: get_solver => mld_d_get_solverp procedure, pass(prec) :: move_alloc => d_prec_move_alloc + procedure, pass(prec) :: init => mld_dprecinit procedure, pass(prec) :: build => mld_dprecbld + procedure, pass(prec) :: hierarchy_build => mld_d_hierarchy_bld + procedure, pass(prec) :: smoothers_build => mld_d_smoothers_bld + procedure, pass(prec) :: descr => mld_dfile_prec_descr end type mld_dprec_type private :: mld_d_dump, mld_d_get_compl, mld_d_cmp_compl,& & mld_d_get_nzeros, mld_d_get_nlevs, d_prec_move_alloc - - interface mld_precbld - subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & - & psb_d_base_sparse_mat, psb_d_base_vect_type, & - & psb_i_base_vect_type, mld_dprec_type, psb_ipk_ - implicit none - type(psb_dspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - class(mld_dprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_d_base_sparse_mat), intent(in), optional :: amold - class(psb_d_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - end subroutine mld_dprecbld - end interface mld_precbld ! ! Interfaces to routines for checking the definition of the preconditioner, @@ -177,7 +165,7 @@ module mld_d_prec_type module procedure mld_dprec_sizeof end interface - interface mld_precaply + interface mld_precapply subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) import :: psb_dspmat_type, psb_desc_type, & & psb_dpk_, psb_d_vect_type, mld_dprec_type, psb_ipk_ @@ -300,6 +288,63 @@ module mld_d_prec_type end subroutine mld_dcprecsetc end interface + interface mld_precinit + subroutine mld_dprecinit(prec,ptype,info) + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & + & mld_dprec_type, psb_ipk_ + class(mld_dprec_type), intent(inout) :: prec + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + end subroutine mld_dprecinit + end interface mld_precinit + + interface mld_precbld + subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & + & psb_d_base_sparse_mat, psb_d_base_vect_type, & + & psb_i_base_vect_type, mld_dprec_type, psb_ipk_ + implicit none + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_dprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_d_base_sparse_mat), intent(in), optional :: amold + class(psb_d_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_dprecbld + end interface mld_precbld + + interface mld_hierarchy_bld + subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & + & mld_dprec_type, psb_ipk_ + implicit none + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_dprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + ! character, intent(in),optional :: upd + end subroutine mld_d_hierarchy_bld + end interface mld_hierarchy_bld + + interface mld_smoothers_bld + subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_dspmat_type, psb_desc_type, psb_dpk_, & + & psb_d_base_sparse_mat, psb_d_base_vect_type, & + & psb_i_base_vect_type, mld_dprec_type, psb_ipk_ + implicit none + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_dprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_d_base_sparse_mat), intent(in), optional :: amold + class(psb_d_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_d_smoothers_bld + end interface mld_smoothers_bld + contains ! ! Function returning a pointer to the smoother @@ -467,16 +512,15 @@ contains ! The id of the process printing the message; -1 acts as a wildcard. ! Default is psb_root_ ! - subroutine mld_dfile_prec_descr(p,info,iout,root) + subroutine mld_dfile_prec_descr(prec,iout,root) implicit none ! Arguments - type(mld_dprec_type), intent(in) :: p - integer(psb_ipk_), intent(out) :: info + class(mld_dprec_type), intent(in) :: prec integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin + integer(psb_ipk_) :: ilev, nlev, ilmin, info integer(psb_ipk_) :: ictxt, me, np character(len=20), parameter :: name='mld_file_prec_descr' integer(psb_ipk_) :: iout_ @@ -490,9 +534,9 @@ contains end if if (iout_ < 0) iout_ = 6 - ictxt = p%ictxt + ictxt = prec%ictxt - if (allocated(p%precv)) then + if (allocated(prec%precv)) then call psb_info(ictxt,me,np) if (present(root)) then @@ -509,9 +553,9 @@ contains ! ensured by mld_precbld). ! if (me == root_) then - nlev = size(p%precv) + nlev = size(prec%precv) do ilev = 1, nlev - if (.not.allocated(p%precv(ilev)%sm)) then + if (.not.allocated(prec%precv(ilev)%sm)) then info = 3111 write(iout_,*) ' ',name,& & ': error: inconsistent MLPREC part, should call MLD_PRECINIT' @@ -527,26 +571,26 @@ contains ! if (nlev > 1) then write(iout_,*) 'Multilevel Preconditioner' - write(iout_,*) 'Outer sweeps:',p%outer_sweeps + write(iout_,*) 'Outer sweeps:',prec%outer_sweeps write(iout_,*) write(iout_,*) 'Base preconditioner (smoother) details' endif - call p%precv(1)%sm%descr(info,iout=iout_) + call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return end if - if (allocated(p%precv(1)%sm2a)) then + if (allocated(prec%precv(1)%sm2a)) then write(iout_,*) 'Post smoother details' - call p%precv(1)%sm2a%descr(info,iout=iout_) + call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return @@ -560,11 +604,11 @@ contains write(iout_,*) write(iout_,*) 'Multilevel details' write(iout_,*) ' Number of levels : ',nlev - write(iout_,*) ' Operator complexity: ',p%get_complexity() + write(iout_,*) ' Operator complexity: ',prec%get_complexity() ilmin = 2 if (nlev == 2) ilmin=1 do ilev=ilmin,nlev - call p%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) + call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) end do write(iout_,*) @@ -673,7 +717,7 @@ contains select type(prec) type is (mld_dprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -703,7 +747,7 @@ contains select type(prec) type is (mld_dprec_type) - call mld_precaply(prec,x,desc_data,info,trans,work) + call mld_precapply(prec,x,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -735,7 +779,7 @@ contains select type(prec) type is (mld_dprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -764,7 +808,7 @@ contains select type(prec) type is (mld_dprec_type) - call mld_precaply(prec,x,desc_data,info,trans) + call mld_precapply(prec,x,desc_data,info,trans) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) diff --git a/mlprec/mld_s_inner_mod.f90 b/mlprec/mld_s_inner_mod.f90 index 9c7efbfc..c474071b 100644 --- a/mlprec/mld_s_inner_mod.f90 +++ b/mlprec/mld_s_inner_mod.f90 @@ -46,13 +46,17 @@ ! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_s_inner_mod - use mld_s_prec_type +! use mld_s_prec_type, only : mld_s_prec_type + use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_i_base_vect_type, & + & psb_spk_, psb_s_base_sparse_mat, psb_s_base_vect_type, psb_ipk_, & + & psb_s_vect_type + use mld_s_prec_type, only : mld_sprec_type, mld_sml_parms, mld_s_onelev_type interface mld_mlprec_bld subroutine mld_smlprec_bld(a,desc_a,prec,info, amold, vmold,imold) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_i_base_vect_type, & + import :: psb_sspmat_type, psb_desc_type, psb_i_base_vect_type, & & psb_spk_, psb_s_base_sparse_mat, psb_s_base_vect_type, psb_ipk_ - use mld_s_prec_type, only : mld_sprec_type + import :: mld_sprec_type implicit none type(psb_sspmat_type), intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a @@ -61,14 +65,13 @@ module mld_s_inner_mod class(psb_s_base_sparse_mat), intent(in), optional :: amold class(psb_s_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold -! !$ character, intent(in),optional :: upd end subroutine mld_smlprec_bld end interface mld_mlprec_bld interface mld_mlprec_aply subroutine mld_smlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_s_prec_type, only : mld_sprec_type + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_sprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_sprec_type), intent(inout) :: p @@ -80,9 +83,9 @@ module mld_s_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_smlprec_aply subroutine mld_smlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, & + import :: psb_sspmat_type, psb_desc_type, & & psb_spk_, psb_s_vect_type, psb_ipk_ - use mld_s_prec_type, only : mld_sprec_type + import :: mld_sprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_sprec_type), intent(inout) :: p @@ -97,8 +100,8 @@ module mld_s_inner_mod interface mld_aggrmap_bld subroutine mld_s_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_s_prec_type, only : mld_s_onelev_type + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_s_onelev_type implicit none type(mld_s_onelev_type), intent(inout), target :: p type(psb_sspmat_type), intent(in) :: a @@ -108,7 +111,7 @@ module mld_s_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_s_lev_aggrmap_bld subroutine mld_saggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder integer(psb_ipk_), intent(in) :: aggr_type @@ -124,7 +127,7 @@ module mld_s_inner_mod interface mld_dec_map_bld subroutine mld_s_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder type(psb_sspmat_type), intent(in) :: a @@ -138,8 +141,8 @@ module mld_s_inner_mod interface mld_lev_mat_asb subroutine mld_s_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_s_prec_type, only : mld_s_onelev_type + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_s_onelev_type implicit none type(mld_s_onelev_type), intent(inout), target :: p type(psb_sspmat_type), intent(in) :: a @@ -152,8 +155,8 @@ module mld_s_inner_mod interface mld_aggrmat_asb subroutine mld_saggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_s_prec_type, only : mld_sml_parms + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_sml_parms implicit none type(psb_sspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a @@ -166,8 +169,8 @@ module mld_s_inner_mod abstract interface subroutine mld_saggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ - use mld_s_prec_type, only : mld_s_onelev_type, mld_sml_parms + import :: psb_sspmat_type, psb_desc_type, psb_spk_, psb_ipk_ + import :: mld_s_onelev_type, mld_sml_parms implicit none type(psb_sspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a diff --git a/mlprec/mld_s_onelev_mod.f90 b/mlprec/mld_s_onelev_mod.f90 index 88bbe655..acecd951 100644 --- a/mlprec/mld_s_onelev_mod.f90 +++ b/mlprec/mld_s_onelev_mod.f90 @@ -435,7 +435,7 @@ contains lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_mult_ml_ + lv%parms%ml_type = mld_vcycle_ml_ lv%parms%aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ lv%parms%aggr_kind = mld_smooth_prol_ diff --git a/mlprec/mld_s_prec_mod.f90 b/mlprec/mld_s_prec_mod.f90 index 7dd7ff69..bb1494a8 100644 --- a/mlprec/mld_s_prec_mod.f90 +++ b/mlprec/mld_s_prec_mod.f90 @@ -54,53 +54,12 @@ module mld_s_prec_mod use mld_s_ilu_solver use mld_s_gs_solver - interface mld_precinit - subroutine mld_sprecinit(p,ptype,info,nlev) - import :: psb_sspmat_type, psb_desc_type, psb_spk_, & - & mld_sprec_type, psb_ipk_ - type(mld_sprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev - end subroutine mld_sprecinit - end interface mld_precinit - interface mld_precset module procedure mld_s_iprecsetsm, mld_s_iprecsetsv, & & mld_s_iprecseti, mld_s_iprecsetc, mld_s_iprecsetr, & & mld_s_cprecseti, mld_s_cprecsetc, mld_s_cprecsetr end interface mld_precset - interface mld_precbld - subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_sspmat_type, psb_desc_type, psb_spk_, & - & psb_s_base_sparse_mat, psb_s_base_vect_type, & - & psb_i_base_vect_type, mld_sprec_type, psb_ipk_ - implicit none - type(psb_sspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_sprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_s_base_sparse_mat), intent(in), optional :: amold - class(psb_s_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_sprecbld - end interface mld_precbld - - interface mld_hierarchy_bld - subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) - import :: psb_sspmat_type, psb_desc_type, psb_spk_, & - & mld_sprec_type, psb_ipk_ - implicit none - type(psb_sspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_sprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - ! character, intent(in),optional :: upd - end subroutine mld_s_hierarchy_bld - end interface mld_hierarchy_bld - interface mld_extprol_bld subroutine mld_s_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) import :: psb_sspmat_type, psb_desc_type, psb_spk_, & @@ -121,23 +80,6 @@ module mld_s_prec_mod end subroutine mld_s_extprol_bld end interface mld_extprol_bld - interface mld_smoothers_bld - subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_sspmat_type, psb_desc_type, psb_spk_, & - & psb_s_base_sparse_mat, psb_s_base_vect_type, & - & psb_i_base_vect_type, mld_sprec_type, psb_ipk_ - implicit none - type(psb_sspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_sprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_s_base_sparse_mat), intent(in), optional :: amold - class(psb_s_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_s_smoothers_bld - end interface mld_smoothers_bld - contains subroutine mld_s_iprecsetsm(p,val,info,pos) diff --git a/mlprec/mld_s_prec_type.f90 b/mlprec/mld_s_prec_type.f90 index f6bb18c7..c8aff456 100644 --- a/mlprec/mld_s_prec_type.f90 +++ b/mlprec/mld_s_prec_type.f90 @@ -136,6 +136,11 @@ module mld_s_prec_type procedure, pass(prec) :: get_smoother => mld_s_get_smootherp procedure, pass(prec) :: get_solver => mld_s_get_solverp procedure, pass(prec) :: move_alloc => s_prec_move_alloc + procedure, pass(prec) :: init => mld_sprecinit + procedure, pass(prec) :: build => mld_sprecbld + procedure, pass(prec) :: hierarchy_build => mld_s_hierarchy_bld + procedure, pass(prec) :: smoothers_build => mld_s_smoothers_bld + procedure, pass(prec) :: descr => mld_sfile_prec_descr end type mld_sprec_type private :: mld_s_dump, mld_s_get_compl, mld_s_cmp_compl,& @@ -160,7 +165,7 @@ module mld_s_prec_type module procedure mld_sprec_sizeof end interface - interface mld_precaply + interface mld_precapply subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) import :: psb_sspmat_type, psb_desc_type, & & psb_spk_, psb_s_vect_type, mld_sprec_type, psb_ipk_ @@ -283,6 +288,63 @@ module mld_s_prec_type end subroutine mld_scprecsetc end interface + interface mld_precinit + subroutine mld_sprecinit(prec,ptype,info) + import :: psb_sspmat_type, psb_desc_type, psb_spk_, & + & mld_sprec_type, psb_ipk_ + class(mld_sprec_type), intent(inout) :: prec + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + end subroutine mld_sprecinit + end interface mld_precinit + + interface mld_precbld + subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_sspmat_type, psb_desc_type, psb_spk_, & + & psb_s_base_sparse_mat, psb_s_base_vect_type, & + & psb_i_base_vect_type, mld_sprec_type, psb_ipk_ + implicit none + type(psb_sspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_sprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_s_base_sparse_mat), intent(in), optional :: amold + class(psb_s_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_sprecbld + end interface mld_precbld + + interface mld_hierarchy_bld + subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) + import :: psb_sspmat_type, psb_desc_type, psb_spk_, & + & mld_sprec_type, psb_ipk_ + implicit none + type(psb_sspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_sprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + ! character, intent(in),optional :: upd + end subroutine mld_s_hierarchy_bld + end interface mld_hierarchy_bld + + interface mld_smoothers_bld + subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_sspmat_type, psb_desc_type, psb_spk_, & + & psb_s_base_sparse_mat, psb_s_base_vect_type, & + & psb_i_base_vect_type, mld_sprec_type, psb_ipk_ + implicit none + type(psb_sspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_sprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_s_base_sparse_mat), intent(in), optional :: amold + class(psb_s_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_s_smoothers_bld + end interface mld_smoothers_bld + contains ! ! Function returning a pointer to the smoother @@ -450,16 +512,15 @@ contains ! The id of the process printing the message; -1 acts as a wildcard. ! Default is psb_root_ ! - subroutine mld_sfile_prec_descr(p,info,iout,root) + subroutine mld_sfile_prec_descr(prec,iout,root) implicit none ! Arguments - type(mld_sprec_type), intent(in) :: p - integer(psb_ipk_), intent(out) :: info + class(mld_sprec_type), intent(in) :: prec integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin + integer(psb_ipk_) :: ilev, nlev, ilmin, info integer(psb_ipk_) :: ictxt, me, np character(len=20), parameter :: name='mld_file_prec_descr' integer(psb_ipk_) :: iout_ @@ -473,9 +534,9 @@ contains end if if (iout_ < 0) iout_ = 6 - ictxt = p%ictxt + ictxt = prec%ictxt - if (allocated(p%precv)) then + if (allocated(prec%precv)) then call psb_info(ictxt,me,np) if (present(root)) then @@ -492,9 +553,9 @@ contains ! ensured by mld_precbld). ! if (me == root_) then - nlev = size(p%precv) + nlev = size(prec%precv) do ilev = 1, nlev - if (.not.allocated(p%precv(ilev)%sm)) then + if (.not.allocated(prec%precv(ilev)%sm)) then info = 3111 write(iout_,*) ' ',name,& & ': error: inconsistent MLPREC part, should call MLD_PRECINIT' @@ -510,26 +571,26 @@ contains ! if (nlev > 1) then write(iout_,*) 'Multilevel Preconditioner' - write(iout_,*) 'Outer sweeps:',p%outer_sweeps + write(iout_,*) 'Outer sweeps:',prec%outer_sweeps write(iout_,*) write(iout_,*) 'Base preconditioner (smoother) details' endif - call p%precv(1)%sm%descr(info,iout=iout_) + call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return end if - if (allocated(p%precv(1)%sm2a)) then + if (allocated(prec%precv(1)%sm2a)) then write(iout_,*) 'Post smoother details' - call p%precv(1)%sm2a%descr(info,iout=iout_) + call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return @@ -543,11 +604,11 @@ contains write(iout_,*) write(iout_,*) 'Multilevel details' write(iout_,*) ' Number of levels : ',nlev - write(iout_,*) ' Operator complexity: ',p%get_complexity() + write(iout_,*) ' Operator complexity: ',prec%get_complexity() ilmin = 2 if (nlev == 2) ilmin=1 do ilev=ilmin,nlev - call p%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) + call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) end do write(iout_,*) @@ -656,7 +717,7 @@ contains select type(prec) type is (mld_sprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -686,7 +747,7 @@ contains select type(prec) type is (mld_sprec_type) - call mld_precaply(prec,x,desc_data,info,trans,work) + call mld_precapply(prec,x,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -718,7 +779,7 @@ contains select type(prec) type is (mld_sprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -747,7 +808,7 @@ contains select type(prec) type is (mld_sprec_type) - call mld_precaply(prec,x,desc_data,info,trans) + call mld_precapply(prec,x,desc_data,info,trans) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) diff --git a/mlprec/mld_z_inner_mod.f90 b/mlprec/mld_z_inner_mod.f90 index 948a442d..88dfd655 100644 --- a/mlprec/mld_z_inner_mod.f90 +++ b/mlprec/mld_z_inner_mod.f90 @@ -46,13 +46,17 @@ ! The interfaces of the user level routines are defined in mld_prec_mod.f90. ! module mld_z_inner_mod - use mld_z_prec_type +! use mld_z_prec_type, only : mld_z_prec_type + use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_i_base_vect_type, & + & psb_dpk_, psb_z_base_sparse_mat, psb_z_base_vect_type, psb_ipk_, & + & psb_z_vect_type + use mld_z_prec_type, only : mld_zprec_type, mld_dml_parms, mld_z_onelev_type interface mld_mlprec_bld subroutine mld_zmlprec_bld(a,desc_a,prec,info, amold, vmold,imold) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_i_base_vect_type, & + import :: psb_zspmat_type, psb_desc_type, psb_i_base_vect_type, & & psb_dpk_, psb_z_base_sparse_mat, psb_z_base_vect_type, psb_ipk_ - use mld_z_prec_type, only : mld_zprec_type + import :: mld_zprec_type implicit none type(psb_zspmat_type), intent(in), target :: a type(psb_desc_type), intent(inout), target :: desc_a @@ -61,14 +65,13 @@ module mld_z_inner_mod class(psb_z_base_sparse_mat), intent(in), optional :: amold class(psb_z_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold -! !$ character, intent(in),optional :: upd end subroutine mld_zmlprec_bld end interface mld_mlprec_bld interface mld_mlprec_aply subroutine mld_zmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_z_prec_type, only : mld_zprec_type + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_zprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_zprec_type), intent(inout) :: p @@ -80,9 +83,9 @@ module mld_z_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_zmlprec_aply subroutine mld_zmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, & + import :: psb_zspmat_type, psb_desc_type, & & psb_dpk_, psb_z_vect_type, psb_ipk_ - use mld_z_prec_type, only : mld_zprec_type + import :: mld_zprec_type implicit none type(psb_desc_type),intent(in) :: desc_data type(mld_zprec_type), intent(inout) :: p @@ -97,8 +100,8 @@ module mld_z_inner_mod interface mld_aggrmap_bld subroutine mld_z_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_z_prec_type, only : mld_z_onelev_type + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_z_onelev_type implicit none type(mld_z_onelev_type), intent(inout), target :: p type(psb_zspmat_type), intent(in) :: a @@ -108,7 +111,7 @@ module mld_z_inner_mod integer(psb_ipk_), intent(out) :: info end subroutine mld_z_lev_aggrmap_bld subroutine mld_zaggrmap_bld(aggr_type,iorder,theta,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder integer(psb_ipk_), intent(in) :: aggr_type @@ -124,7 +127,7 @@ module mld_z_inner_mod interface mld_dec_map_bld subroutine mld_z_dec_map_bld(iorder,theta,a,desc_a,nlaggr,ilaggr,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ implicit none integer(psb_ipk_), intent(in) :: iorder type(psb_zspmat_type), intent(in) :: a @@ -138,8 +141,8 @@ module mld_z_inner_mod interface mld_lev_mat_asb subroutine mld_z_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_z_prec_type, only : mld_z_onelev_type + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_z_onelev_type implicit none type(mld_z_onelev_type), intent(inout), target :: p type(psb_zspmat_type), intent(in) :: a @@ -152,8 +155,8 @@ module mld_z_inner_mod interface mld_aggrmat_asb subroutine mld_zaggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_z_prec_type, only : mld_dml_parms + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_dml_parms implicit none type(psb_zspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a @@ -166,8 +169,8 @@ module mld_z_inner_mod abstract interface subroutine mld_zaggrmat_var_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,info) - use psb_base_mod, only : psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ - use mld_z_prec_type, only : mld_z_onelev_type, mld_dml_parms + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, psb_ipk_ + import :: mld_z_onelev_type, mld_dml_parms implicit none type(psb_zspmat_type), intent(in) :: a type(psb_desc_type), intent(in) :: desc_a diff --git a/mlprec/mld_z_onelev_mod.f90 b/mlprec/mld_z_onelev_mod.f90 index b52dbee5..8a71887e 100644 --- a/mlprec/mld_z_onelev_mod.f90 +++ b/mlprec/mld_z_onelev_mod.f90 @@ -435,7 +435,7 @@ contains lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_mult_ml_ + lv%parms%ml_type = mld_vcycle_ml_ lv%parms%aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ lv%parms%aggr_kind = mld_smooth_prol_ diff --git a/mlprec/mld_z_prec_mod.f90 b/mlprec/mld_z_prec_mod.f90 index af3f2411..ac10dd89 100644 --- a/mlprec/mld_z_prec_mod.f90 +++ b/mlprec/mld_z_prec_mod.f90 @@ -54,53 +54,12 @@ module mld_z_prec_mod use mld_z_ilu_solver use mld_z_gs_solver - interface mld_precinit - subroutine mld_zprecinit(p,ptype,info,nlev) - import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & - & mld_zprec_type, psb_ipk_ - type(mld_zprec_type), intent(inout) :: p - character(len=*), intent(in) :: ptype - integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: nlev - end subroutine mld_zprecinit - end interface mld_precinit - interface mld_precset module procedure mld_z_iprecsetsm, mld_z_iprecsetsv, & & mld_z_iprecseti, mld_z_iprecsetc, mld_z_iprecsetr, & & mld_z_cprecseti, mld_z_cprecsetc, mld_z_cprecsetr end interface mld_precset - interface mld_precbld - subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & - & psb_z_base_sparse_mat, psb_z_base_vect_type, & - & psb_i_base_vect_type, mld_zprec_type, psb_ipk_ - implicit none - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_zprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_z_base_sparse_mat), intent(in), optional :: amold - class(psb_z_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_zprecbld - end interface mld_precbld - - interface mld_hierarchy_bld - subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) - import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & - & mld_zprec_type, psb_ipk_ - implicit none - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_zprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - ! character, intent(in),optional :: upd - end subroutine mld_z_hierarchy_bld - end interface mld_hierarchy_bld - interface mld_extprol_bld subroutine mld_z_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & @@ -121,23 +80,6 @@ module mld_z_prec_mod end subroutine mld_z_extprol_bld end interface mld_extprol_bld - interface mld_smoothers_bld - subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) - import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & - & psb_z_base_sparse_mat, psb_z_base_vect_type, & - & psb_i_base_vect_type, mld_zprec_type, psb_ipk_ - implicit none - type(psb_zspmat_type), intent(in), target :: a - type(psb_desc_type), intent(inout), target :: desc_a - type(mld_zprec_type), intent(inout), target :: prec - integer(psb_ipk_), intent(out) :: info - class(psb_z_base_sparse_mat), intent(in), optional :: amold - class(psb_z_base_vect_type), intent(in), optional :: vmold - class(psb_i_base_vect_type), intent(in), optional :: imold - ! character, intent(in),optional :: upd - end subroutine mld_z_smoothers_bld - end interface mld_smoothers_bld - contains subroutine mld_z_iprecsetsm(p,val,info,pos) diff --git a/mlprec/mld_z_prec_type.f90 b/mlprec/mld_z_prec_type.f90 index ef7053c2..25a9a2a6 100644 --- a/mlprec/mld_z_prec_type.f90 +++ b/mlprec/mld_z_prec_type.f90 @@ -136,6 +136,11 @@ module mld_z_prec_type procedure, pass(prec) :: get_smoother => mld_z_get_smootherp procedure, pass(prec) :: get_solver => mld_z_get_solverp procedure, pass(prec) :: move_alloc => z_prec_move_alloc + procedure, pass(prec) :: init => mld_zprecinit + procedure, pass(prec) :: build => mld_zprecbld + procedure, pass(prec) :: hierarchy_build => mld_z_hierarchy_bld + procedure, pass(prec) :: smoothers_build => mld_z_smoothers_bld + procedure, pass(prec) :: descr => mld_zfile_prec_descr end type mld_zprec_type private :: mld_z_dump, mld_z_get_compl, mld_z_cmp_compl,& @@ -160,7 +165,7 @@ module mld_z_prec_type module procedure mld_zprec_sizeof end interface - interface mld_precaply + interface mld_precapply subroutine mld_zprecaply2_vect(prec,x,y,desc_data,info,trans,work) import :: psb_zspmat_type, psb_desc_type, & & psb_dpk_, psb_z_vect_type, mld_zprec_type, psb_ipk_ @@ -283,6 +288,63 @@ module mld_z_prec_type end subroutine mld_zcprecsetc end interface + interface mld_precinit + subroutine mld_zprecinit(prec,ptype,info) + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & + & mld_zprec_type, psb_ipk_ + class(mld_zprec_type), intent(inout) :: prec + character(len=*), intent(in) :: ptype + integer(psb_ipk_), intent(out) :: info + end subroutine mld_zprecinit + end interface mld_precinit + + interface mld_precbld + subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & + & psb_z_base_sparse_mat, psb_z_base_vect_type, & + & psb_i_base_vect_type, mld_zprec_type, psb_ipk_ + implicit none + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_zprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_z_base_sparse_mat), intent(in), optional :: amold + class(psb_z_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_zprecbld + end interface mld_precbld + + interface mld_hierarchy_bld + subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & + & mld_zprec_type, psb_ipk_ + implicit none + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_zprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + ! character, intent(in),optional :: upd + end subroutine mld_z_hierarchy_bld + end interface mld_hierarchy_bld + + interface mld_smoothers_bld + subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) + import :: psb_zspmat_type, psb_desc_type, psb_dpk_, & + & psb_z_base_sparse_mat, psb_z_base_vect_type, & + & psb_i_base_vect_type, mld_zprec_type, psb_ipk_ + implicit none + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type), intent(inout), target :: desc_a + class(mld_zprec_type), intent(inout), target :: prec + integer(psb_ipk_), intent(out) :: info + class(psb_z_base_sparse_mat), intent(in), optional :: amold + class(psb_z_base_vect_type), intent(in), optional :: vmold + class(psb_i_base_vect_type), intent(in), optional :: imold + ! character, intent(in),optional :: upd + end subroutine mld_z_smoothers_bld + end interface mld_smoothers_bld + contains ! ! Function returning a pointer to the smoother @@ -450,16 +512,15 @@ contains ! The id of the process printing the message; -1 acts as a wildcard. ! Default is psb_root_ ! - subroutine mld_zfile_prec_descr(p,info,iout,root) + subroutine mld_zfile_prec_descr(prec,iout,root) implicit none ! Arguments - type(mld_zprec_type), intent(in) :: p - integer(psb_ipk_), intent(out) :: info + class(mld_zprec_type), intent(in) :: prec integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: root ! Local variables - integer(psb_ipk_) :: ilev, nlev, ilmin + integer(psb_ipk_) :: ilev, nlev, ilmin, info integer(psb_ipk_) :: ictxt, me, np character(len=20), parameter :: name='mld_file_prec_descr' integer(psb_ipk_) :: iout_ @@ -473,9 +534,9 @@ contains end if if (iout_ < 0) iout_ = 6 - ictxt = p%ictxt + ictxt = prec%ictxt - if (allocated(p%precv)) then + if (allocated(prec%precv)) then call psb_info(ictxt,me,np) if (present(root)) then @@ -492,9 +553,9 @@ contains ! ensured by mld_precbld). ! if (me == root_) then - nlev = size(p%precv) + nlev = size(prec%precv) do ilev = 1, nlev - if (.not.allocated(p%precv(ilev)%sm)) then + if (.not.allocated(prec%precv(ilev)%sm)) then info = 3111 write(iout_,*) ' ',name,& & ': error: inconsistent MLPREC part, should call MLD_PRECINIT' @@ -510,26 +571,26 @@ contains ! if (nlev > 1) then write(iout_,*) 'Multilevel Preconditioner' - write(iout_,*) 'Outer sweeps:',p%outer_sweeps + write(iout_,*) 'Outer sweeps:',prec%outer_sweeps write(iout_,*) write(iout_,*) 'Base preconditioner (smoother) details' endif - call p%precv(1)%sm%descr(info,iout=iout_) + call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return end if - if (allocated(p%precv(1)%sm2a)) then + if (allocated(prec%precv(1)%sm2a)) then write(iout_,*) 'Post smoother details' - call p%precv(1)%sm2a%descr(info,iout=iout_) + call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (p%precv(1)%parms%sweeps > 1) then + if (prec%precv(1)%parms%sweeps > 1) then write(iout_,*) ' Number of smoother sweeps : ',& - & p%precv(1)%parms%sweeps + & prec%precv(1)%parms%sweeps end if write(iout_,*) return @@ -543,11 +604,11 @@ contains write(iout_,*) write(iout_,*) 'Multilevel details' write(iout_,*) ' Number of levels : ',nlev - write(iout_,*) ' Operator complexity: ',p%get_complexity() + write(iout_,*) ' Operator complexity: ',prec%get_complexity() ilmin = 2 if (nlev == 2) ilmin=1 do ilev=ilmin,nlev - call p%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) + call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) end do write(iout_,*) @@ -656,7 +717,7 @@ contains select type(prec) type is (mld_zprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -686,7 +747,7 @@ contains select type(prec) type is (mld_zprec_type) - call mld_precaply(prec,x,desc_data,info,trans,work) + call mld_precapply(prec,x,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -718,7 +779,7 @@ contains select type(prec) type is (mld_zprec_type) - call mld_precaply(prec,x,y,desc_data,info,trans,work) + call mld_precapply(prec,x,y,desc_data,info,trans,work) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) @@ -747,7 +808,7 @@ contains select type(prec) type is (mld_zprec_type) - call mld_precaply(prec,x,desc_data,info,trans) + call mld_precapply(prec,x,desc_data,info,trans) class default info = psb_err_missing_override_method_ call psb_errpush(info,name) diff --git a/tests/fileread/Makefile b/tests/fileread/Makefile index d7160d92..2c0b14e7 100644 --- a/tests/fileread/Makefile +++ b/tests/fileread/Makefile @@ -15,23 +15,23 @@ EXEDIR=./runs all: mld_sf_sample mld_df_sample mld_cf_sample mld_zf_sample mld_df_sample: $(DFSOBJS) - $(F90LINK) $(LINKOPT) $(DFSOBJS) -o mld_df_sample \ + $(FLINK) $(LINKOPT) $(DFSOBJS) -o mld_df_sample \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_df_sample $(EXEDIR) mld_sf_sample: $(SFSOBJS) - $(F90LINK) $(LINKOPT) $(SFSOBJS) -o mld_sf_sample \ + $(FLINK) $(LINKOPT) $(SFSOBJS) -o mld_sf_sample \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_sf_sample $(EXEDIR) mld_cf_sample: $(CFSOBJS) - $(F90LINK) $(LINKOPT) $(CFSOBJS) -o mld_cf_sample \ + $(FLINK) $(LINKOPT) $(CFSOBJS) -o mld_cf_sample \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_cf_sample $(EXEDIR) mld_zf_sample: $(ZFSOBJS) - $(F90LINK) $(LINKOPT) $(ZFSOBJS) -o mld_zf_sample \ + $(FLINK) $(LINKOPT) $(ZFSOBJS) -o mld_zf_sample \ $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_zf_sample $(EXEDIR) diff --git a/tests/newslv/Makefile b/tests/newslv/Makefile index 5ae882fa..42ac5369 100644 --- a/tests/newslv/Makefile +++ b/tests/newslv/Makefile @@ -13,7 +13,7 @@ all: ppde3d ppde3d: $(PD3DOBJS) - $(F90LINK) $(PD3DOBJS) -o ppde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) $(PD3DOBJS) -o ppde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv ppde3d $(EXEDIR) diff --git a/tests/pdegen/Makefile b/tests/pdegen/Makefile index 51f83c69..e39a0a7c 100644 --- a/tests/pdegen/Makefile +++ b/tests/pdegen/Makefile @@ -11,19 +11,19 @@ EXEDIR=./runs all: mld_s_pde3d mld_d_pde3d mld_s_pde2d mld_d_pde2d mld_d_pde3d: mld_d_pde3d.o data_input.o - $(F90LINK) mld_d_pde3d.o data_input.o -o mld_d_pde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) mld_d_pde3d.o data_input.o -o mld_d_pde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_d_pde3d $(EXEDIR) mld_s_pde3d: mld_s_pde3d.o data_input.o - $(F90LINK) mld_s_pde3d.o data_input.o -o mld_s_pde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) mld_s_pde3d.o data_input.o -o mld_s_pde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_s_pde3d $(EXEDIR) mld_d_pde2d: mld_d_pde2d.o data_input.o - $(F90LINK) mld_d_pde2d.o data_input.o -o mld_d_pde2d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) mld_d_pde2d.o data_input.o -o mld_d_pde2d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_d_pde2d $(EXEDIR) mld_s_pde2d: mld_s_pde2d.o data_input.o - $(F90LINK) mld_s_pde2d.o data_input.o -o mld_s_pde2d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) mld_s_pde2d.o data_input.o -o mld_s_pde2d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) /bin/mv mld_s_pde2d $(EXEDIR) mld_d_pde3d.o mld_s_pde3d.o mld_d_pde2d.o mld_s_pde2d.o: data_input.o diff --git a/tests/pdegen/mld_d_pde2d.f90 b/tests/pdegen/mld_d_pde2d.f90 index df70ed44..db417021 100644 --- a/tests/pdegen/mld_d_pde2d.f90 +++ b/tests/pdegen/mld_d_pde2d.f90 @@ -233,23 +233,23 @@ program mld_d_pde2d ! prepare the preconditioner. ! if (psb_toupper(prectype%prec) == 'ML') then - call mld_precinit(prec,prectype%prec, info) + call prec%init(prectype%prec, info) if (prectype%csize>0)& - & call mld_precset(prec,'coarse_aggr_size', prectype%csize, info) + & call prec%set('coarse_aggr_size', prectype%csize, info) if (prectype%maxlevs>0)& - & call mld_precset(prec,'max_prec_levs', prectype%maxlevs, info) + & call prec%set('max_prec_levs', prectype%maxlevs, info) if (prectype%mnaggratio>0)& - & call mld_precset(prec,'min_aggr_ratio', prectype%mnaggratio, info) + & call prec%set('min_aggr_ratio', prectype%mnaggratio, info) if (prectype%athres >= dzero) & - & call mld_precset(prec,'aggr_thresh', prectype%athres, info) - call mld_precset(prec,'aggr_kind', prectype%aggrkind,info) - call mld_precset(prec,'aggr_alg', prectype%aggr_alg,info) - call mld_precset(prec,'aggr_ord', prectype%aggr_ord,info) - call mld_precset(prec,'aggr_filter', prectype%aggr_filter, info) + & call prec%set('aggr_thresh', prectype%athres, info) + call prec%set('aggr_kind', prectype%aggrkind,info) + call prec%set('aggr_alg', prectype%aggr_alg,info) + call prec%set('aggr_ord', prectype%aggr_ord,info) + call prec%set('aggr_filter', prectype%aggr_filter, info) call psb_barrier(ictxt) t1 = psb_wtime() - call mld_hierarchy_bld(a,desc_a,prec,info) + call prec%hierarchy_build(a,desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -259,27 +259,27 @@ program mld_d_pde2d thier = psb_wtime()-t1 - call mld_precset(prec,'smoother_type', prectype%smther, info) - call mld_precset(prec,'smoother_sweeps', prectype%jsweeps, info) - call mld_precset(prec,'sub_ovr', prectype%novr, info) - call mld_precset(prec,'sub_restr', prectype%restr, info) - call mld_precset(prec,'sub_prol', prectype%prol, info) - call mld_precset(prec,'sub_solve', prectype%solve, info) - call mld_precset(prec,'sub_fillin', prectype%fill1, info) - call mld_precset(prec,'solver_sweeps', prectype%svsweeps, info) - call mld_precset(prec,'sub_iluthrs', prectype%thr1, info) - call mld_precset(prec,'ml_type', prectype%mltype, info) - call mld_precset(prec,'smoother_pos', prectype%smthpos, info) - call mld_precset(prec,'coarse_solve', prectype%csolve, info) - call mld_precset(prec,'coarse_subsolve', prectype%csbsolve,info) - call mld_precset(prec,'coarse_mat', prectype%cmat, info) - call mld_precset(prec,'coarse_fillin', prectype%cfill, info) - call mld_precset(prec,'coarse_iluthrs', prectype%cthres, info) - call mld_precset(prec,'coarse_sweeps', prectype%cjswp, info) + call prec%set('smoother_type', prectype%smther, info) + call prec%set('smoother_sweeps', prectype%jsweeps, info) + call prec%set('sub_ovr', prectype%novr, info) + call prec%set('sub_restr', prectype%restr, info) + call prec%set('sub_prol', prectype%prol, info) + call prec%set('sub_solve', prectype%solve, info) + call prec%set('sub_fillin', prectype%fill1, info) + call prec%set('solver_sweeps', prectype%svsweeps, info) + call prec%set('sub_iluthrs', prectype%thr1, info) + call prec%set('ml_type', prectype%mltype, info) + call prec%set('smoother_pos', prectype%smthpos, info) + call prec%set('coarse_solve', prectype%csolve, info) + call prec%set('coarse_subsolve', prectype%csbsolve,info) + call prec%set('coarse_mat', prectype%cmat, info) + call prec%set('coarse_fillin', prectype%cfill, info) + call prec%set('coarse_iluthrs', prectype%cthres, info) + call prec%set('coarse_sweeps', prectype%cjswp, info) call psb_barrier(ictxt) t1 = psb_wtime() - call mld_smoothers_bld(a,desc_a,prec,info) + call prec%smoothers_build(a,desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -290,19 +290,19 @@ program mld_d_pde2d else nlv = 1 - call mld_precinit(prec,prectype%prec, info) - call mld_precset(prec,'smoother_sweeps', prectype%jsweeps, info) - call mld_precset(prec,'sub_ovr', prectype%novr, info) - call mld_precset(prec,'sub_restr', prectype%restr, info) - call mld_precset(prec,'sub_prol', prectype%prol, info) - call mld_precset(prec,'sub_solve', prectype%solve, info) - call mld_precset(prec,'sub_fillin', prectype%fill1, info) - call mld_precset(prec,'solver_sweeps', prectype%svsweeps, info) - call mld_precset(prec,'sub_iluthrs', prectype%thr1, info) + call prec%init(prectype%prec, info) + call prec%set('smoother_sweeps', prectype%jsweeps, info) + call prec%set('sub_ovr', prectype%novr, info) + call prec%set('sub_restr', prectype%restr, info) + call prec%set('sub_prol', prectype%prol, info) + call prec%set('sub_solve', prectype%solve, info) + call prec%set('sub_fillin', prectype%fill1, info) + call prec%set('solver_sweeps', prectype%svsweeps, info) + call prec%set('sub_iluthrs', prectype%thr1, info) call psb_barrier(ictxt) thier = dzero t1 = psb_wtime() - call mld_precbld(a,desc_a,prec,info) + call prec%build(a,desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -319,7 +319,7 @@ program mld_d_pde2d if (iam == psb_root_) & & write(psb_out_unit,'("Preconditioner time : ",es12.5)') tprec+thier - if (iam == psb_root_) call mld_precdescr(prec,info) + if (iam == psb_root_) call prec%descr(info) if (iam == psb_root_) & & write(psb_out_unit,'(" ")') @@ -378,7 +378,7 @@ program mld_d_pde2d call psb_gefree(b,desc_a,info) call psb_gefree(x,desc_a,info) call psb_spfree(a,desc_a,info) - call mld_precfree(prec,info) + call prec%free(info) call psb_cdfree(desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ diff --git a/tests/pdegen/mld_d_pde3d.f90 b/tests/pdegen/mld_d_pde3d.f90 index 742b521a..2f2f2621 100644 --- a/tests/pdegen/mld_d_pde3d.f90 +++ b/tests/pdegen/mld_d_pde3d.f90 @@ -245,24 +245,23 @@ program mld_d_pde3d ! prepare the preconditioner. ! if (psb_toupper(prectype%prec) == 'ML') then - call mld_precinit(prec,prectype%prec, info) - + call prec%init(prectype%prec, info) if (prectype%csize>0)& - & call mld_precset(prec,'coarse_aggr_size', prectype%csize, info) + & call prec%set('coarse_aggr_size', prectype%csize, info) if (prectype%maxlevs>0)& - & call mld_precset(prec,'max_prec_levs', prectype%maxlevs, info) + & call prec%set('max_prec_levs', prectype%maxlevs, info) if (prectype%mnaggratio>0)& - & call mld_precset(prec,'min_aggr_ratio', prectype%mnaggratio, info) + & call prec%set('min_aggr_ratio', prectype%mnaggratio, info) if (prectype%athres >= dzero) & - & call mld_precset(prec,'aggr_thresh', prectype%athres, info) - call mld_precset(prec,'aggr_kind', prectype%aggrkind,info) - call mld_precset(prec,'aggr_alg', prectype%aggr_alg,info) - call mld_precset(prec,'aggr_ord', prectype%aggr_ord,info) - call mld_precset(prec,'aggr_filter', prectype%aggr_filter, info) + & call prec%set('aggr_thresh', prectype%athres, info) + call prec%set('aggr_kind', prectype%aggrkind,info) + call prec%set('aggr_alg', prectype%aggr_alg,info) + call prec%set('aggr_ord', prectype%aggr_ord,info) + call prec%set('aggr_filter', prectype%aggr_filter, info) call psb_barrier(ictxt) t1 = psb_wtime() - call mld_hierarchy_bld(a,desc_a,prec,info) + call prec%hierarchy_build(a,desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -272,27 +271,27 @@ program mld_d_pde3d thier = psb_wtime()-t1 - call mld_precset(prec,'smoother_type', prectype%smther, info) - call mld_precset(prec,'smoother_sweeps', prectype%jsweeps, info) - call mld_precset(prec,'sub_ovr', prectype%novr, info) - call mld_precset(prec,'sub_restr', prectype%restr, info) - call mld_precset(prec,'sub_prol', prectype%prol, info) - call mld_precset(prec,'sub_solve', prectype%solve, info) - call mld_precset(prec,'sub_fillin', prectype%fill1, info) - call mld_precset(prec,'solver_sweeps', prectype%svsweeps, info) - call mld_precset(prec,'sub_iluthrs', prectype%thr1, info) - call mld_precset(prec,'ml_type', prectype%mltype, info) - call mld_precset(prec,'smoother_pos', prectype%smthpos, info) - call mld_precset(prec,'coarse_solve', prectype%csolve, info) - call mld_precset(prec,'coarse_subsolve', prectype%csbsolve,info) - call mld_precset(prec,'coarse_mat', prectype%cmat, info) - call mld_precset(prec,'coarse_fillin', prectype%cfill, info) - call mld_precset(prec,'coarse_iluthrs', prectype%cthres, info) - call mld_precset(prec,'coarse_sweeps', prectype%cjswp, info) + call prec%set('smoother_type', prectype%smther, info) + call prec%set('smoother_sweeps', prectype%jsweeps, info) + call prec%set('sub_ovr', prectype%novr, info) + call prec%set('sub_restr', prectype%restr, info) + call prec%set('sub_prol', prectype%prol, info) + call prec%set('sub_solve', prectype%solve, info) + call prec%set('sub_fillin', prectype%fill1, info) + call prec%set('solver_sweeps', prectype%svsweeps, info) + call prec%set('sub_iluthrs', prectype%thr1, info) + call prec%set('ml_type', prectype%mltype, info) + call prec%set('smoother_pos', prectype%smthpos, info) + call prec%set('coarse_solve', prectype%csolve, info) + call prec%set('coarse_subsolve', prectype%csbsolve,info) + call prec%set('coarse_mat', prectype%cmat, info) + call prec%set('coarse_fillin', prectype%cfill, info) + call prec%set('coarse_iluthrs', prectype%cthres, info) + call prec%set('coarse_sweeps', prectype%cjswp, info) call psb_barrier(ictxt) t1 = psb_wtime() - call mld_smoothers_bld(a,desc_a,prec,info) + call prec%smoothers_build(a,desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -303,19 +302,19 @@ program mld_d_pde3d else nlv = 1 - call mld_precinit(prec,prectype%prec, info) - call mld_precset(prec,'smoother_sweeps', prectype%jsweeps, info) - call mld_precset(prec,'sub_ovr', prectype%novr, info) - call mld_precset(prec,'sub_restr', prectype%restr, info) - call mld_precset(prec,'sub_prol', prectype%prol, info) - call mld_precset(prec,'sub_solve', prectype%solve, info) - call mld_precset(prec,'sub_fillin', prectype%fill1, info) - call mld_precset(prec,'solver_sweeps', prectype%svsweeps, info) - call mld_precset(prec,'sub_iluthrs', prectype%thr1, info) + call prec%init(prectype%prec, info) + call prec%set('smoother_sweeps', prectype%jsweeps, info) + call prec%set('sub_ovr', prectype%novr, info) + call prec%set('sub_restr', prectype%restr, info) + call prec%set('sub_prol', prectype%prol, info) + call prec%set('sub_solve', prectype%solve, info) + call prec%set('sub_fillin', prectype%fill1, info) + call prec%set('solver_sweeps', prectype%svsweeps, info) + call prec%set('sub_iluthrs', prectype%thr1, info) call psb_barrier(ictxt) thier = dzero t1 = psb_wtime() - call mld_precbld(a,desc_a,prec,info) + call prec%build(a,desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -332,7 +331,7 @@ program mld_d_pde3d if (iam == psb_root_) & & write(psb_out_unit,'("Preconditioner time : ",es12.5)') tprec+thier - if (iam == psb_root_) call mld_precdescr(prec,info) + if (iam == psb_root_) call prec%descr(info) if (iam == psb_root_) & & write(psb_out_unit,'(" ")') @@ -391,7 +390,7 @@ program mld_d_pde3d call psb_gefree(b,desc_a,info) call psb_gefree(x,desc_a,info) call psb_spfree(a,desc_a,info) - call mld_precfree(prec,info) + call prec%free(info) call psb_cdfree(desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ diff --git a/tests/pdegen/runs/mld_pde3d.inp b/tests/pdegen/runs/mld_pde3d.inp index 9f55ce7e..fe93f8d5 100644 --- a/tests/pdegen/runs/mld_pde3d.inp +++ b/tests/pdegen/runs/mld_pde3d.inp @@ -18,7 +18,7 @@ SMOOTHED ! Type of aggregation: SMOOTHED, UNSMOOTHED, MINENER DEC ! Type of aggregation: DEC SYMDEC NATURAL ! Ordering of aggregation: NATURAL DEGREE FILTER ! Filtering aggregation: FILTER NOFILTER -MULT ! Type of multilevel correction: ADD MULT KCYCLE VCYCLE WCYCLE KCYCLESYM +VCYCLE ! Type of multilevel correction: ADD MULT KCYCLE VCYCLE WCYCLE KCYCLESYM TWOSIDE ! Side of correction: PRE POST TWOSIDE (ignored for ADD) 4 ! Smoother sweeps BJAC ! Smoother type JACOBI BJAC AS; ignored for non-ML