diff --git a/configure b/configure index fe9ed175..b27a6ad1 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.1. +# 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.1' -PACKAGE_STRING='MLD2P4 2.1' -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. @@ -674,6 +659,7 @@ MPICC am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -690,6 +676,10 @@ ac_ct_FC LDFLAGS FCFLAGS FC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -743,6 +733,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -756,6 +747,7 @@ enable_option_checking with_psblas with_psblas_incdir with_psblas_libdir +enable_silent_rules enable_dependency_tracking enable_serial with_ccopt @@ -863,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. @@ -909,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 @@ -936,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 @@ -1141,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 @@ -1158,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 @@ -1189,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 ;; @@ -1208,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 @@ -1216,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 @@ -1247,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' @@ -1262,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 @@ -1278,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. @@ -1321,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 @@ -1367,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 @@ -1427,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. @@ -1442,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 @@ -1510,7 +1494,7 @@ 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 @@ -1583,58 +1567,680 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF MLD2P4 configure 2.1 -generated by GNU Autoconf 2.63 +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.1, 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 + +} # ac_fn_c_try_compile + +# 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 + + 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 + +# 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 + +/* 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. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* 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 + +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 + +} # ac_fn_c_check_func + +# 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 + + 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 + +# 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 + +} # 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]; + + ; + 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]; + + ; + 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]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + 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 +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 () +{ + + 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 + (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 + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1671,9 +2277,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + 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 @@ -1689,13 +2295,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append 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_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 @@ -1707,11 +2313,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1720,13 +2324,13 @@ _ASBOX 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 @@ -1745,11 +2349,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1762,11 +2364,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1780,11 +2380,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1798,46 +2396,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + 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 - ac_site_file1=$CONFIG_SITE + # 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 @@ -1848,19 +2453,23 @@ 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 + 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" + . "$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. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # 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";; @@ -1868,7 +2477,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1883,11 +2492,11 @@ for ac_var in $ac_precious_vars; do 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:${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:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $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=: ;; ,);; @@ -1897,17 +2506,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 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:${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:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $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:$LINENO: former value: \`$ac_old_val'" >&5 + { $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:$LINENO: current value: \`$ac_new_val'" >&5 + { $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 @@ -1919,43 +2528,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append 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:${as_lineno-$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:${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_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; }; } + 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' @@ -1973,7 +2559,7 @@ mld2p4_cv_version="2.1" # 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. @@ -2003,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='' @@ -2011,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='' @@ -2019,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='' @@ -2036,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 @@ -2064,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 @@ -2085,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, @@ -2113,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 @@ -2124,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. @@ -2136,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. @@ -2165,7 +2744,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2181,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}. @@ -2192,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. @@ -2264,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 @@ -2276,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'" ;; @@ -2293,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 @@ -2314,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 @@ -2341,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 @@ -2354,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 @@ -2380,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 @@ -2393,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 @@ -2404,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) '* | \ @@ -2416,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 @@ -2428,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 @@ -2458,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 @@ -2483,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 @@ -2495,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;; @@ -2505,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 @@ -2523,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 @@ -2575,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";; @@ -2708,7 +3284,7 @@ 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; } save_FCFLAGS="$FCFLAGS"; @@ -2721,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 @@ -2734,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 @@ -2765,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 @@ -2778,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 @@ -2808,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 @@ -2818,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 @@ -2866,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: @@ -2883,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, @@ -2910,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 @@ -2929,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 @@ -3021,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 @@ -3071,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 @@ -3090,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 @@ -3103,86 +3668,44 @@ 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 + 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 "$as_me:${as_lineno-$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 +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" @@ -3197,6 +3720,11 @@ else fi fi +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' @@ -3215,9 +3743,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_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3228,24 +3756,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_CC="$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 CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $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 @@ -3259,9 +3787,9 @@ if test -z "$CC"; 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_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3272,24 +3800,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_CC="$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_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 "$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 @@ -3302,7 +3830,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 @@ -3311,62 +3839,42 @@ esac fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +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_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; }; }; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$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" +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 -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then +if ${ac_cv_c_compiler_gnu+:} 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. */ int @@ -3380,37 +3888,16 @@ 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_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_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $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 @@ -3419,20 +3906,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$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 +if ${ac_cv_prog_cc_g+:} false; 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3443,35 +3926,11 @@ 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_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 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3482,36 +3941,12 @@ 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 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3522,42 +3957,17 @@ 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_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 "$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 @@ -3574,23 +3984,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $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 test "${ac_cv_prog_cc_c89+set}" = set; then +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 >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 -#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); @@ -3642,32 +4047,9 @@ 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 + if ac_fn_c_try_compile "$LINENO"; 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 @@ -3678,23 +4060,84 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $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:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $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" @@ -3707,14 +4150,14 @@ am__doit: .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 "$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'. +# 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 @@ -3735,18 +4178,19 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $as_echo "$as_me:${as_lineno-$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 +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='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3760,17 +4204,18 @@ fi depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$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 +if ${am_cv_CC_dependencies_compiler_type+:} false; 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'. + # 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. @@ -3804,16 +4249,16 @@ else : > 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 + # 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 - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # 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 + # 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 @@ -3822,16 +4267,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # 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 + 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} @@ -3870,7 +4315,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $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 @@ -3890,15 +4335,11 @@ CFLAGS="$save_CFLAGS"; # Sanity checks, although redundant (useful when debugging this configure.ac)! if test "X$FC" == "X" ; then - { { $as_echo "$as_me:$LINENO: error: Problem : No Fortran compiler specified nor found!" >&5 -$as_echo "$as_me: error: Problem : No Fortran compiler specified nor found!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Problem : No Fortran compiler specified nor found!" "$LINENO" 5 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; }; } + 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. @@ -3918,10 +4359,10 @@ fi # 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 "$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 +if test "${enable_serial+set}" = set; then : enableval=$enable_serial; pac_cv_serial_mpi="yes"; @@ -3929,11 +4370,11 @@ 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 "$as_me:${as_lineno-$LINENO}: result: yes." >&5 $as_echo "yes." >&6; } else pac_cv_serial_mpi="no"; - { $as_echo "$as_me:$LINENO: result: no." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no." >&5 $as_echo "no." >&6; } fi @@ -3957,9 +4398,9 @@ if test "X$MPICC" = "X" ; 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_MPICC+set}" = set; then +if ${ac_cv_prog_MPICC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPICC"; then @@ -3970,24 +4411,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_MPICC="$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 MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then - { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 + { $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 @@ -4006,9 +4447,9 @@ fi 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_MPICC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPICC"; then @@ -4019,142 +4460,54 @@ 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_MPICC="$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 MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then - { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 + { $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 "$MPICC" && 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. */ +fi -#ifdef __STDC__ -# include -#else -# include -#endif -#undef MPI_Init + test -n "$MPICC" && break +done +test -n "$MPICC" || MPICC="$CC" -/* 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 + acx_mpi_save_CC="$CC" + CC="$MPICC" -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_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 +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 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 -/* 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. @@ -4172,60 +4525,31 @@ 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 +if ac_fn_c_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 -/* 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. @@ -4243,56 +4567,27 @@ 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 +if ac_fn_c_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 mpi.h" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 $as_echo_n "checking for mpi.h... " >&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. */ #include int @@ -4303,35 +4598,14 @@ 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 +if ac_fn_c_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 @@ -4341,15 +4615,11 @@ 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; }; } + as_fn_error $? "Cannot find any suitable MPI implementation for C" "$LINENO" 5 : else -cat >>confdefs.h <<\_ACEOF -#define HAVE_MPI 1 -_ACEOF +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -4368,9 +4638,9 @@ if test "X$MPIFC" = "X" ; 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_MPIFC+set}" = set; then +if ${ac_cv_prog_MPIFC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPIFC"; then @@ -4381,24 +4651,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_MPIFC="$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 MPIFC=$ac_cv_prog_MPIFC if test -n "$MPIFC"; then - { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 + { $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 @@ -4418,9 +4688,9 @@ fi 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_MPIFC+set}" = set; then +if ${ac_cv_prog_MPIFC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPIFC"; then @@ -4431,24 +4701,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_MPIFC="$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 MPIFC=$ac_cv_prog_MPIFC if test -n "$MPIFC"; then - { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 + { $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 @@ -4463,305 +4733,159 @@ test -n "$MPIFC" || MPIFC="$FC" 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_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 : 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_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_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 -lmpichf90" >&5 + { $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 test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then +if ${ac_cv_lib_mpichf90_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpichf90 $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_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_mpichf90_MPI_Init=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mpichf90_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_mpichf90_MPI_Init" >&5 +{ $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" = x""yes; then +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_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_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_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_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_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 - - 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 @@ -4771,15 +4895,11 @@ 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" >&5 -$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran" >&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 @@ -4802,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 ############################################################################### @@ -4818,54 +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 -{ $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 @@ -4873,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 @@ -4910,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 @@ -4966,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 @@ -4995,7 +5111,7 @@ fi 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' @@ -5005,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__ @@ -5015,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' @@ -5056,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' @@ -5066,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 @@ -5076,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' @@ -5148,12 +5222,12 @@ if test x"$psblas_cv_fc" == "x" ; then 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' @@ -5163,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 ) @@ -5173,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' @@ -5237,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 @@ -5259,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 @@ -5272,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 @@ -5355,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 @@ -5366,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 @@ -5379,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 - # 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 @@ -5469,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 @@ -5482,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 @@ -5502,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" @@ -5517,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 @@ -5550,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 @@ -5570,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" @@ -5585,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 @@ -5598,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 @@ -5627,583 +5571,139 @@ 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 - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -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 -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -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 + $EGREP "memchr" >/dev/null 2>&1; then : -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= + ac_cv_header_stdc=no fi +rm -f conftest* -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 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 +#include - ; - 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 (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest* - ac_lo=`expr '(' $ac_mid ')' + 1` fi -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 +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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 #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 () { - - 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; - - ; + 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 - ac_cv_sizeof_void_p=`cat conftest.val` +if ac_fn_c_try_run "$LINENO"; 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 + 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 + +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 + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +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` +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 + +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 + 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; } @@ -6222,12 +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 -{ $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 @@ -6235,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 @@ -6267,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. @@ -6289,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} @@ -6348,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. @@ -6370,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' @@ -6410,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 @@ -6431,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 @@ -6464,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 @@ -6499,7 +5913,7 @@ 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; } ############################################################################### @@ -6605,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} @@ -6621,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 @@ -6631,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'` @@ -6658,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 @@ -6675,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} @@ -6695,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 @@ -6705,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" @@ -6738,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 @@ -6746,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' @@ -6790,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%% *}" @@ -6809,7 +6154,7 @@ if test "X$FLINK" == "X" ; then 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' @@ -6827,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' @@ -6871,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' @@ -6895,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 +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 + print *,psb_version_minor_ + end program test +_ACEOF +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' @@ -7027,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 < 5 ))) ; then - { { $as_echo "$as_me:$LINENO: error: I need at least PSBLAS version 3.5." >&5 -$as_echo "$as_me: error: I need at least PSBLAS version 3.5." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "I need at least PSBLAS version 3.5." "$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 ############################################################################### @@ -7080,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' @@ -7090,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' @@ -7139,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"; @@ -7150,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 @@ -7171,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' @@ -7181,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 @@ -7193,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' @@ -7239,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' @@ -7249,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 @@ -7280,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' @@ -7326,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' @@ -7336,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 @@ -7353,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' @@ -7399,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' @@ -7407,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)) @@ -7416,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' @@ -7462,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' @@ -7472,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' @@ -7528,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' @@ -7538,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' @@ -7585,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' @@ -7595,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 @@ -7611,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' @@ -7653,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' @@ -7663,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 @@ -7673,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' @@ -7714,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' @@ -7724,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' @@ -7771,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' @@ -7781,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 @@ -7802,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' @@ -7843,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' @@ -7853,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 @@ -7870,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' @@ -7911,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' @@ -7921,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 @@ -7936,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' @@ -7977,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' @@ -7987,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 @@ -8004,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' @@ -8066,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 @@ -8078,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 @@ -8104,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 @@ -8158,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. @@ -8187,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. @@ -8313,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 @@ -8367,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. @@ -8396,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 - 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 +LIBS="-lsatlas -lsatlas $LIBS" +cat > conftest.$ac_ext <<_ACEOF + program main + call sgemm + end +_ACEOF +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. @@ -8522,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 @@ -8577,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 @@ -8741,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 @@ -8852,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 @@ -8910,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 @@ -9020,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 @@ -9077,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 @@ -9138,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 @@ -9253,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 @@ -9317,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? @@ -9363,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 @@ -9423,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 @@ -9441,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 @@ -9463,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' @@ -9475,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 @@ -9505,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' @@ -9517,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 @@ -9551,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 @@ -9641,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' @@ -9649,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='' @@ -9658,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='' @@ -9667,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='' @@ -9683,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 @@ -9705,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 - 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="" +if ac_fn_fc_try_compile "$LINENO"; then : + pac_mumps_header_ok=yes mld2p4_cv_mumpsincdir="$MUMPS_INCLUDES"; +else + 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 @@ -9819,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"; @@ -9923,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' @@ -9931,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='' @@ -9939,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='' @@ -9947,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='' @@ -9960,592 +8172,68 @@ 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 -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; } - +save_LIBS="$LIBS" +save_CPPFLAGS="$CPPFLAGS" +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="" @@ -10558,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. @@ -10582,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. @@ -10645,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. @@ -10708,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 @@ -10762,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' @@ -10770,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='' @@ -10778,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='' @@ -10786,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='' @@ -10801,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 +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 @@ -11133,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. @@ -11157,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. @@ -11214,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. @@ -11272,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' @@ -11317,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() @@ -11334,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' @@ -11389,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' @@ -11397,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='' @@ -11406,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='' @@ -11415,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='' @@ -11434,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 @@ -11451,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 @@ -11609,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 @@ -11767,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. @@ -11791,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. @@ -11849,44 +8749,19 @@ 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; } if test "x$pac_sludist_lib_ok" == "xyes" ; then - { $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' @@ -11895,47 +8770,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 testdslud() + { LUstruct_t *LUstruct; + 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' @@ -11944,7 +8794,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' @@ -11953,11 +8803,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() @@ -11966,34 +8812,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' @@ -12040,7 +8865,7 @@ if test "x$pac_cv_status_file" != "xNONE"; then COMPILERULES=''; else COMPILERULES=' -FLINK=$(MPF90) +FLINK=$(MPFC) # These should be portable rules, arent they? .c.o: @@ -12143,13 +8968,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 @@ -12157,8 +8982,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" @@ -12180,12 +9005,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 @@ -12235,20 +9071,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='#' @@ -12258,27 +9103,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. @@ -12288,17 +9128,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 @@ -12306,23 +9147,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 @@ -12330,7 +9163,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 @@ -12341,7 +9180,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\\(.*\\)"`;; @@ -12364,13 +9203,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 @@ -12380,15 +9212,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 ;; @@ -12400,12 +9233,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='> ' @@ -12417,7 +9254,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 @@ -12431,8 +9350,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\(//\)$' \| \ @@ -12452,76 +9375,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 @@ -12536,49 +9408,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'" @@ -12588,13 +9496,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.1, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12622,13 +9536,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 @@ -12642,16 +9558,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.1 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +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." @@ -12669,11 +9586,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 @@ -12687,14 +9609,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 ;; @@ -12703,11 +9628,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 @@ -12724,7 +9648,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' @@ -12761,9 +9685,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 @@ -12785,26 +9707,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. @@ -12812,7 +9732,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' @@ -12820,7 +9746,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -12829,24 +9755,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 @@ -12854,7 +9774,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 @@ -12868,7 +9788,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -12882,7 +9802,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -12902,7 +9822,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 = "" @@ -12934,23 +9854,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 @@ -12968,9 +9894,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 @@ -12989,7 +9913,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 `:'. @@ -12998,12 +9922,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 @@ -13014,7 +9936,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. @@ -13026,10 +9948,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 @@ -13057,47 +9977,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 @@ -13154,7 +10034,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 @@ -13164,12 +10043,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 @@ -13179,7 +10057,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 @@ -13207,31 +10085,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 @@ -13239,7 +10114,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 @@ -13252,7 +10127,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. @@ -13286,21 +10161,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" || @@ -13326,47 +10199,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 @@ -13378,15 +10211,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. @@ -13407,17 +10237,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 d369a078..0768033d 100755 --- a/configure.ac +++ b/configure.ac @@ -672,7 +672,7 @@ if test "x$pac_cv_status_file" != "xNONE"; then COMPILERULES=''; else COMPILERULES=' -FLINK=$(MPF90) +FLINK=$(MPFC) # These should be portable rules, arent they? .c.o: diff --git a/mlprec/Makefile b/mlprec/Makefile index 11a60e50..b44b1a92 100644 --- a/mlprec/Makefile +++ b/mlprec/Makefile @@ -14,7 +14,7 @@ DMODOBJS=mld_d_prec_type.o mld_d_ilu_fact_mod.o \ SMODOBJS=mld_s_prec_type.o mld_s_ilu_fact_mod.o \ mld_s_inner_mod.o mld_s_ilu_solver.o mld_s_diag_solver.o mld_s_jac_smoother.o mld_s_as_smoother.o \ - mld_s_slu_solver.o mld_s_sludist_solver.o mld_s_id_solver.o\ + mld_s_slu_solver.o mld_s_id_solver.o\ mld_s_base_solver_mod.o mld_s_base_smoother_mod.o mld_s_onelev_mod.o \ mld_s_gs_solver.o mld_s_mumps_solver.o @@ -26,7 +26,7 @@ ZMODOBJS=mld_z_prec_type.o mld_z_ilu_fact_mod.o \ CMODOBJS=mld_c_prec_type.o mld_c_ilu_fact_mod.o \ mld_c_inner_mod.o mld_c_ilu_solver.o mld_c_diag_solver.o mld_c_jac_smoother.o mld_c_as_smoother.o \ - mld_c_slu_solver.o mld_c_sludist_solver.o mld_c_id_solver.o\ + mld_c_slu_solver.o mld_c_id_solver.o\ mld_c_base_solver_mod.o mld_c_base_smoother_mod.o mld_c_onelev_mod.o \ mld_c_gs_solver.o mld_c_mumps_solver.o diff --git a/mlprec/impl/Makefile b/mlprec/impl/Makefile index 2f90244e..d2ae7909 100644 --- a/mlprec/impl/Makefile +++ b/mlprec/impl/Makefile @@ -18,7 +18,7 @@ CMPFOBJS=mld_caggrmat_nosmth_asb.o mld_caggrmat_smth_asb.o mld_caggrmat_minnrg_a MPFOBJS=$(SMPFOBJS) $(DMPFOBJS) $(CMPFOBJS) $(ZMPFOBJS) -MPCOBJS=mld_sslud_interface.o mld_dslud_interface.o mld_cslud_interface.o mld_zslud_interface.o +MPCOBJS=mld_dslud_interface.o mld_zslud_interface.o DINNEROBJS= mld_dmlprec_bld.o \ diff --git a/mlprec/impl/level/mld_c_base_onelev_build.f90 b/mlprec/impl/level/mld_c_base_onelev_build.f90 index 401b964e..51501b6d 100644 --- a/mlprec/impl/level/mld_c_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_build.f90 @@ -91,18 +91,16 @@ subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Calling mlprcbld at level ',i - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',izero,is_int_non_negative) call lv%sm%build(lv%base_a,lv%base_desc,& - & 'F',info,amold=amold,vmold=vmold,imold=imold) + & info,amold=amold,vmold=vmold,imold=imold) if (info == 0) then if (allocated(lv%sm2a)) then - call lv%sm2a%build(lv%base_a,lv%base_desc,'F',info,& + call lv%sm2a%build(lv%base_a,lv%base_desc,info,& & amold=amold,vmold=vmold,imold=imold) lv%sm2 => lv%sm2a else diff --git a/mlprec/impl/level/mld_c_base_onelev_check.f90 b/mlprec/impl/level/mld_c_base_onelev_check.f90 index ae31ff34..e6a33a88 100644 --- a/mlprec/impl/level/mld_c_base_onelev_check.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_check.f90 @@ -53,14 +53,11 @@ subroutine mld_c_base_onelev_check(lv,info) call psb_erractionsave(err_act) info = psb_success_ - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',ione,is_int_non_negative) - if (allocated(lv%sm)) then call lv%sm%check(info) else @@ -69,6 +66,14 @@ subroutine mld_c_base_onelev_check(lv,info) goto 9999 end if + if (allocated(lv%sm2a)) then + call lv%sm2a%check(info) + else + info=3111 + call psb_errpush(info,name) + goto 9999 + end if + if (info /= psb_success_) goto 9999 call psb_erractionrestore(err_act) diff --git a/mlprec/impl/level/mld_c_base_onelev_csetc.f90 b/mlprec/impl/level/mld_c_base_onelev_csetc.f90 index ffeea03d..318e919f 100644 --- a/mlprec/impl/level/mld_c_base_onelev_csetc.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_csetc.f90 @@ -71,24 +71,23 @@ subroutine mld_c_base_onelev_csetc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if diff --git a/mlprec/impl/level/mld_c_base_onelev_cseti.F90 b/mlprec/impl/level/mld_c_base_onelev_cseti.F90 index 6ce87691..c5255d10 100644 --- a/mlprec/impl/level/mld_c_base_onelev_cseti.F90 +++ b/mlprec/impl/level/mld_c_base_onelev_cseti.F90 @@ -47,9 +47,6 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) use mld_c_ilu_solver use mld_c_id_solver use mld_c_gs_solver -#if defined(HAVE_SLUDIST_) - use mld_c_sludist_solver -#endif #if defined(HAVE_SLU_) use mld_c_slu_solver #endif @@ -76,9 +73,6 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) type(mld_c_id_solver_type) :: mld_c_id_solver_mold type(mld_c_gs_solver_type) :: mld_c_gs_solver_mold type(mld_c_bwgs_solver_type) :: mld_c_bwgs_solver_mold -#if defined(HAVE_SLUDIST_) - type(mld_c_sludist_solver_type) :: mld_c_sludist_solver_mold -#endif #if defined(HAVE_SLU_) type(mld_c_slu_solver_type) :: mld_c_slu_solver_mold #endif @@ -96,10 +90,10 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (psb_toupper(what)) @@ -132,9 +126,10 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -156,24 +151,17 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_c_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_c_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_c_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_c_mumps_solver_mold,info,pos=pos) @@ -186,34 +174,29 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) case ('SMOOTHER_SWEEPS') - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case ('SMOOTHER_SWEEPS_PRE') - lv%parms%sweeps_pre = val - - case ('SMOOTHER_SWEEPS_POST') - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case ('ML_TYPE') - lv%parms%ml_type = val + case ('ML_CYCLE') + lv%parms%ml_cycle = val - case ('AGGR_ALG') - lv%parms%aggr_alg = val + case ('PAR_AGGR_ALG') + lv%parms%par_aggr_alg = val case ('AGGR_ORD') lv%parms%aggr_ord = val - case ('AGGR_KIND') - lv%parms%aggr_kind = val + case ('AGGR_TYPE') + lv%parms%aggr_type = val + + case ('AGGR_PROL') + lv%parms%aggr_prol = val case ('COARSE_MAT') lv%parms%coarse_mat = val - case ('SMOOTHER_POS') - lv%parms%smoother_pos = val - case ('AGGR_OMEGA_ALG') lv%parms%aggr_omega_alg= val @@ -227,19 +210,16 @@ subroutine mld_c_base_onelev_cseti(lv,what,val,info,pos) lv%parms%coarse_solve = val case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_c_base_onelev_csetr.f90 b/mlprec/impl/level/mld_c_base_onelev_csetr.f90 index 9f942321..f7b73feb 100644 --- a/mlprec/impl/level/mld_c_base_onelev_csetr.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_csetr.f90 @@ -67,9 +67,6 @@ subroutine mld_c_base_onelev_csetr(lv,what,val,info,pos) case ('AGGR_THRESH') lv%parms%aggr_thresh = val - case ('AGGR_SCALE') - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,22 @@ subroutine mld_c_base_onelev_csetr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_c_base_onelev_setc.f90 b/mlprec/impl/level/mld_c_base_onelev_setc.f90 index 82dee923..a65f2de7 100644 --- a/mlprec/impl/level/mld_c_base_onelev_setc.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_setc.f90 @@ -38,7 +38,7 @@ ! ! subroutine mld_c_base_onelev_setc(lv,what,val,info,pos) - + use psb_base_mod use mld_c_onelev_mod, mld_protect_name => mld_c_base_onelev_setc @@ -63,7 +63,7 @@ subroutine mld_c_base_onelev_setc(lv,what,val,info,pos) if (ival >= 0) then call lv%set(what,ival,info,pos=pos) else - + if (present(pos)) then select case(psb_toupper(trim(pos))) case('PRE') @@ -71,32 +71,31 @@ subroutine mld_c_base_onelev_setc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end if - + if (info /= psb_success_) goto 9999 - + call psb_erractionrestore(err_act) return - + 9999 call psb_error_handler(err_act) return - + end subroutine mld_c_base_onelev_setc diff --git a/mlprec/impl/level/mld_c_base_onelev_seti.F90 b/mlprec/impl/level/mld_c_base_onelev_seti.F90 index 5dd0f9c3..03473977 100644 --- a/mlprec/impl/level/mld_c_base_onelev_seti.F90 +++ b/mlprec/impl/level/mld_c_base_onelev_seti.F90 @@ -47,9 +47,6 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) use mld_c_ilu_solver use mld_c_id_solver use mld_c_gs_solver -#if defined(HAVE_SLUDIST_) - use mld_c_sludist_solver -#endif #if defined(HAVE_SLU_) use mld_c_slu_solver #endif @@ -76,9 +73,6 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) type(mld_c_id_solver_type) :: mld_c_id_solver_mold type(mld_c_gs_solver_type) :: mld_c_gs_solver_mold type(mld_c_bwgs_solver_type) :: mld_c_bwgs_solver_mold -#if defined(HAVE_SLUDIST_) - type(mld_c_sludist_solver_type) :: mld_c_sludist_solver_mold -#endif #if defined(HAVE_SLU_) type(mld_c_slu_solver_type) :: mld_c_slu_solver_mold #endif @@ -95,10 +89,10 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (what) @@ -133,9 +127,10 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -157,24 +152,17 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_c_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_c_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_c_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_c_mumps_solver_mold,info,pos=pos) @@ -186,34 +174,29 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) end select case (mld_smoother_sweeps_) - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case (mld_smoother_sweeps_pre_) - lv%parms%sweeps_pre = val - - case (mld_smoother_sweeps_post_) - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case (mld_ml_type_) - lv%parms%ml_type = val + case (mld_ml_cycle_) + lv%parms%ml_cycle = val - case (mld_aggr_alg_) - lv%parms%aggr_alg = val + case (mld_par_aggr_alg_) + lv%parms%par_aggr_alg = val case (mld_aggr_ord_) lv%parms%aggr_ord = val - case (mld_aggr_kind_) - lv%parms%aggr_kind = val + case (mld_aggr_type_) + lv%parms%aggr_type = val + + case (mld_aggr_prol_) + lv%parms%aggr_prol = val case (mld_coarse_mat_) lv%parms%coarse_mat = val - case (mld_smoother_pos_) - lv%parms%smoother_pos = val - case (mld_aggr_omega_alg_) lv%parms%aggr_omega_alg= val @@ -228,19 +211,16 @@ subroutine mld_c_base_onelev_seti(lv,what,val,info,pos) case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_c_base_onelev_setr.f90 b/mlprec/impl/level/mld_c_base_onelev_setr.f90 index 94e9837a..e19b5e91 100644 --- a/mlprec/impl/level/mld_c_base_onelev_setr.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_setr.f90 @@ -67,9 +67,6 @@ subroutine mld_c_base_onelev_setr(lv,what,val,info,pos) case (mld_aggr_thresh_) lv%parms%aggr_thresh = val - case (mld_aggr_scale_) - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,24 @@ subroutine mld_c_base_onelev_setr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_c_base_onelev_setsm.F90 b/mlprec/impl/level/mld_c_base_onelev_setsm.F90 index 9f47dd08..06325ad9 100644 --- a/mlprec/impl/level/mld_c_base_onelev_setsm.F90 +++ b/mlprec/impl/level/mld_c_base_onelev_setsm.F90 @@ -63,14 +63,22 @@ subroutine mld_c_base_onelev_setsm(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - + + if (ipos_ == mld_both_smooth_) then + if (allocated(lev%sm2a)) then + call lev%sm2a%free(info) + deallocate(lev%sm2a, stat=info) + lev%sm2 => null() + end if + end if + select case(ipos_) - case(mld_pre_smooth_) + case(mld_pre_smooth_, mld_both_smooth_) if (allocated(lev%sm)) then if (.not.same_type_as(lev%sm,val)) then call lev%sm%free(info) @@ -85,7 +93,7 @@ subroutine mld_c_base_onelev_setsm(lev,val,info,pos) #endif end if call lev%sm%default() - lev%sm2 => lev%sm + if (ipos_ == mld_both_smooth_) lev%sm2 => lev%sm case(mld_post_smooth_) if (allocated(lev%sm2a)) then if (.not.same_type_as(lev%sm2a,val)) then diff --git a/mlprec/impl/level/mld_c_base_onelev_setsv.F90 b/mlprec/impl/level/mld_c_base_onelev_setsv.F90 index 1a4a5aed..1d9d7f65 100644 --- a/mlprec/impl/level/mld_c_base_onelev_setsv.F90 +++ b/mlprec/impl/level/mld_c_base_onelev_setsv.F90 @@ -63,14 +63,13 @@ subroutine mld_c_base_onelev_setsv(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_ == mld_pre_smooth_).or.(ipos_ == mld_both_smooth_)) then if (allocated(lev%sm)) then if (allocated(lev%sm%sv)) then if (.not.same_type_as(lev%sm%sv,val)) then @@ -103,8 +102,18 @@ subroutine mld_c_base_onelev_setsv(lev,val,info,pos) return end if - - case(mld_post_smooth_) + end if + + ! + ! If POS was not specified and therefore we have mld_both_smooth_ + ! we need to update sm2a *only* if it was already allocated, + ! otherwise it is not needed (since we have just fixed %sm in the + ! pre section). + ! + + if ((ipos_ == mld_post_smooth_).or. & + ((ipos_ == mld_both_smooth_).and.(allocated(lev%sm2a)))) then + if (allocated(lev%sm2a)) then if (allocated(lev%sm2a%sv)) then @@ -139,7 +148,7 @@ subroutine mld_c_base_onelev_setsv(lev,val,info,pos) end if - end select + end if end subroutine mld_c_base_onelev_setsv diff --git a/mlprec/impl/level/mld_d_base_onelev_build.f90 b/mlprec/impl/level/mld_d_base_onelev_build.f90 index d9f54024..1e5e20eb 100644 --- a/mlprec/impl/level/mld_d_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_build.f90 @@ -91,18 +91,16 @@ subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Calling mlprcbld at level ',i - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',izero,is_int_non_negative) call lv%sm%build(lv%base_a,lv%base_desc,& - & 'F',info,amold=amold,vmold=vmold,imold=imold) + & info,amold=amold,vmold=vmold,imold=imold) if (info == 0) then if (allocated(lv%sm2a)) then - call lv%sm2a%build(lv%base_a,lv%base_desc,'F',info,& + call lv%sm2a%build(lv%base_a,lv%base_desc,info,& & amold=amold,vmold=vmold,imold=imold) lv%sm2 => lv%sm2a else diff --git a/mlprec/impl/level/mld_d_base_onelev_check.f90 b/mlprec/impl/level/mld_d_base_onelev_check.f90 index 42400d23..2ae93a82 100644 --- a/mlprec/impl/level/mld_d_base_onelev_check.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_check.f90 @@ -53,14 +53,11 @@ subroutine mld_d_base_onelev_check(lv,info) call psb_erractionsave(err_act) info = psb_success_ - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',ione,is_int_non_negative) - if (allocated(lv%sm)) then call lv%sm%check(info) else @@ -69,6 +66,14 @@ subroutine mld_d_base_onelev_check(lv,info) goto 9999 end if + if (allocated(lv%sm2a)) then + call lv%sm2a%check(info) + else + info=3111 + call psb_errpush(info,name) + goto 9999 + end if + if (info /= psb_success_) goto 9999 call psb_erractionrestore(err_act) diff --git a/mlprec/impl/level/mld_d_base_onelev_csetc.f90 b/mlprec/impl/level/mld_d_base_onelev_csetc.f90 index 7d65f227..5b14353b 100644 --- a/mlprec/impl/level/mld_d_base_onelev_csetc.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_csetc.f90 @@ -71,24 +71,23 @@ subroutine mld_d_base_onelev_csetc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if diff --git a/mlprec/impl/level/mld_d_base_onelev_cseti.F90 b/mlprec/impl/level/mld_d_base_onelev_cseti.F90 index 6661f753..e16df0c8 100644 --- a/mlprec/impl/level/mld_d_base_onelev_cseti.F90 +++ b/mlprec/impl/level/mld_d_base_onelev_cseti.F90 @@ -102,10 +102,10 @@ subroutine mld_d_base_onelev_cseti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (psb_toupper(what)) @@ -138,9 +138,10 @@ subroutine mld_d_base_onelev_cseti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -162,28 +163,25 @@ subroutine mld_d_base_onelev_cseti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_d_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_d_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_d_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_d_mumps_solver_mold,info,pos=pos) #endif +#ifdef HAVE_SLUDIST_ + case (mld_sludist_) + call lv%set(mld_d_sludist_solver_mold,info,pos=pos) +#endif #ifdef HAVE_UMF_ case (mld_umf_) call lv%set(mld_d_umf_solver_mold,info,pos=pos) @@ -196,34 +194,29 @@ subroutine mld_d_base_onelev_cseti(lv,what,val,info,pos) case ('SMOOTHER_SWEEPS') - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case ('SMOOTHER_SWEEPS_PRE') - lv%parms%sweeps_pre = val - - case ('SMOOTHER_SWEEPS_POST') - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case ('ML_TYPE') - lv%parms%ml_type = val + case ('ML_CYCLE') + lv%parms%ml_cycle = val - case ('AGGR_ALG') - lv%parms%aggr_alg = val + case ('PAR_AGGR_ALG') + lv%parms%par_aggr_alg = val case ('AGGR_ORD') lv%parms%aggr_ord = val - case ('AGGR_KIND') - lv%parms%aggr_kind = val + case ('AGGR_TYPE') + lv%parms%aggr_type = val + + case ('AGGR_PROL') + lv%parms%aggr_prol = val case ('COARSE_MAT') lv%parms%coarse_mat = val - case ('SMOOTHER_POS') - lv%parms%smoother_pos = val - case ('AGGR_OMEGA_ALG') lv%parms%aggr_omega_alg= val @@ -237,19 +230,16 @@ subroutine mld_d_base_onelev_cseti(lv,what,val,info,pos) lv%parms%coarse_solve = val case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_d_base_onelev_csetr.f90 b/mlprec/impl/level/mld_d_base_onelev_csetr.f90 index 6b3a93b4..20f4dd9d 100644 --- a/mlprec/impl/level/mld_d_base_onelev_csetr.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_csetr.f90 @@ -67,9 +67,6 @@ subroutine mld_d_base_onelev_csetr(lv,what,val,info,pos) case ('AGGR_THRESH') lv%parms%aggr_thresh = val - case ('AGGR_SCALE') - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,22 @@ subroutine mld_d_base_onelev_csetr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_d_base_onelev_setc.f90 b/mlprec/impl/level/mld_d_base_onelev_setc.f90 index 589b07fe..75b7c09e 100644 --- a/mlprec/impl/level/mld_d_base_onelev_setc.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_setc.f90 @@ -38,7 +38,7 @@ ! ! subroutine mld_d_base_onelev_setc(lv,what,val,info,pos) - + use psb_base_mod use mld_d_onelev_mod, mld_protect_name => mld_d_base_onelev_setc @@ -63,7 +63,7 @@ subroutine mld_d_base_onelev_setc(lv,what,val,info,pos) if (ival >= 0) then call lv%set(what,ival,info,pos=pos) else - + if (present(pos)) then select case(psb_toupper(trim(pos))) case('PRE') @@ -71,32 +71,31 @@ subroutine mld_d_base_onelev_setc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end if - + if (info /= psb_success_) goto 9999 - + call psb_erractionrestore(err_act) return - + 9999 call psb_error_handler(err_act) return - + end subroutine mld_d_base_onelev_setc diff --git a/mlprec/impl/level/mld_d_base_onelev_seti.F90 b/mlprec/impl/level/mld_d_base_onelev_seti.F90 index 63ba1daf..0f63945d 100644 --- a/mlprec/impl/level/mld_d_base_onelev_seti.F90 +++ b/mlprec/impl/level/mld_d_base_onelev_seti.F90 @@ -101,10 +101,10 @@ subroutine mld_d_base_onelev_seti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (what) @@ -139,9 +139,10 @@ subroutine mld_d_base_onelev_seti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -163,28 +164,25 @@ subroutine mld_d_base_onelev_seti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_d_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_d_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_d_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_d_mumps_solver_mold,info,pos=pos) #endif +#ifdef HAVE_SLUDIST_ + case (mld_sludist_) + call lv%set(mld_d_sludist_solver_mold,info,pos=pos) +#endif #ifdef HAVE_UMF_ case (mld_umf_) call lv%set(mld_d_umf_solver_mold,info,pos=pos) @@ -196,34 +194,29 @@ subroutine mld_d_base_onelev_seti(lv,what,val,info,pos) end select case (mld_smoother_sweeps_) - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case (mld_smoother_sweeps_pre_) - lv%parms%sweeps_pre = val - - case (mld_smoother_sweeps_post_) - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case (mld_ml_type_) - lv%parms%ml_type = val + case (mld_ml_cycle_) + lv%parms%ml_cycle = val - case (mld_aggr_alg_) - lv%parms%aggr_alg = val + case (mld_par_aggr_alg_) + lv%parms%par_aggr_alg = val case (mld_aggr_ord_) lv%parms%aggr_ord = val - case (mld_aggr_kind_) - lv%parms%aggr_kind = val + case (mld_aggr_type_) + lv%parms%aggr_type = val + + case (mld_aggr_prol_) + lv%parms%aggr_prol = val case (mld_coarse_mat_) lv%parms%coarse_mat = val - case (mld_smoother_pos_) - lv%parms%smoother_pos = val - case (mld_aggr_omega_alg_) lv%parms%aggr_omega_alg= val @@ -238,19 +231,16 @@ subroutine mld_d_base_onelev_seti(lv,what,val,info,pos) case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_d_base_onelev_setr.f90 b/mlprec/impl/level/mld_d_base_onelev_setr.f90 index 5eaf5665..c3e4af07 100644 --- a/mlprec/impl/level/mld_d_base_onelev_setr.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_setr.f90 @@ -67,9 +67,6 @@ subroutine mld_d_base_onelev_setr(lv,what,val,info,pos) case (mld_aggr_thresh_) lv%parms%aggr_thresh = val - case (mld_aggr_scale_) - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,24 @@ subroutine mld_d_base_onelev_setr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_d_base_onelev_setsm.F90 b/mlprec/impl/level/mld_d_base_onelev_setsm.F90 index e3a9fce8..9f8ae455 100644 --- a/mlprec/impl/level/mld_d_base_onelev_setsm.F90 +++ b/mlprec/impl/level/mld_d_base_onelev_setsm.F90 @@ -63,14 +63,22 @@ subroutine mld_d_base_onelev_setsm(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - + + if (ipos_ == mld_both_smooth_) then + if (allocated(lev%sm2a)) then + call lev%sm2a%free(info) + deallocate(lev%sm2a, stat=info) + lev%sm2 => null() + end if + end if + select case(ipos_) - case(mld_pre_smooth_) + case(mld_pre_smooth_, mld_both_smooth_) if (allocated(lev%sm)) then if (.not.same_type_as(lev%sm,val)) then call lev%sm%free(info) @@ -85,7 +93,7 @@ subroutine mld_d_base_onelev_setsm(lev,val,info,pos) #endif end if call lev%sm%default() - lev%sm2 => lev%sm + if (ipos_ == mld_both_smooth_) lev%sm2 => lev%sm case(mld_post_smooth_) if (allocated(lev%sm2a)) then if (.not.same_type_as(lev%sm2a,val)) then diff --git a/mlprec/impl/level/mld_d_base_onelev_setsv.F90 b/mlprec/impl/level/mld_d_base_onelev_setsv.F90 index e5d50c78..85b1784c 100644 --- a/mlprec/impl/level/mld_d_base_onelev_setsv.F90 +++ b/mlprec/impl/level/mld_d_base_onelev_setsv.F90 @@ -63,14 +63,13 @@ subroutine mld_d_base_onelev_setsv(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_ == mld_pre_smooth_).or.(ipos_ == mld_both_smooth_)) then if (allocated(lev%sm)) then if (allocated(lev%sm%sv)) then if (.not.same_type_as(lev%sm%sv,val)) then @@ -103,8 +102,18 @@ subroutine mld_d_base_onelev_setsv(lev,val,info,pos) return end if - - case(mld_post_smooth_) + end if + + ! + ! If POS was not specified and therefore we have mld_both_smooth_ + ! we need to update sm2a *only* if it was already allocated, + ! otherwise it is not needed (since we have just fixed %sm in the + ! pre section). + ! + + if ((ipos_ == mld_post_smooth_).or. & + ((ipos_ == mld_both_smooth_).and.(allocated(lev%sm2a)))) then + if (allocated(lev%sm2a)) then if (allocated(lev%sm2a%sv)) then @@ -139,7 +148,7 @@ subroutine mld_d_base_onelev_setsv(lev,val,info,pos) end if - end select + end if end subroutine mld_d_base_onelev_setsv diff --git a/mlprec/impl/level/mld_s_base_onelev_build.f90 b/mlprec/impl/level/mld_s_base_onelev_build.f90 index fad1e7d7..3783f4f7 100644 --- a/mlprec/impl/level/mld_s_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_build.f90 @@ -91,18 +91,16 @@ subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Calling mlprcbld at level ',i - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',izero,is_int_non_negative) call lv%sm%build(lv%base_a,lv%base_desc,& - & 'F',info,amold=amold,vmold=vmold,imold=imold) + & info,amold=amold,vmold=vmold,imold=imold) if (info == 0) then if (allocated(lv%sm2a)) then - call lv%sm2a%build(lv%base_a,lv%base_desc,'F',info,& + call lv%sm2a%build(lv%base_a,lv%base_desc,info,& & amold=amold,vmold=vmold,imold=imold) lv%sm2 => lv%sm2a else diff --git a/mlprec/impl/level/mld_s_base_onelev_check.f90 b/mlprec/impl/level/mld_s_base_onelev_check.f90 index 550f0d91..90178040 100644 --- a/mlprec/impl/level/mld_s_base_onelev_check.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_check.f90 @@ -53,14 +53,11 @@ subroutine mld_s_base_onelev_check(lv,info) call psb_erractionsave(err_act) info = psb_success_ - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',ione,is_int_non_negative) - if (allocated(lv%sm)) then call lv%sm%check(info) else @@ -69,6 +66,14 @@ subroutine mld_s_base_onelev_check(lv,info) goto 9999 end if + if (allocated(lv%sm2a)) then + call lv%sm2a%check(info) + else + info=3111 + call psb_errpush(info,name) + goto 9999 + end if + if (info /= psb_success_) goto 9999 call psb_erractionrestore(err_act) diff --git a/mlprec/impl/level/mld_s_base_onelev_csetc.f90 b/mlprec/impl/level/mld_s_base_onelev_csetc.f90 index e8ad4c1e..f8ee075e 100644 --- a/mlprec/impl/level/mld_s_base_onelev_csetc.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_csetc.f90 @@ -71,24 +71,23 @@ subroutine mld_s_base_onelev_csetc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if diff --git a/mlprec/impl/level/mld_s_base_onelev_cseti.F90 b/mlprec/impl/level/mld_s_base_onelev_cseti.F90 index d7fd83fd..8d081d81 100644 --- a/mlprec/impl/level/mld_s_base_onelev_cseti.F90 +++ b/mlprec/impl/level/mld_s_base_onelev_cseti.F90 @@ -47,9 +47,6 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) use mld_s_ilu_solver use mld_s_id_solver use mld_s_gs_solver -#if defined(HAVE_SLUDIST_) - use mld_s_sludist_solver -#endif #if defined(HAVE_SLU_) use mld_s_slu_solver #endif @@ -76,9 +73,6 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) type(mld_s_id_solver_type) :: mld_s_id_solver_mold type(mld_s_gs_solver_type) :: mld_s_gs_solver_mold type(mld_s_bwgs_solver_type) :: mld_s_bwgs_solver_mold -#if defined(HAVE_SLUDIST_) - type(mld_s_sludist_solver_type) :: mld_s_sludist_solver_mold -#endif #if defined(HAVE_SLU_) type(mld_s_slu_solver_type) :: mld_s_slu_solver_mold #endif @@ -96,10 +90,10 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (psb_toupper(what)) @@ -132,9 +126,10 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -156,24 +151,17 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_s_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_s_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_s_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_s_mumps_solver_mold,info,pos=pos) @@ -186,34 +174,29 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) case ('SMOOTHER_SWEEPS') - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case ('SMOOTHER_SWEEPS_PRE') - lv%parms%sweeps_pre = val - - case ('SMOOTHER_SWEEPS_POST') - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case ('ML_TYPE') - lv%parms%ml_type = val + case ('ML_CYCLE') + lv%parms%ml_cycle = val - case ('AGGR_ALG') - lv%parms%aggr_alg = val + case ('PAR_AGGR_ALG') + lv%parms%par_aggr_alg = val case ('AGGR_ORD') lv%parms%aggr_ord = val - case ('AGGR_KIND') - lv%parms%aggr_kind = val + case ('AGGR_TYPE') + lv%parms%aggr_type = val + + case ('AGGR_PROL') + lv%parms%aggr_prol = val case ('COARSE_MAT') lv%parms%coarse_mat = val - case ('SMOOTHER_POS') - lv%parms%smoother_pos = val - case ('AGGR_OMEGA_ALG') lv%parms%aggr_omega_alg= val @@ -227,19 +210,16 @@ subroutine mld_s_base_onelev_cseti(lv,what,val,info,pos) lv%parms%coarse_solve = val case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_s_base_onelev_csetr.f90 b/mlprec/impl/level/mld_s_base_onelev_csetr.f90 index df0ef772..b5cc34b5 100644 --- a/mlprec/impl/level/mld_s_base_onelev_csetr.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_csetr.f90 @@ -67,9 +67,6 @@ subroutine mld_s_base_onelev_csetr(lv,what,val,info,pos) case ('AGGR_THRESH') lv%parms%aggr_thresh = val - case ('AGGR_SCALE') - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,22 @@ subroutine mld_s_base_onelev_csetr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_s_base_onelev_setc.f90 b/mlprec/impl/level/mld_s_base_onelev_setc.f90 index a650ce76..507255a7 100644 --- a/mlprec/impl/level/mld_s_base_onelev_setc.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_setc.f90 @@ -38,7 +38,7 @@ ! ! subroutine mld_s_base_onelev_setc(lv,what,val,info,pos) - + use psb_base_mod use mld_s_onelev_mod, mld_protect_name => mld_s_base_onelev_setc @@ -63,7 +63,7 @@ subroutine mld_s_base_onelev_setc(lv,what,val,info,pos) if (ival >= 0) then call lv%set(what,ival,info,pos=pos) else - + if (present(pos)) then select case(psb_toupper(trim(pos))) case('PRE') @@ -71,32 +71,31 @@ subroutine mld_s_base_onelev_setc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end if - + if (info /= psb_success_) goto 9999 - + call psb_erractionrestore(err_act) return - + 9999 call psb_error_handler(err_act) return - + end subroutine mld_s_base_onelev_setc diff --git a/mlprec/impl/level/mld_s_base_onelev_seti.F90 b/mlprec/impl/level/mld_s_base_onelev_seti.F90 index 36e5a044..2c1ea49d 100644 --- a/mlprec/impl/level/mld_s_base_onelev_seti.F90 +++ b/mlprec/impl/level/mld_s_base_onelev_seti.F90 @@ -47,9 +47,6 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) use mld_s_ilu_solver use mld_s_id_solver use mld_s_gs_solver -#if defined(HAVE_SLUDIST_) - use mld_s_sludist_solver -#endif #if defined(HAVE_SLU_) use mld_s_slu_solver #endif @@ -76,9 +73,6 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) type(mld_s_id_solver_type) :: mld_s_id_solver_mold type(mld_s_gs_solver_type) :: mld_s_gs_solver_mold type(mld_s_bwgs_solver_type) :: mld_s_bwgs_solver_mold -#if defined(HAVE_SLUDIST_) - type(mld_s_sludist_solver_type) :: mld_s_sludist_solver_mold -#endif #if defined(HAVE_SLU_) type(mld_s_slu_solver_type) :: mld_s_slu_solver_mold #endif @@ -95,10 +89,10 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (what) @@ -133,9 +127,10 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -157,24 +152,17 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_s_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_s_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_s_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_s_mumps_solver_mold,info,pos=pos) @@ -186,34 +174,29 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) end select case (mld_smoother_sweeps_) - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case (mld_smoother_sweeps_pre_) - lv%parms%sweeps_pre = val - - case (mld_smoother_sweeps_post_) - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case (mld_ml_type_) - lv%parms%ml_type = val + case (mld_ml_cycle_) + lv%parms%ml_cycle = val - case (mld_aggr_alg_) - lv%parms%aggr_alg = val + case (mld_par_aggr_alg_) + lv%parms%par_aggr_alg = val case (mld_aggr_ord_) lv%parms%aggr_ord = val - case (mld_aggr_kind_) - lv%parms%aggr_kind = val + case (mld_aggr_type_) + lv%parms%aggr_type = val + + case (mld_aggr_prol_) + lv%parms%aggr_prol = val case (mld_coarse_mat_) lv%parms%coarse_mat = val - case (mld_smoother_pos_) - lv%parms%smoother_pos = val - case (mld_aggr_omega_alg_) lv%parms%aggr_omega_alg= val @@ -228,19 +211,16 @@ subroutine mld_s_base_onelev_seti(lv,what,val,info,pos) case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_s_base_onelev_setr.f90 b/mlprec/impl/level/mld_s_base_onelev_setr.f90 index 320b3f95..5f5a74d0 100644 --- a/mlprec/impl/level/mld_s_base_onelev_setr.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_setr.f90 @@ -67,9 +67,6 @@ subroutine mld_s_base_onelev_setr(lv,what,val,info,pos) case (mld_aggr_thresh_) lv%parms%aggr_thresh = val - case (mld_aggr_scale_) - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,24 @@ subroutine mld_s_base_onelev_setr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_s_base_onelev_setsm.F90 b/mlprec/impl/level/mld_s_base_onelev_setsm.F90 index 73e56d13..cb85ff1b 100644 --- a/mlprec/impl/level/mld_s_base_onelev_setsm.F90 +++ b/mlprec/impl/level/mld_s_base_onelev_setsm.F90 @@ -63,14 +63,22 @@ subroutine mld_s_base_onelev_setsm(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - + + if (ipos_ == mld_both_smooth_) then + if (allocated(lev%sm2a)) then + call lev%sm2a%free(info) + deallocate(lev%sm2a, stat=info) + lev%sm2 => null() + end if + end if + select case(ipos_) - case(mld_pre_smooth_) + case(mld_pre_smooth_, mld_both_smooth_) if (allocated(lev%sm)) then if (.not.same_type_as(lev%sm,val)) then call lev%sm%free(info) @@ -85,7 +93,7 @@ subroutine mld_s_base_onelev_setsm(lev,val,info,pos) #endif end if call lev%sm%default() - lev%sm2 => lev%sm + if (ipos_ == mld_both_smooth_) lev%sm2 => lev%sm case(mld_post_smooth_) if (allocated(lev%sm2a)) then if (.not.same_type_as(lev%sm2a,val)) then diff --git a/mlprec/impl/level/mld_s_base_onelev_setsv.F90 b/mlprec/impl/level/mld_s_base_onelev_setsv.F90 index de16a148..2247f8a8 100644 --- a/mlprec/impl/level/mld_s_base_onelev_setsv.F90 +++ b/mlprec/impl/level/mld_s_base_onelev_setsv.F90 @@ -63,14 +63,13 @@ subroutine mld_s_base_onelev_setsv(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_ == mld_pre_smooth_).or.(ipos_ == mld_both_smooth_)) then if (allocated(lev%sm)) then if (allocated(lev%sm%sv)) then if (.not.same_type_as(lev%sm%sv,val)) then @@ -103,8 +102,18 @@ subroutine mld_s_base_onelev_setsv(lev,val,info,pos) return end if - - case(mld_post_smooth_) + end if + + ! + ! If POS was not specified and therefore we have mld_both_smooth_ + ! we need to update sm2a *only* if it was already allocated, + ! otherwise it is not needed (since we have just fixed %sm in the + ! pre section). + ! + + if ((ipos_ == mld_post_smooth_).or. & + ((ipos_ == mld_both_smooth_).and.(allocated(lev%sm2a)))) then + if (allocated(lev%sm2a)) then if (allocated(lev%sm2a%sv)) then @@ -139,7 +148,7 @@ subroutine mld_s_base_onelev_setsv(lev,val,info,pos) end if - end select + end if end subroutine mld_s_base_onelev_setsv diff --git a/mlprec/impl/level/mld_z_base_onelev_build.f90 b/mlprec/impl/level/mld_z_base_onelev_build.f90 index 41823c40..7943d725 100644 --- a/mlprec/impl/level/mld_z_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_build.f90 @@ -91,18 +91,16 @@ subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Calling mlprcbld at level ',i - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',izero,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',izero,is_int_non_negative) call lv%sm%build(lv%base_a,lv%base_desc,& - & 'F',info,amold=amold,vmold=vmold,imold=imold) + & info,amold=amold,vmold=vmold,imold=imold) if (info == 0) then if (allocated(lv%sm2a)) then - call lv%sm2a%build(lv%base_a,lv%base_desc,'F',info,& + call lv%sm2a%build(lv%base_a,lv%base_desc,info,& & amold=amold,vmold=vmold,imold=imold) lv%sm2 => lv%sm2a else diff --git a/mlprec/impl/level/mld_z_base_onelev_check.f90 b/mlprec/impl/level/mld_z_base_onelev_check.f90 index 998ee3b0..d7b843d0 100644 --- a/mlprec/impl/level/mld_z_base_onelev_check.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_check.f90 @@ -53,14 +53,11 @@ subroutine mld_z_base_onelev_check(lv,info) call psb_erractionsave(err_act) info = psb_success_ - call mld_check_def(lv%parms%sweeps,& - & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_pre,& & 'Jacobi sweeps',ione,is_int_non_negative) call mld_check_def(lv%parms%sweeps_post,& & 'Jacobi sweeps',ione,is_int_non_negative) - if (allocated(lv%sm)) then call lv%sm%check(info) else @@ -69,6 +66,14 @@ subroutine mld_z_base_onelev_check(lv,info) goto 9999 end if + if (allocated(lv%sm2a)) then + call lv%sm2a%check(info) + else + info=3111 + call psb_errpush(info,name) + goto 9999 + end if + if (info /= psb_success_) goto 9999 call psb_erractionrestore(err_act) diff --git a/mlprec/impl/level/mld_z_base_onelev_csetc.f90 b/mlprec/impl/level/mld_z_base_onelev_csetc.f90 index 5ed00bf2..8cd2875f 100644 --- a/mlprec/impl/level/mld_z_base_onelev_csetc.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_csetc.f90 @@ -71,24 +71,23 @@ subroutine mld_z_base_onelev_csetc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if diff --git a/mlprec/impl/level/mld_z_base_onelev_cseti.F90 b/mlprec/impl/level/mld_z_base_onelev_cseti.F90 index 1a3fb8d4..b837c02c 100644 --- a/mlprec/impl/level/mld_z_base_onelev_cseti.F90 +++ b/mlprec/impl/level/mld_z_base_onelev_cseti.F90 @@ -102,10 +102,10 @@ subroutine mld_z_base_onelev_cseti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (psb_toupper(what)) @@ -138,9 +138,10 @@ subroutine mld_z_base_onelev_cseti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -162,28 +163,25 @@ subroutine mld_z_base_onelev_cseti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_z_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_z_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_z_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_z_mumps_solver_mold,info,pos=pos) #endif +#ifdef HAVE_SLUDIST_ + case (mld_sludist_) + call lv%set(mld_z_sludist_solver_mold,info,pos=pos) +#endif #ifdef HAVE_UMF_ case (mld_umf_) call lv%set(mld_z_umf_solver_mold,info,pos=pos) @@ -196,34 +194,29 @@ subroutine mld_z_base_onelev_cseti(lv,what,val,info,pos) case ('SMOOTHER_SWEEPS') - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case ('SMOOTHER_SWEEPS_PRE') - lv%parms%sweeps_pre = val - - case ('SMOOTHER_SWEEPS_POST') - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case ('ML_TYPE') - lv%parms%ml_type = val + case ('ML_CYCLE') + lv%parms%ml_cycle = val - case ('AGGR_ALG') - lv%parms%aggr_alg = val + case ('PAR_AGGR_ALG') + lv%parms%par_aggr_alg = val case ('AGGR_ORD') lv%parms%aggr_ord = val - case ('AGGR_KIND') - lv%parms%aggr_kind = val + case ('AGGR_TYPE') + lv%parms%aggr_type = val + + case ('AGGR_PROL') + lv%parms%aggr_prol = val case ('COARSE_MAT') lv%parms%coarse_mat = val - case ('SMOOTHER_POS') - lv%parms%smoother_pos = val - case ('AGGR_OMEGA_ALG') lv%parms%aggr_omega_alg= val @@ -237,19 +230,16 @@ subroutine mld_z_base_onelev_cseti(lv,what,val,info,pos) lv%parms%coarse_solve = val case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_z_base_onelev_csetr.f90 b/mlprec/impl/level/mld_z_base_onelev_csetr.f90 index 5ab20236..df2c85d5 100644 --- a/mlprec/impl/level/mld_z_base_onelev_csetr.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_csetr.f90 @@ -67,9 +67,6 @@ subroutine mld_z_base_onelev_csetr(lv,what,val,info,pos) case ('AGGR_THRESH') lv%parms%aggr_thresh = val - case ('AGGR_SCALE') - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,22 @@ subroutine mld_z_base_onelev_csetr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_z_base_onelev_setc.f90 b/mlprec/impl/level/mld_z_base_onelev_setc.f90 index 485e4da5..a68a732d 100644 --- a/mlprec/impl/level/mld_z_base_onelev_setc.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_setc.f90 @@ -38,7 +38,7 @@ ! ! subroutine mld_z_base_onelev_setc(lv,what,val,info,pos) - + use psb_base_mod use mld_z_onelev_mod, mld_protect_name => mld_z_base_onelev_setc @@ -63,7 +63,7 @@ subroutine mld_z_base_onelev_setc(lv,what,val,info,pos) if (ival >= 0) then call lv%set(what,ival,info,pos=pos) else - + if (present(pos)) then select case(psb_toupper(trim(pos))) case('PRE') @@ -71,32 +71,31 @@ subroutine mld_z_base_onelev_setc(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end if - + if (info /= psb_success_) goto 9999 - + call psb_erractionrestore(err_act) return - + 9999 call psb_error_handler(err_act) return - + end subroutine mld_z_base_onelev_setc diff --git a/mlprec/impl/level/mld_z_base_onelev_seti.F90 b/mlprec/impl/level/mld_z_base_onelev_seti.F90 index f518b9c8..ce0bffe5 100644 --- a/mlprec/impl/level/mld_z_base_onelev_seti.F90 +++ b/mlprec/impl/level/mld_z_base_onelev_seti.F90 @@ -101,10 +101,10 @@ subroutine mld_z_base_onelev_seti(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if select case (what) @@ -139,9 +139,10 @@ subroutine mld_z_base_onelev_seti(lv,what,val,info,pos) ! Do nothing and hope for the best :) ! end select - if (ipos_==mld_pre_smooth_) then + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) call lv%sm%default() - else if (ipos_==mld_post_smooth_) then + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%default() end if @@ -163,28 +164,25 @@ subroutine mld_z_base_onelev_seti(lv,what,val,info,pos) case (mld_ilu_n_,mld_milu_n_,mld_ilu_t_) call lv%set(mld_z_ilu_solver_mold,info,pos=pos) if (info == 0) then - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then call lv%sm%sv%set('SUB_SOLVE',val,info) - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) call lv%sm2a%sv%set('SUB_SOLVE',val,info) - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end if #ifdef HAVE_SLU_ case (mld_slu_) call lv%set(mld_z_slu_solver_mold,info,pos=pos) #endif -#ifdef HAVE_SLUDIST_ - case (mld_sludist_) - call lv%set(mld_z_sludist_solver_mold,info,pos=pos) -#endif #ifdef HAVE_MUMPS_ case (mld_mumps_) call lv%set(mld_z_mumps_solver_mold,info,pos=pos) #endif +#ifdef HAVE_SLUDIST_ + case (mld_sludist_) + call lv%set(mld_z_sludist_solver_mold,info,pos=pos) +#endif #ifdef HAVE_UMF_ case (mld_umf_) call lv%set(mld_z_umf_solver_mold,info,pos=pos) @@ -196,34 +194,29 @@ subroutine mld_z_base_onelev_seti(lv,what,val,info,pos) end select case (mld_smoother_sweeps_) - lv%parms%sweeps = val - lv%parms%sweeps_pre = val - lv%parms%sweeps_post = val - - case (mld_smoother_sweeps_pre_) - lv%parms%sweeps_pre = val - - case (mld_smoother_sweeps_post_) - lv%parms%sweeps_post = val + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_pre = val + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_)) & + & lv%parms%sweeps_post = val - case (mld_ml_type_) - lv%parms%ml_type = val + case (mld_ml_cycle_) + lv%parms%ml_cycle = val - case (mld_aggr_alg_) - lv%parms%aggr_alg = val + case (mld_par_aggr_alg_) + lv%parms%par_aggr_alg = val case (mld_aggr_ord_) lv%parms%aggr_ord = val - case (mld_aggr_kind_) - lv%parms%aggr_kind = val + case (mld_aggr_type_) + lv%parms%aggr_type = val + + case (mld_aggr_prol_) + lv%parms%aggr_prol = val case (mld_coarse_mat_) lv%parms%coarse_mat = val - case (mld_smoother_pos_) - lv%parms%smoother_pos = val - case (mld_aggr_omega_alg_) lv%parms%aggr_omega_alg= val @@ -238,19 +231,16 @@ subroutine mld_z_base_onelev_seti(lv,what,val,info,pos) case default - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_z_base_onelev_setr.f90 b/mlprec/impl/level/mld_z_base_onelev_setr.f90 index ab5b119c..befc4d06 100644 --- a/mlprec/impl/level/mld_z_base_onelev_setr.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_setr.f90 @@ -67,9 +67,6 @@ subroutine mld_z_base_onelev_setr(lv,what,val,info,pos) case (mld_aggr_thresh_) lv%parms%aggr_thresh = val - case (mld_aggr_scale_) - lv%parms%aggr_scale = val - case default if (present(pos)) then @@ -79,24 +76,24 @@ subroutine mld_z_base_onelev_setr(lv,what,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + + if ((ipos_==mld_pre_smooth_) .or.(ipos_==mld_both_smooth_)) then if (allocated(lv%sm)) then call lv%sm%set(what,val,info) end if - case (mld_post_smooth_) + end if + + if ((ipos_==mld_post_smooth_).or.(ipos_==mld_both_smooth_))then if (allocated(lv%sm2a)) then call lv%sm2a%set(what,val,info) end if - case default - ! Impossible!! - info = psb_err_internal_error_ - end select + end if + end select if (info /= psb_success_) goto 9999 diff --git a/mlprec/impl/level/mld_z_base_onelev_setsm.F90 b/mlprec/impl/level/mld_z_base_onelev_setsm.F90 index c0c46cea..b55ad761 100644 --- a/mlprec/impl/level/mld_z_base_onelev_setsm.F90 +++ b/mlprec/impl/level/mld_z_base_onelev_setsm.F90 @@ -63,14 +63,22 @@ subroutine mld_z_base_onelev_setsm(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - + + if (ipos_ == mld_both_smooth_) then + if (allocated(lev%sm2a)) then + call lev%sm2a%free(info) + deallocate(lev%sm2a, stat=info) + lev%sm2 => null() + end if + end if + select case(ipos_) - case(mld_pre_smooth_) + case(mld_pre_smooth_, mld_both_smooth_) if (allocated(lev%sm)) then if (.not.same_type_as(lev%sm,val)) then call lev%sm%free(info) @@ -85,7 +93,7 @@ subroutine mld_z_base_onelev_setsm(lev,val,info,pos) #endif end if call lev%sm%default() - lev%sm2 => lev%sm + if (ipos_ == mld_both_smooth_) lev%sm2 => lev%sm case(mld_post_smooth_) if (allocated(lev%sm2a)) then if (.not.same_type_as(lev%sm2a,val)) then diff --git a/mlprec/impl/level/mld_z_base_onelev_setsv.F90 b/mlprec/impl/level/mld_z_base_onelev_setsv.F90 index 4e5456d8..764e62d0 100644 --- a/mlprec/impl/level/mld_z_base_onelev_setsv.F90 +++ b/mlprec/impl/level/mld_z_base_onelev_setsv.F90 @@ -63,14 +63,13 @@ subroutine mld_z_base_onelev_setsv(lev,val,info,pos) case('POST') ipos_ = mld_post_smooth_ case default - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end select else - ipos_ = mld_pre_smooth_ + ipos_ = mld_both_smooth_ end if - select case(ipos_) - case(mld_pre_smooth_) + if ((ipos_ == mld_pre_smooth_).or.(ipos_ == mld_both_smooth_)) then if (allocated(lev%sm)) then if (allocated(lev%sm%sv)) then if (.not.same_type_as(lev%sm%sv,val)) then @@ -103,8 +102,18 @@ subroutine mld_z_base_onelev_setsv(lev,val,info,pos) return end if - - case(mld_post_smooth_) + end if + + ! + ! If POS was not specified and therefore we have mld_both_smooth_ + ! we need to update sm2a *only* if it was already allocated, + ! otherwise it is not needed (since we have just fixed %sm in the + ! pre section). + ! + + if ((ipos_ == mld_post_smooth_).or. & + ((ipos_ == mld_both_smooth_).and.(allocated(lev%sm2a)))) then + if (allocated(lev%sm2a)) then if (allocated(lev%sm2a%sv)) then @@ -139,7 +148,7 @@ subroutine mld_z_base_onelev_setsv(lev,val,info,pos) end if - end select + end if end subroutine mld_z_base_onelev_setsv diff --git a/mlprec/impl/mld_c_extprol_bld.f90 b/mlprec/impl/mld_c_extprol_bld.f90 index 6b14be1f..ea5ba464 100644 --- a/mlprec/impl/mld_c_extprol_bld.f90 +++ b/mlprec/impl/mld_c_extprol_bld.f90 @@ -154,10 +154,9 @@ subroutine mld_c_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) ! 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 + mxplevs = p%max_levs + mnaggratio = p%min_cr_ratio + casize = p%min_coarse_size iszv = size(p%precv) nprolv = size(prolv) nrestrv = size(restrv) @@ -167,19 +166,19 @@ subroutine mld_c_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) call psb_bcast(ictxt,mnaggratio) call psb_bcast(ictxt,nprolv) call psb_bcast(ictxt,nrestrv) - if (casize /= p%coarse_aggr_size) then + if (casize /= p%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= p%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= p%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(p%precv)) then @@ -220,8 +219,8 @@ subroutine mld_c_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) endif ! - nplevs = nrestrv + 1 - p%max_prec_levs = nplevs + nplevs = nrestrv + 1 + p%max_levs = nplevs ! ! Fixed number of levels. @@ -366,9 +365,9 @@ contains allocate(nlaggr(np),ilaggr(1)) nlaggr = 0 ilaggr = 0 - p%parms%aggr_alg = mld_ext_aggr_ - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) + p%parms%par_aggr_alg = mld_ext_aggr_ + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) diff --git a/mlprec/impl/mld_c_hierarchy_bld.f90 b/mlprec/impl/mld_c_hierarchy_bld.f90 index eb5f9e74..4e62e528 100644 --- a/mlprec/impl/mld_c_hierarchy_bld.f90 +++ b/mlprec/impl/mld_c_hierarchy_bld.f90 @@ -78,19 +78,19 @@ subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np - integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs, iaggsize - real(psb_spk_) :: mnaggratio, sizeratio, athresh, ascale, aomega - class(mld_c_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, base_sm2, med_sm2, coarse_sm2 + integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize,& + & nplevs, mxplevs, iaggsize + real(psb_spk_) :: mnaggratio, sizeratio, athresh, aomega + class(mld_c_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, & + & base_sm2, med_sm2, coarse_sm2 type(mld_sml_parms) :: baseparms, medparms, coarseparms integer(psb_ipk_), allocatable :: ilaggr(:), nlaggr(:) type(psb_cspmat_type) :: op_prol type(mld_c_onelev_type), allocatable :: tprecv(:) integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -111,21 +111,6 @@ subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_cprecinit @@ -138,28 +123,27 @@ subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = prec%coarse_aggr_size - mxplevs = prec%max_prec_levs - mnaggratio = prec%min_aggr_ratio - casize = prec%coarse_aggr_size + mxplevs = prec%max_levs + mnaggratio = prec%min_cr_ratio + casize = prec%min_coarse_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 /= prec%coarse_aggr_size) then + if (casize /= prec%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= prec%max_prec_levs) then + if (mxplevs /= prec%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= prec%min_aggr_ratio) then + if (mnaggratio /= prec%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(prec%precv)) then @@ -198,18 +182,20 @@ subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) ! 3. If the size of the array is different from target number of levels, ! reallocate; ! 4. Build the matrix hierarchy, stopping early if either the target - ! coarse size is hit, or the gain falls below the min_aggr_ratio + ! coarse size is hit, or the gain falls below the min_cr_ratio ! threshold. ! - if (casize <=0) then + if (casize < 0) then ! ! Default to the cubic root of the size at base level. ! casize = desc_a%get_global_rows() casize = int((sone*casize)**(sone/(sone*3)),psb_ipk_) casize = max(casize,ione) - casize = casize*40_psb_ipk_ + casize = casize*40_psb_ipk_ + call psb_bcast(ictxt,casize) + prec%min_coarse_size = casize end if nplevs = max(itwo,mxplevs) @@ -357,11 +343,9 @@ subroutine mld_c_hierarchy_bld(a,desc_a,prec,info) ! of distr/repl matrix at coarse level. Should be rethought. ! 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(prec%precv(newsz),coarse_sm,coarse_sm2,info) diff --git a/mlprec/impl/mld_c_lev_aggrmap_bld.f90 b/mlprec/impl/mld_c_lev_aggrmap_bld.f90 index 8a2d3646..f07d30b9 100644 --- a/mlprec/impl/mld_c_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_c_lev_aggrmap_bld.f90 @@ -108,15 +108,15 @@ subroutine mld_c_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) - call mld_check_def(p%parms%aggr_alg,'Aggregation',& - & mld_dec_aggr_,is_legal_ml_aggr_alg) + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) + call mld_check_def(p%parms%par_aggr_alg,'Aggregation',& + & mld_dec_aggr_,is_legal_ml_par_aggr_alg) call mld_check_def(p%parms%aggr_ord,'Ordering',& & mld_aggr_ord_nat_,is_legal_ml_aggr_ord) call mld_check_def(p%parms%aggr_thresh,'Aggr_Thresh',szero,is_legal_s_aggr_thrs) - select case(p%parms%aggr_alg) + select case(p%parms%par_aggr_alg) case (mld_dec_aggr_, mld_sym_dec_aggr_) ! @@ -125,7 +125,7 @@ subroutine mld_c_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! aggregation algorithm. This also defines a tentative prolongator from ! the coarse to the fine level. ! - call mld_aggrmap_bld(p%parms%aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& + call mld_aggrmap_bld(p%parms%par_aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& & a,desc_a,ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -137,14 +137,14 @@ subroutine mld_c_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) write(0,*) 'Matching is not implemented yet ' info = -1111 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 case default info = -1 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 end select diff --git a/mlprec/impl/mld_c_lev_aggrmat_asb.f90 b/mlprec/impl/mld_c_lev_aggrmat_asb.f90 index ed95d473..ebb1cfd3 100644 --- a/mlprec/impl/mld_c_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_c_lev_aggrmat_asb.f90 @@ -121,14 +121,12 @@ subroutine mld_c_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%aggr_kind,'Smoother',& - & mld_smooth_prol_,is_legal_ml_aggr_kind) + call mld_check_def(p%parms%aggr_prol,'Smoother',& + & mld_smooth_prol_,is_legal_ml_aggr_prol) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) call mld_check_def(p%parms%aggr_filter,'Use filtered matrix',& & mld_no_filter_mat_,is_legal_aggr_filter) - call mld_check_def(p%parms%smoother_pos,'smooth_pos',& - & mld_pre_smooth_,is_legal_ml_smooth_pos) call mld_check_def(p%parms%aggr_omega_alg,'Omega Alg.',& & mld_eig_est_,is_legal_ml_aggr_omega_alg) call mld_check_def(p%parms%aggr_eig,'Eigenvalue estimate',& @@ -139,7 +137,7 @@ subroutine mld_c_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! ! Build the coarse-level matrix from the fine-level one, starting from ! the mapping defined by mld_aggrmap_bld and applying the aggregation - ! algorithm specified by p%iprcparm(mld_aggr_kind_) + ! algorithm specified by p%iprcparm(mld_aggr_prol_) ! call mld_caggrmat_asb(a,desc_a,ilaggr,nlaggr,p%parms,ac,op_prol,op_restr,info) diff --git a/mlprec/impl/mld_c_smoothers_bld.f90 b/mlprec/impl/mld_c_smoothers_bld.f90 index 1b132c1f..e9e90297 100644 --- a/mlprec/impl/mld_c_smoothers_bld.f90 +++ b/mlprec/impl/mld_c_smoothers_bld.f90 @@ -1,3 +1,5 @@ + + ! ! ! MLD2P4 version 2.1 @@ -95,15 +97,13 @@ subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs real(psb_spk_) :: mnaggratio - integer(psb_ipk_) :: ipv(mld_ifpsz_), val + integer(psb_ipk_) :: ipv(mld_ifpsz_), val, coarse_solve_id integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -124,22 +124,6 @@ subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' - if (.not.allocated(prec%precv)) then !! Error: should have called mld_cprecinit info=3111 @@ -165,7 +149,7 @@ subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 endif - + ! ! Now do the real build. ! @@ -184,7 +168,97 @@ subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) endif end do - + ! + ! Issue a warning for inconsistent changes to COARSE_SOLVE + ! + if (me == psb_root_) then + coarse_solve_id = prec%precv(iszv)%parms%coarse_solve + select case (coarse_solve_id) + case(mld_umf_,mld_slu_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id),& + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_ilu_n_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_mumps_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_mumps_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + + case(mld_sludist_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id), & + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case(mld_bjac_) + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case default + ! We should never get here. + info=psb_err_from_subroutine_ + ch_err='unkn coarse_solve' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + + end select + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Exiting with',iszv,' levels' diff --git a/mlprec/impl/mld_caggrmat_asb.f90 b/mlprec/impl/mld_caggrmat_asb.f90 index eb186ce4..928a8677 100644 --- a/mlprec/impl/mld_caggrmat_asb.f90 +++ b/mlprec/impl/mld_caggrmat_asb.f90 @@ -52,7 +52,7 @@ ! A mapping from the nodes of the adjacency graph of A to the nodes of the ! adjacency graph of A_C has been computed by the mld_aggrmap_bld subroutine. ! The prolongator P_C is built here from this mapping, according to the -! value of p%iprcparm(mld_aggr_kind_), specified by the user through +! value of p%iprcparm(mld_aggr_prol_), specified by the user through ! mld_cprecinit and mld_zprecset. ! On output from this routine the entries of AC, op_prol, op_restr ! are still in "global numbering" mode; this is fixed in the calling routine @@ -153,7 +153,7 @@ subroutine mld_caggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,inf call psb_info(ictxt, me, np) - select case (parms%aggr_kind) + select case (parms%aggr_prol) case (mld_no_smooth_) call mld_caggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,& diff --git a/mlprec/impl/mld_caggrmat_biz_asb.f90 b/mlprec/impl/mld_caggrmat_biz_asb.f90 index dcd202a1..840bd55e 100644 --- a/mlprec/impl/mld_caggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_caggrmat_biz_asb.f90 @@ -342,7 +342,7 @@ subroutine mld_caggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr call psb_numbmm(a,tmp_prol,am3) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done NUMBMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done NUMBMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%transp(op_restr) if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/mld_caggrmat_smth_asb.f90 b/mlprec/impl/mld_caggrmat_smth_asb.f90 index 55992069..bdcb17aa 100644 --- a/mlprec/impl/mld_caggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_caggrmat_smth_asb.f90 @@ -352,7 +352,7 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done SPSPMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done SPSPMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%cp_to(tmpcoo) call tmpcoo%transp() diff --git a/mlprec/impl/mld_ccprecset.F90 b/mlprec/impl/mld_ccprecset.F90 index 08b9412a..a195ff6d 100644 --- a/mlprec/impl/mld_ccprecset.F90 +++ b/mlprec/impl/mld_ccprecset.F90 @@ -135,11 +135,11 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) - case ('COARSE_AGGR_SIZE') - p%coarse_aggr_size = max(val,-1) + case ('MIN_COARSE_SIZE') + p%min_coarse_size = max(val,-1) return - case('MAX_PREC_LEVS') - p%max_prec_levs = max(val,1) + case('MAX_LEVS') + p%max_levs = max(val,1) return case ('OUTER_SWEEPS') p%outer_sweeps = max(val,1) @@ -162,11 +162,9 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) case('SMOOTHER_TYPE','SUB_SOLVE','SMOOTHER_SWEEPS',& - & 'ML_TYPE','AGGR_ALG','AGGR_ORD',& - & 'AGGR_KIND','SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','SMOOTHER_SWEEPS_PRE',& - & 'SMOOTHER_SWEEPS_POST',& - & 'SUB_RESTR','SUB_PROL', & + & 'ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD',& + & 'AGGR_TYPE','AGGR_PROL','AGGR_OMEGA_ALG',& + & 'AGGR_EIG','SUB_RESTR','SUB_PROL', & & 'SUB_REN','SUB_OVR','SUB_FILLIN',& & 'COARSE_MAT') call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -200,11 +198,11 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -253,10 +251,8 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case('ML_TYPE','AGGR_ALG','AGGR_ORD','AGGR_KIND',& - & 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',& - & 'SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','AGGR_FILTER') + case('ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD','AGGR_PROL','AGGR_TYPE',& + & 'AGGR_OMEGA_ALG','AGGR_EIG','AGGR_FILTER') do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) if (info /= 0) return @@ -281,11 +277,11 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -478,8 +474,8 @@ subroutine mld_ccprecsetr(p,what,val,info,ilev,ilmax,pos) end if select case(psb_toupper(what)) - case ('MIN_AGGR_RATIO') - p%min_aggr_ratio = max(sone,val) + case ('MIN_CR_RATIO') + p%min_cr_ratio = max(sone,val) return end select @@ -517,18 +513,6 @@ subroutine mld_ccprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) - case('AGGR_SCALE') - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_SCALE',val,info,pos=pos) - end do - - case('AGGR_THRESH') - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_THRESH',thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_cmlprec_aply.f90 b/mlprec/impl/mld_cmlprec_aply.f90 index cfc66694..dad12b28 100644 --- a/mlprec/impl/mld_cmlprec_aply.f90 +++ b/mlprec/impl/mld_cmlprec_aply.f90 @@ -518,7 +518,7 @@ contains write(debug_unit,*) me,' Start inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -532,39 +532,7 @@ contains call mld_c_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_,mld_vcycle_ml_, mld_wcycle_ml_) call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) @@ -574,8 +542,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -643,7 +611,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(cone,& & mlprec_wrk(level)%vx2l,czero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -821,7 +789,7 @@ contains goto 9999 end if - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then call psb_geaxpby(cone,mlprec_wrk(level)%vx2l,& & czero,mlprec_wrk(level)%vty,& @@ -894,7 +862,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(cone,& & mlprec_wrk(level)%vx2l,czero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -976,7 +944,7 @@ contains ! ! Apply smoother ! - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(cone,& & mlprec_wrk(level)%vx2l,czero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -1036,13 +1004,13 @@ contains !Set the preconditioner if (level <= nlev - 2 ) then - if (p%precv(level)%parms%ml_type == mld_kcyclesym_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_kcyclesym_ml_) then call mld_cinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'FCG') - elseif (p%precv(level)%parms%ml_type == mld_kcycle_ml_) then + elseif (p%precv(level)%parms%ml_cycle == mld_kcycle_ml_) then call mld_cinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'GCR') else call psb_errpush(psb_err_internal_error_,name,& - & a_err='Bad value for ml_type') + & a_err='Bad value for ml_cycle') goto 9999 endif else @@ -1466,7 +1434,7 @@ contains write(debug_unit,*) me,' inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -1480,39 +1448,7 @@ contains call mld_c_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_, mld_vcycle_ml_, mld_wcycle_ml_) call mld_c_inner_mult(p, mlprec_wrk, level, trans, work) @@ -1522,8 +1458,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -1588,7 +1524,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(cone,& & mlprec_wrk(level)%x2l,czero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& @@ -1766,7 +1702,7 @@ contains call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then ! On second call will use output y2l as initial guess if (info == psb_success_) call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) endif @@ -1832,7 +1768,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(cone,& & mlprec_wrk(level)%x2l,czero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& diff --git a/mlprec/impl/mld_cmlprec_bld.f90 b/mlprec/impl/mld_cmlprec_bld.f90 index d5964b29..466be3ed 100644 --- a/mlprec/impl/mld_cmlprec_bld.f90 +++ b/mlprec/impl/mld_cmlprec_bld.f90 @@ -94,7 +94,6 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np @@ -102,7 +101,6 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold) real(psb_spk_) :: mnaggratio integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/mlprec/impl/mld_cprecaply.f90 b/mlprec/impl/mld_cprecaply.f90 index a0da9b29..f7a8097c 100644 --- a/mlprec/impl/mld_cprecaply.f90 +++ b/mlprec/impl/mld_cprecaply.f90 @@ -144,7 +144,8 @@ subroutine mld_cprecaply(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(cone,x,czero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post), & + & work_,info) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& @@ -336,7 +337,8 @@ subroutine mld_cprecaply2_vect(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(cone,x,czero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else @@ -438,7 +440,8 @@ subroutine mld_cprecaply1_vect(prec,x,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(cone,x,czero,ww,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else diff --git a/mlprec/impl/mld_cprecbld.f90 b/mlprec/impl/mld_cprecbld.f90 index ad328359..e549593a 100644 --- a/mlprec/impl/mld_cprecbld.f90 +++ b/mlprec/impl/mld_cprecbld.f90 @@ -74,7 +74,6 @@ subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables type(mld_cprec_type) :: t_prec @@ -82,7 +81,6 @@ subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) integer(psb_ipk_) :: err,i,k,err_act, iszv, newsz integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ type(mld_dml_parms) :: prm integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -105,21 +103,6 @@ subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. -!!$ if (present(upd)) then -!!$ if (debug_level >= psb_debug_outer_) & -!!$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd -!!$ -!!$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then -!!$ upd_=psb_toupper(upd) -!!$ else -!!$ upd_='F' -!!$ endif -!!$ else -!!$ upd_='F' -!!$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_cprecinit @@ -174,7 +157,7 @@ subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold) goto 9999 endif - call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + call prec%precv(1)%sm%build(a,desc_a,info,& & amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_cprecinit.F90 b/mlprec/impl/mld_cprecinit.F90 index 0bb6ae61..672872b8 100644 --- a/mlprec/impl/mld_cprecinit.F90 +++ b/mlprec/impl/mld_cprecinit.F90 @@ -108,7 +108,7 @@ subroutine mld_cprecinit(prec,ptype,info) ! Local variables integer(psb_ipk_) :: nlev_, ilev_ - real(psb_spk_) :: thr, scale + real(psb_spk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -118,7 +118,7 @@ subroutine mld_cprecinit(prec,ptype,info) ! Do we want to do something? endif endif - prec%coarse_aggr_size = -1 + prec%min_coarse_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') @@ -160,9 +160,26 @@ subroutine mld_cprecinit(prec,ptype,info) case ('ML') - nlev_ = prec%max_prec_levs + nlev_ = prec%max_levs ilev_ = 1 - allocate(prec%precv(nlev_),stat=info) + allocate(prec%precv(nlev_),stat=info) + + +#if 1 + do ilev_ = 1, nlev_ + call prec%precv(ilev_)%default() + end do + call prec%set('ML_CYCLE','VCYCLE',info) + call prec%set('SMOOTHER_TYPE','FBGS',info) +#if defined(HAVE_MUMPS_) + call prec%set('COARSE_SOLVE','MUMPS',info) +#elif defined(HAVE_SLU_) + call prec%set('COARSE_SOLVE','SLU',info) +#else + call prec%set('COARSE_SOLVE','ILU',info) +#endif + !call prec%precv(nlev_)%default() +#else allocate(mld_c_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return allocate(mld_c_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) @@ -193,13 +210,11 @@ subroutine mld_cprecinit(prec,ptype,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 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 - +#endif case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_cprecset.F90 b/mlprec/impl/mld_cprecset.F90 index 005f4927..9236e7b9 100644 --- a/mlprec/impl/mld_cprecset.F90 +++ b/mlprec/impl/mld_cprecset.F90 @@ -134,11 +134,11 @@ subroutine mld_cprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) - case (mld_coarse_aggr_size_) - p%coarse_aggr_size = max(val,-1) + case (mld_min_coarse_size_) + p%min_coarse_size = max(val,-1) return - case(mld_max_prec_levs_) - p%max_prec_levs = max(val,1) + case(mld_max_levs_) + p%max_levs = max(val,1) return case(mld_outer_sweeps_) p%outer_sweeps = max(val,1) @@ -158,10 +158,8 @@ subroutine mld_cprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) case(mld_smoother_type_,mld_sub_solve_,mld_smoother_sweeps_,& - & mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,& - & mld_aggr_kind_,mld_smoother_pos_,& - & mld_aggr_omega_alg_,mld_aggr_eig_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& + & mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,& + & mld_aggr_prol_, mld_aggr_omega_alg_,mld_aggr_eig_,& & mld_sub_restr_,mld_sub_prol_, & & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_coarse_mat_) @@ -196,11 +194,11 @@ subroutine mld_cprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) @@ -248,9 +246,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case(mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,mld_aggr_kind_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& - & mld_smoother_pos_,mld_aggr_omega_alg_,& + case(mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,mld_aggr_prol_,& & mld_aggr_eig_,mld_aggr_filter_) do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -274,14 +270,10 @@ subroutine mld_cprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_) - call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) - call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) - call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) case(mld_mumps_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) @@ -574,8 +566,8 @@ subroutine mld_cprecsetr(p,what,val,info,ilev,ilmax,pos) info = psb_success_ select case(what) - case (mld_min_aggr_ratio_) - p%min_aggr_ratio = max(sone,val) + case (mld_min_cr_ratio_) + p%min_cr_ratio = max(sone,val) return end select @@ -619,18 +611,6 @@ subroutine mld_cprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set(mld_sub_iluthrs_,val,info,pos=pos) - case(mld_aggr_scale_) - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_scale_,val,info,pos=pos) - end do - - case(mld_aggr_thresh_) - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_cslud_interface.c b/mlprec/impl/mld_cslud_interface.c deleted file mode 100644 index d8aee1f6..00000000 --- a/mlprec/impl/mld_cslud_interface.c +++ /dev/null @@ -1,356 +0,0 @@ -/* - * - * MLD2P4 version 2.0 - * MultiLevel Domain Decomposition Parallel Preconditioners Package - * based on PSBLAS (Parallel Sparse BLAS version 3.3) - * - * (C) Copyright 2008, 2010, 2012, 2015, 2017 - * - * Salvatore Filippone Cranfield University - * Ambra Abdullahi Hassan University of Rome Tor Vergata - * Alfredo Buttari CNRS-IRIT, Toulouse - * Pasqua D'Ambra ICAR-CNR, Naples - * Daniela di Serafino University of Campania "L. Vanvitelli", Caserta - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions, and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the MLD2P4 group or the names of its contributors may - * not be used to endorse or promote products derived from this - * software without specific written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * - * File: mld_cslud_interface.c - * - * Functions: mld_csludist_fact, mld_csludist_solve, mld_csludist_free. - * - * This file is an interface to the SuperLU_dist routines for sparse factorization and - * solve. It was obtained by modifying the c_fortran_zgssv.c file from the SuperLU_dist - * source distribution; original copyright terms are reproduced below. - * - */ - -/* ===================== - -Copyright (c) 2003, The Regents of the University of California, through -Lawrence Berkeley National Laboratory (subject to receipt of any required -approvals from U.S. Dept. of Energy) - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -(1) Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -(2) Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -(3) Neither the name of Lawrence Berkeley National Laboratory, U.S. Dept. of -Energy nor the names of its contributors may be used to endorse or promote -products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -/* - * -- Distributed SuperLU routine (version 2.0) -- - * Lawrence Berkeley National Lab, Univ. of California Berkeley. - * March 15, 2003 - * - */ - - -/* as of v 3.3 SLUDist does not have a single precision interface */ -#ifdef Have_SLUDist_ -#undef Have_SLUDist_ -#endif - -#ifdef Have_SLUDist_ -#include -#include "superlu_zdefs.h" - -#define HANDLE_SIZE 8 - -typedef struct { - SuperMatrix *A; - LUstruct_t *LUstruct; - gridinfo_t *grid; - ScalePermstruct_t *ScalePermstruct; -} factors_t; - - -#else - -#include - -#endif - - -int mld_csludist_fact(int n, int nl, int nnzl, int ffstr, -#ifdef Have_SLUDist_ - complex *values, int *rowptr, int *colind, - void **f_factors, -#else - void *values, int *rowptr, int *colind, - void **f_factors, -#endif - int nprow, int npcol) - -{ -/* - * This routine can be called from Fortran. - * performs LU decomposition. - * - * f_factors (input/output) void** - * On output contains the pointer pointing to - * the structure of the factored matrices. - * - */ - -#ifdef Have_SLUDist_ - SuperMatrix *A; - NRformat_loc *Astore; - - ScalePermstruct_t *ScalePermstruct; - LUstruct_t *LUstruct; - SOLVEstruct_t SOLVEstruct; - gridinfo_t *grid; - int i, panel_size, permc_spec, relax, info; - trans_t trans; - float drop_tol = 0.0,berr[1]; - mem_usage_t mem_usage; - superlu_options_t options; - SuperLUStat_t stat; - factors_t *LUfactors; - int fst_row; - int *icol,*irpt; - complex *ival,b[1]; - - trans = NOTRANS; - grid = (gridinfo_t *) SUPERLU_MALLOC(sizeof(gridinfo_t)); - superlu_gridinit(MPI_COMM_WORLD, nprow, npcol, grid); - /* Initialize the statistics variables. */ - PStatInit(&stat); - fst_row = (ffstr); - - A = (SuperMatrix *) malloc(sizeof(SuperMatrix)); - zCreate_CompRowLoc_Matrix_dist(A, n, n, nnzl, nl, fst_row, - values, colind, rowptr, - SLU_NR_loc, SLU_Z, SLU_GE); - - /* Initialize ScalePermstruct and LUstruct. */ - ScalePermstruct = (ScalePermstruct_t *) SUPERLU_MALLOC(sizeof(ScalePermstruct_t)); - LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t)); - ScalePermstructInit(n,n, ScalePermstruct); -#if defined(SLUD_VERSION_4) - LUstructInit(n, LUstruct); -#elif defined(SLUD_VERSION_3) - LUstructInit(n,n, LUstruct); -#else - choke_on_me; -#endif - - - /* Set the default input options. */ - set_default_options_dist(&options); - options.IterRefine=NO; - options.PrintStat=NO; - - pzgssvx(&options, A, ScalePermstruct, b, nl, 0, - grid, LUstruct, &SOLVEstruct, berr, &stat, &info); - - if ( info == 0 ) { - ; - } else { - printf("pzgssvx() error returns INFO= %d\n", info); - if ( info <= n ) { /* factorization completes */ - ; - } - } - if (options.SolveInitialized) { - zSolveFinalize(&options,&SOLVEstruct); - } - - - /* Save the LU factors in the factors handle */ - LUfactors = (factors_t *) SUPERLU_MALLOC(sizeof(factors_t)); - LUfactors->LUstruct = LUstruct; - LUfactors->grid = grid; - LUfactors->A = A; - LUfactors->ScalePermstruct = ScalePermstruct; -/* fprintf(stderr,"slud factor: LUFactors %p \n",LUfactors); */ -/* fprintf(stderr,"slud factor: A %p %p\n",A,LUfactors->A); */ -/* fprintf(stderr,"slud factor: grid %p %p\n",grid,LUfactors->grid); */ -/* fprintf(stderr,"slud factor: LUstruct %p %p\n",LUstruct,LUfactors->LUstruct); */ - *f_factors = (void *) LUfactors; - PStatFree(&stat); - return(info); -#else - fprintf(stderr," SLUDist does not have single precision, sorry.\n"); - return(-1); -#endif -} - - -int mld_csludist_solve(int itrans, int n, int nrhs, -#ifdef Have_SLUDist_ - complex *b, -#else - void *b, -#endif - int ldb, void *f_factors) - -{ -/* - * This routine can be called from Fortran. - * performs triangular solve - * - */ -#ifdef Have_SLUDist_ - SuperMatrix *A; - ScalePermstruct_t *ScalePermstruct; - LUstruct_t *LUstruct; - SOLVEstruct_t SOLVEstruct; - gridinfo_t *grid; - int i, panel_size, permc_spec, relax, info; - trans_t trans; - float drop_tol = 0.0; - float *berr; - mem_usage_t mem_usage; - superlu_options_t options; - SuperLUStat_t stat; - factors_t *LUfactors; - - LUfactors = (factors_t *) f_factors ; - A = LUfactors->A ; - LUstruct = LUfactors->LUstruct ; - grid = LUfactors->grid ; - - ScalePermstruct = LUfactors->ScalePermstruct; -/* fprintf(stderr,"slud solve: LUFactors %p \n",LUfactors); */ -/* fprintf(stderr,"slud solve: A %p %p\n",A,LUfactors->A); */ -/* fprintf(stderr,"slud solve: grid %p %p\n",grid,LUfactors->grid); */ -/* fprintf(stderr,"slud solve: LUstruct %p %p\n",LUstruct,LUfactors->LUstruct); */ - - - if (itrans == 0) { - trans = NOTRANS; - } else if (itrans ==1) { - trans = TRANS; - } else if (itrans ==2) { - trans = CONJ; - } else { - trans = NOTRANS; - } - -/* fprintf(stderr,"Entry to sludist_solve\n"); */ - berr = (float *) malloc((nrhs) *sizeof(float)); - - /* Initialize the statistics variables. */ - PStatInit(&stat); - - /* Set the default input options. */ - set_default_options_dist(&options); - options.IterRefine = NO; - options.Fact = FACTORED; - options.PrintStat = NO; - - pzgssvx(&options, A, ScalePermstruct, b, ldb, nrhs, - grid, LUstruct, &SOLVEstruct, berr, &stat, &info); - -/* fprintf(stderr,"Float check: after solve %d %lf\n",*info,berr[0]); */ - if (options.SolveInitialized) { - zSolveFinalize(&options,&SOLVEstruct); - } - PStatFree(&stat); - free(berr); - return(info); -#else - fprintf(stderr," SLUDist does not have single precision, sorry.\n"); - return(-1); -#endif - -} - - -int mld_csludist_free(void *f_factors) -{ -/* - * This routine can be called from Fortran. - * - * free all storage in the end - * - */ -#ifdef Have_SLUDist_ - SuperMatrix *A; - ScalePermstruct_t *ScalePermstruct; - LUstruct_t *LUstruct; - SOLVEstruct_t SOLVEstruct; - gridinfo_t *grid; - int i, panel_size, permc_spec, relax; - trans_t trans; - float drop_tol = 0.0; - float *berr; - mem_usage_t mem_usage; - superlu_options_t options; - SuperLUStat_t stat; - factors_t *LUfactors; - - - if (f_factors == NULL) - return(0); - LUfactors = (factors_t *) f_factors ; - A = LUfactors->A ; - LUstruct = LUfactors->LUstruct ; - grid = LUfactors->grid ; - ScalePermstruct = LUfactors->ScalePermstruct; - - // Memory leak: with SuperLU_Dist 3.3 - // we either have a leak or a segfault here. - // To be investigated further. - //Destroy_CompRowLoc_Matrix_dist(A); - ScalePermstructFree(ScalePermstruct); - LUstructFree(LUstruct); - superlu_gridexit(grid); - - free(grid); - free(LUstruct); - free(LUfactors); - return(0); - -#else - fprintf(stderr," SLUDist does not have single precision, sorry.\n"); - return(-1); -#endif -} - - diff --git a/mlprec/impl/mld_d_extprol_bld.f90 b/mlprec/impl/mld_d_extprol_bld.f90 index a87123f2..98331dd4 100644 --- a/mlprec/impl/mld_d_extprol_bld.f90 +++ b/mlprec/impl/mld_d_extprol_bld.f90 @@ -154,10 +154,9 @@ subroutine mld_d_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) ! 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 + mxplevs = p%max_levs + mnaggratio = p%min_cr_ratio + casize = p%min_coarse_size iszv = size(p%precv) nprolv = size(prolv) nrestrv = size(restrv) @@ -167,19 +166,19 @@ subroutine mld_d_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) call psb_bcast(ictxt,mnaggratio) call psb_bcast(ictxt,nprolv) call psb_bcast(ictxt,nrestrv) - if (casize /= p%coarse_aggr_size) then + if (casize /= p%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= p%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= p%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(p%precv)) then @@ -220,8 +219,8 @@ subroutine mld_d_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) endif ! - nplevs = nrestrv + 1 - p%max_prec_levs = nplevs + nplevs = nrestrv + 1 + p%max_levs = nplevs ! ! Fixed number of levels. @@ -366,9 +365,9 @@ contains allocate(nlaggr(np),ilaggr(1)) nlaggr = 0 ilaggr = 0 - p%parms%aggr_alg = mld_ext_aggr_ - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) + p%parms%par_aggr_alg = mld_ext_aggr_ + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) diff --git a/mlprec/impl/mld_d_hierarchy_bld.f90 b/mlprec/impl/mld_d_hierarchy_bld.f90 index 5be032ed..a25f5049 100644 --- a/mlprec/impl/mld_d_hierarchy_bld.f90 +++ b/mlprec/impl/mld_d_hierarchy_bld.f90 @@ -78,19 +78,19 @@ subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np - integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs, iaggsize - real(psb_dpk_) :: mnaggratio, sizeratio, athresh, ascale, aomega - class(mld_d_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, base_sm2, med_sm2, coarse_sm2 + integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize,& + & nplevs, mxplevs, iaggsize + real(psb_dpk_) :: mnaggratio, sizeratio, athresh, aomega + class(mld_d_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, & + & base_sm2, med_sm2, coarse_sm2 type(mld_dml_parms) :: baseparms, medparms, coarseparms integer(psb_ipk_), allocatable :: ilaggr(:), nlaggr(:) type(psb_dspmat_type) :: op_prol type(mld_d_onelev_type), allocatable :: tprecv(:) integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -111,21 +111,6 @@ subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_dprecinit @@ -138,28 +123,27 @@ subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = prec%coarse_aggr_size - mxplevs = prec%max_prec_levs - mnaggratio = prec%min_aggr_ratio - casize = prec%coarse_aggr_size + mxplevs = prec%max_levs + mnaggratio = prec%min_cr_ratio + casize = prec%min_coarse_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 /= prec%coarse_aggr_size) then + if (casize /= prec%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= prec%max_prec_levs) then + if (mxplevs /= prec%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= prec%min_aggr_ratio) then + if (mnaggratio /= prec%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(prec%precv)) then @@ -198,18 +182,20 @@ subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) ! 3. If the size of the array is different from target number of levels, ! reallocate; ! 4. Build the matrix hierarchy, stopping early if either the target - ! coarse size is hit, or the gain falls below the min_aggr_ratio + ! coarse size is hit, or the gain falls below the min_cr_ratio ! threshold. ! - if (casize <=0) then + if (casize < 0) then ! ! Default to the cubic root of the size at base level. ! casize = desc_a%get_global_rows() casize = int((done*casize)**(done/(done*3)),psb_ipk_) casize = max(casize,ione) - casize = casize*40_psb_ipk_ + casize = casize*40_psb_ipk_ + call psb_bcast(ictxt,casize) + prec%min_coarse_size = casize end if nplevs = max(itwo,mxplevs) @@ -357,11 +343,9 @@ subroutine mld_d_hierarchy_bld(a,desc_a,prec,info) ! of distr/repl matrix at coarse level. Should be rethought. ! 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(prec%precv(newsz),coarse_sm,coarse_sm2,info) diff --git a/mlprec/impl/mld_d_lev_aggrmap_bld.f90 b/mlprec/impl/mld_d_lev_aggrmap_bld.f90 index 94839bad..d1bcc8a8 100644 --- a/mlprec/impl/mld_d_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_d_lev_aggrmap_bld.f90 @@ -108,15 +108,15 @@ subroutine mld_d_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) - call mld_check_def(p%parms%aggr_alg,'Aggregation',& - & mld_dec_aggr_,is_legal_ml_aggr_alg) + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) + call mld_check_def(p%parms%par_aggr_alg,'Aggregation',& + & mld_dec_aggr_,is_legal_ml_par_aggr_alg) call mld_check_def(p%parms%aggr_ord,'Ordering',& & mld_aggr_ord_nat_,is_legal_ml_aggr_ord) call mld_check_def(p%parms%aggr_thresh,'Aggr_Thresh',dzero,is_legal_d_aggr_thrs) - select case(p%parms%aggr_alg) + select case(p%parms%par_aggr_alg) case (mld_dec_aggr_, mld_sym_dec_aggr_) ! @@ -125,7 +125,7 @@ subroutine mld_d_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! aggregation algorithm. This also defines a tentative prolongator from ! the coarse to the fine level. ! - call mld_aggrmap_bld(p%parms%aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& + call mld_aggrmap_bld(p%parms%par_aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& & a,desc_a,ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -137,14 +137,14 @@ subroutine mld_d_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) write(0,*) 'Matching is not implemented yet ' info = -1111 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 case default info = -1 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 end select diff --git a/mlprec/impl/mld_d_lev_aggrmat_asb.f90 b/mlprec/impl/mld_d_lev_aggrmat_asb.f90 index 145eec26..082dbea5 100644 --- a/mlprec/impl/mld_d_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_d_lev_aggrmat_asb.f90 @@ -121,14 +121,12 @@ subroutine mld_d_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%aggr_kind,'Smoother',& - & mld_smooth_prol_,is_legal_ml_aggr_kind) + call mld_check_def(p%parms%aggr_prol,'Smoother',& + & mld_smooth_prol_,is_legal_ml_aggr_prol) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) call mld_check_def(p%parms%aggr_filter,'Use filtered matrix',& & mld_no_filter_mat_,is_legal_aggr_filter) - call mld_check_def(p%parms%smoother_pos,'smooth_pos',& - & mld_pre_smooth_,is_legal_ml_smooth_pos) call mld_check_def(p%parms%aggr_omega_alg,'Omega Alg.',& & mld_eig_est_,is_legal_ml_aggr_omega_alg) call mld_check_def(p%parms%aggr_eig,'Eigenvalue estimate',& @@ -139,7 +137,7 @@ subroutine mld_d_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! ! Build the coarse-level matrix from the fine-level one, starting from ! the mapping defined by mld_aggrmap_bld and applying the aggregation - ! algorithm specified by p%iprcparm(mld_aggr_kind_) + ! algorithm specified by p%iprcparm(mld_aggr_prol_) ! call mld_daggrmat_asb(a,desc_a,ilaggr,nlaggr,p%parms,ac,op_prol,op_restr,info) diff --git a/mlprec/impl/mld_d_smoothers_bld.f90 b/mlprec/impl/mld_d_smoothers_bld.f90 index 5ba6dbb1..c36ef28e 100644 --- a/mlprec/impl/mld_d_smoothers_bld.f90 +++ b/mlprec/impl/mld_d_smoothers_bld.f90 @@ -1,3 +1,5 @@ + + ! ! ! MLD2P4 version 2.1 @@ -95,15 +97,13 @@ subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs real(psb_dpk_) :: mnaggratio - integer(psb_ipk_) :: ipv(mld_ifpsz_), val + integer(psb_ipk_) :: ipv(mld_ifpsz_), val, coarse_solve_id integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -124,22 +124,6 @@ subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' - if (.not.allocated(prec%precv)) then !! Error: should have called mld_dprecinit info=3111 @@ -165,7 +149,7 @@ subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 endif - + ! ! Now do the real build. ! @@ -184,7 +168,97 @@ subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) endif end do - + ! + ! Issue a warning for inconsistent changes to COARSE_SOLVE + ! + if (me == psb_root_) then + coarse_solve_id = prec%precv(iszv)%parms%coarse_solve + select case (coarse_solve_id) + case(mld_umf_,mld_slu_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id),& + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_ilu_n_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_mumps_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_mumps_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + + case(mld_sludist_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id), & + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case(mld_bjac_) + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case default + ! We should never get here. + info=psb_err_from_subroutine_ + ch_err='unkn coarse_solve' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + + end select + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Exiting with',iszv,' levels' diff --git a/mlprec/impl/mld_daggrmat_asb.f90 b/mlprec/impl/mld_daggrmat_asb.f90 index ddd01378..2d81ac90 100644 --- a/mlprec/impl/mld_daggrmat_asb.f90 +++ b/mlprec/impl/mld_daggrmat_asb.f90 @@ -52,7 +52,7 @@ ! A mapping from the nodes of the adjacency graph of A to the nodes of the ! adjacency graph of A_C has been computed by the mld_aggrmap_bld subroutine. ! The prolongator P_C is built here from this mapping, according to the -! value of p%iprcparm(mld_aggr_kind_), specified by the user through +! value of p%iprcparm(mld_aggr_prol_), specified by the user through ! mld_dprecinit and mld_zprecset. ! On output from this routine the entries of AC, op_prol, op_restr ! are still in "global numbering" mode; this is fixed in the calling routine @@ -153,7 +153,7 @@ subroutine mld_daggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,inf call psb_info(ictxt, me, np) - select case (parms%aggr_kind) + select case (parms%aggr_prol) case (mld_no_smooth_) call mld_daggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,& diff --git a/mlprec/impl/mld_daggrmat_biz_asb.f90 b/mlprec/impl/mld_daggrmat_biz_asb.f90 index 01330b1c..64d6e33c 100644 --- a/mlprec/impl/mld_daggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_daggrmat_biz_asb.f90 @@ -342,7 +342,7 @@ subroutine mld_daggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr call psb_numbmm(a,tmp_prol,am3) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done NUMBMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done NUMBMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%transp(op_restr) if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/mld_daggrmat_smth_asb.f90 b/mlprec/impl/mld_daggrmat_smth_asb.f90 index 9e1c6a94..582dd367 100644 --- a/mlprec/impl/mld_daggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_daggrmat_smth_asb.f90 @@ -352,7 +352,7 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done SPSPMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done SPSPMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%cp_to(tmpcoo) call tmpcoo%transp() diff --git a/mlprec/impl/mld_dcprecset.F90 b/mlprec/impl/mld_dcprecset.F90 index 8ece91a4..630e2a41 100644 --- a/mlprec/impl/mld_dcprecset.F90 +++ b/mlprec/impl/mld_dcprecset.F90 @@ -141,11 +141,11 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) - case ('COARSE_AGGR_SIZE') - p%coarse_aggr_size = max(val,-1) + case ('MIN_COARSE_SIZE') + p%min_coarse_size = max(val,-1) return - case('MAX_PREC_LEVS') - p%max_prec_levs = max(val,1) + case('MAX_LEVS') + p%max_levs = max(val,1) return case ('OUTER_SWEEPS') p%outer_sweeps = max(val,1) @@ -168,11 +168,9 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) case('SMOOTHER_TYPE','SUB_SOLVE','SMOOTHER_SWEEPS',& - & 'ML_TYPE','AGGR_ALG','AGGR_ORD',& - & 'AGGR_KIND','SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','SMOOTHER_SWEEPS_PRE',& - & 'SMOOTHER_SWEEPS_POST',& - & 'SUB_RESTR','SUB_PROL', & + & 'ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD',& + & 'AGGR_TYPE','AGGR_PROL','AGGR_OMEGA_ALG',& + & 'AGGR_EIG','SUB_RESTR','SUB_PROL', & & 'SUB_REN','SUB_OVR','SUB_FILLIN',& & 'COARSE_MAT') call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -208,11 +206,19 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) + case(mld_umf_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) + case(mld_sludist_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -261,10 +267,8 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case('ML_TYPE','AGGR_ALG','AGGR_ORD','AGGR_KIND',& - & 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',& - & 'SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','AGGR_FILTER') + case('ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD','AGGR_PROL','AGGR_TYPE',& + & 'AGGR_OMEGA_ALG','AGGR_EIG','AGGR_FILTER') do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) if (info /= 0) return @@ -291,11 +295,19 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) + case(mld_mumps_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) + case(mld_umf_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_sludist_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -488,8 +500,8 @@ subroutine mld_dcprecsetr(p,what,val,info,ilev,ilmax,pos) end if select case(psb_toupper(what)) - case ('MIN_AGGR_RATIO') - p%min_aggr_ratio = max(done,val) + case ('MIN_CR_RATIO') + p%min_cr_ratio = max(done,val) return end select @@ -527,18 +539,6 @@ subroutine mld_dcprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) - case('AGGR_SCALE') - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_SCALE',val,info,pos=pos) - end do - - case('AGGR_THRESH') - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_THRESH',thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_dmlprec_aply.f90 b/mlprec/impl/mld_dmlprec_aply.f90 index 483f5bae..ba4157bb 100644 --- a/mlprec/impl/mld_dmlprec_aply.f90 +++ b/mlprec/impl/mld_dmlprec_aply.f90 @@ -518,7 +518,7 @@ contains write(debug_unit,*) me,' Start inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -532,39 +532,7 @@ contains call mld_d_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_,mld_vcycle_ml_, mld_wcycle_ml_) call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) @@ -574,8 +542,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -643,7 +611,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(done,& & mlprec_wrk(level)%vx2l,dzero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -821,7 +789,7 @@ contains goto 9999 end if - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then call psb_geaxpby(done,mlprec_wrk(level)%vx2l,& & dzero,mlprec_wrk(level)%vty,& @@ -894,7 +862,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(done,& & mlprec_wrk(level)%vx2l,dzero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -976,7 +944,7 @@ contains ! ! Apply smoother ! - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(done,& & mlprec_wrk(level)%vx2l,dzero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -1036,13 +1004,13 @@ contains !Set the preconditioner if (level <= nlev - 2 ) then - if (p%precv(level)%parms%ml_type == mld_kcyclesym_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_kcyclesym_ml_) then call mld_dinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'FCG') - elseif (p%precv(level)%parms%ml_type == mld_kcycle_ml_) then + elseif (p%precv(level)%parms%ml_cycle == mld_kcycle_ml_) then call mld_dinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'GCR') else call psb_errpush(psb_err_internal_error_,name,& - & a_err='Bad value for ml_type') + & a_err='Bad value for ml_cycle') goto 9999 endif else @@ -1466,7 +1434,7 @@ contains write(debug_unit,*) me,' inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -1480,39 +1448,7 @@ contains call mld_d_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_, mld_vcycle_ml_, mld_wcycle_ml_) call mld_d_inner_mult(p, mlprec_wrk, level, trans, work) @@ -1522,8 +1458,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -1588,7 +1524,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(done,& & mlprec_wrk(level)%x2l,dzero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& @@ -1766,7 +1702,7 @@ contains call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then ! On second call will use output y2l as initial guess if (info == psb_success_) call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) endif @@ -1832,7 +1768,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(done,& & mlprec_wrk(level)%x2l,dzero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& diff --git a/mlprec/impl/mld_dmlprec_bld.f90 b/mlprec/impl/mld_dmlprec_bld.f90 index 7b579fc6..2698eef6 100644 --- a/mlprec/impl/mld_dmlprec_bld.f90 +++ b/mlprec/impl/mld_dmlprec_bld.f90 @@ -94,7 +94,6 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np @@ -102,7 +101,6 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold) real(psb_dpk_) :: mnaggratio integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/mlprec/impl/mld_dprecaply.f90 b/mlprec/impl/mld_dprecaply.f90 index 4964d07a..316e80c1 100644 --- a/mlprec/impl/mld_dprecaply.f90 +++ b/mlprec/impl/mld_dprecaply.f90 @@ -144,7 +144,8 @@ subroutine mld_dprecaply(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(done,x,dzero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post), & + & work_,info) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& @@ -336,7 +337,8 @@ subroutine mld_dprecaply2_vect(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(done,x,dzero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else @@ -438,7 +440,8 @@ subroutine mld_dprecaply1_vect(prec,x,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(done,x,dzero,ww,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else diff --git a/mlprec/impl/mld_dprecbld.f90 b/mlprec/impl/mld_dprecbld.f90 index 66f4b092..32d7a958 100644 --- a/mlprec/impl/mld_dprecbld.f90 +++ b/mlprec/impl/mld_dprecbld.f90 @@ -74,7 +74,6 @@ subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables type(mld_dprec_type) :: t_prec @@ -82,7 +81,6 @@ subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) integer(psb_ipk_) :: err,i,k,err_act, iszv, newsz integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ type(mld_dml_parms) :: prm integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -105,21 +103,6 @@ subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. -!!$ if (present(upd)) then -!!$ if (debug_level >= psb_debug_outer_) & -!!$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd -!!$ -!!$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then -!!$ upd_=psb_toupper(upd) -!!$ else -!!$ upd_='F' -!!$ endif -!!$ else -!!$ upd_='F' -!!$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_dprecinit @@ -174,7 +157,7 @@ subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold) goto 9999 endif - call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + call prec%precv(1)%sm%build(a,desc_a,info,& & amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_dprecinit.F90 b/mlprec/impl/mld_dprecinit.F90 index be29400a..c1f950d7 100644 --- a/mlprec/impl/mld_dprecinit.F90 +++ b/mlprec/impl/mld_dprecinit.F90 @@ -111,7 +111,7 @@ subroutine mld_dprecinit(prec,ptype,info) ! Local variables integer(psb_ipk_) :: nlev_, ilev_ - real(psb_dpk_) :: thr, scale + real(psb_dpk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -121,7 +121,7 @@ subroutine mld_dprecinit(prec,ptype,info) ! Do we want to do something? endif endif - prec%coarse_aggr_size = -1 + prec%min_coarse_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') @@ -163,9 +163,28 @@ subroutine mld_dprecinit(prec,ptype,info) case ('ML') - nlev_ = prec%max_prec_levs + nlev_ = prec%max_levs ilev_ = 1 - allocate(prec%precv(nlev_),stat=info) + allocate(prec%precv(nlev_),stat=info) + + +#if 1 + do ilev_ = 1, nlev_ + call prec%precv(ilev_)%default() + end do + call prec%set('ML_CYCLE','VCYCLE',info) + call prec%set('SMOOTHER_TYPE','FBGS',info) +#if defined(HAVE_UMF_) + call prec%set('COARSE_SOLVE','UMF',info) +#elif defined(HAVE_MUMPS_) + call prec%set('COARSE_SOLVE','MUMPS',info) +#elif defined(HAVE_SLU_) + call prec%set('COARSE_SOLVE','SLU',info) +#else + call prec%set('COARSE_SOLVE','ILU',info) +#endif + !call prec%precv(nlev_)%default() +#else allocate(mld_d_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return allocate(mld_d_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) @@ -198,13 +217,11 @@ subroutine mld_dprecinit(prec,ptype,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 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 - +#endif case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_dprecset.F90 b/mlprec/impl/mld_dprecset.F90 index fadbdb62..270eec8e 100644 --- a/mlprec/impl/mld_dprecset.F90 +++ b/mlprec/impl/mld_dprecset.F90 @@ -140,11 +140,11 @@ subroutine mld_dprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) - case (mld_coarse_aggr_size_) - p%coarse_aggr_size = max(val,-1) + case (mld_min_coarse_size_) + p%min_coarse_size = max(val,-1) return - case(mld_max_prec_levs_) - p%max_prec_levs = max(val,1) + case(mld_max_levs_) + p%max_levs = max(val,1) return case(mld_outer_sweeps_) p%outer_sweeps = max(val,1) @@ -164,10 +164,8 @@ subroutine mld_dprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) case(mld_smoother_type_,mld_sub_solve_,mld_smoother_sweeps_,& - & mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,& - & mld_aggr_kind_,mld_smoother_pos_,& - & mld_aggr_omega_alg_,mld_aggr_eig_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& + & mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,& + & mld_aggr_prol_, mld_aggr_omega_alg_,mld_aggr_eig_,& & mld_sub_restr_,mld_sub_prol_, & & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_coarse_mat_) @@ -204,11 +202,19 @@ subroutine mld_dprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) + call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) + call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) + case(mld_umf_) + call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) + call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) + case(mld_sludist_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) @@ -256,9 +262,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case(mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,mld_aggr_kind_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& - & mld_smoother_pos_,mld_aggr_omega_alg_,& + case(mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,mld_aggr_prol_,& & mld_aggr_eig_,mld_aggr_filter_) do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -284,15 +288,19 @@ subroutine mld_dprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_) + case(mld_mumps_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_mumps_) + case(mld_umf_) + call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) + call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) + case(mld_sludist_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) @@ -584,8 +592,8 @@ subroutine mld_dprecsetr(p,what,val,info,ilev,ilmax,pos) info = psb_success_ select case(what) - case (mld_min_aggr_ratio_) - p%min_aggr_ratio = max(done,val) + case (mld_min_cr_ratio_) + p%min_cr_ratio = max(done,val) return end select @@ -629,18 +637,6 @@ subroutine mld_dprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set(mld_sub_iluthrs_,val,info,pos=pos) - case(mld_aggr_scale_) - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_scale_,val,info,pos=pos) - end do - - case(mld_aggr_thresh_) - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_s_extprol_bld.f90 b/mlprec/impl/mld_s_extprol_bld.f90 index 2dc72bbe..22f96faa 100644 --- a/mlprec/impl/mld_s_extprol_bld.f90 +++ b/mlprec/impl/mld_s_extprol_bld.f90 @@ -154,10 +154,9 @@ subroutine mld_s_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) ! 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 + mxplevs = p%max_levs + mnaggratio = p%min_cr_ratio + casize = p%min_coarse_size iszv = size(p%precv) nprolv = size(prolv) nrestrv = size(restrv) @@ -167,19 +166,19 @@ subroutine mld_s_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) call psb_bcast(ictxt,mnaggratio) call psb_bcast(ictxt,nprolv) call psb_bcast(ictxt,nrestrv) - if (casize /= p%coarse_aggr_size) then + if (casize /= p%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= p%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= p%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(p%precv)) then @@ -220,8 +219,8 @@ subroutine mld_s_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) endif ! - nplevs = nrestrv + 1 - p%max_prec_levs = nplevs + nplevs = nrestrv + 1 + p%max_levs = nplevs ! ! Fixed number of levels. @@ -366,9 +365,9 @@ contains allocate(nlaggr(np),ilaggr(1)) nlaggr = 0 ilaggr = 0 - p%parms%aggr_alg = mld_ext_aggr_ - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) + p%parms%par_aggr_alg = mld_ext_aggr_ + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) diff --git a/mlprec/impl/mld_s_hierarchy_bld.f90 b/mlprec/impl/mld_s_hierarchy_bld.f90 index bf3964a8..f1527cd5 100644 --- a/mlprec/impl/mld_s_hierarchy_bld.f90 +++ b/mlprec/impl/mld_s_hierarchy_bld.f90 @@ -78,19 +78,19 @@ subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np - integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs, iaggsize - real(psb_spk_) :: mnaggratio, sizeratio, athresh, ascale, aomega - class(mld_s_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, base_sm2, med_sm2, coarse_sm2 + integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize,& + & nplevs, mxplevs, iaggsize + real(psb_spk_) :: mnaggratio, sizeratio, athresh, aomega + class(mld_s_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, & + & base_sm2, med_sm2, coarse_sm2 type(mld_sml_parms) :: baseparms, medparms, coarseparms integer(psb_ipk_), allocatable :: ilaggr(:), nlaggr(:) type(psb_sspmat_type) :: op_prol type(mld_s_onelev_type), allocatable :: tprecv(:) integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -111,21 +111,6 @@ subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_sprecinit @@ -138,28 +123,27 @@ subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = prec%coarse_aggr_size - mxplevs = prec%max_prec_levs - mnaggratio = prec%min_aggr_ratio - casize = prec%coarse_aggr_size + mxplevs = prec%max_levs + mnaggratio = prec%min_cr_ratio + casize = prec%min_coarse_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 /= prec%coarse_aggr_size) then + if (casize /= prec%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= prec%max_prec_levs) then + if (mxplevs /= prec%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= prec%min_aggr_ratio) then + if (mnaggratio /= prec%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(prec%precv)) then @@ -198,18 +182,20 @@ subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) ! 3. If the size of the array is different from target number of levels, ! reallocate; ! 4. Build the matrix hierarchy, stopping early if either the target - ! coarse size is hit, or the gain falls below the min_aggr_ratio + ! coarse size is hit, or the gain falls below the min_cr_ratio ! threshold. ! - if (casize <=0) then + if (casize < 0) then ! ! Default to the cubic root of the size at base level. ! casize = desc_a%get_global_rows() casize = int((sone*casize)**(sone/(sone*3)),psb_ipk_) casize = max(casize,ione) - casize = casize*40_psb_ipk_ + casize = casize*40_psb_ipk_ + call psb_bcast(ictxt,casize) + prec%min_coarse_size = casize end if nplevs = max(itwo,mxplevs) @@ -357,11 +343,9 @@ subroutine mld_s_hierarchy_bld(a,desc_a,prec,info) ! of distr/repl matrix at coarse level. Should be rethought. ! 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(prec%precv(newsz),coarse_sm,coarse_sm2,info) diff --git a/mlprec/impl/mld_s_lev_aggrmap_bld.f90 b/mlprec/impl/mld_s_lev_aggrmap_bld.f90 index 94ba585d..86808283 100644 --- a/mlprec/impl/mld_s_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_s_lev_aggrmap_bld.f90 @@ -108,15 +108,15 @@ subroutine mld_s_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) - call mld_check_def(p%parms%aggr_alg,'Aggregation',& - & mld_dec_aggr_,is_legal_ml_aggr_alg) + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) + call mld_check_def(p%parms%par_aggr_alg,'Aggregation',& + & mld_dec_aggr_,is_legal_ml_par_aggr_alg) call mld_check_def(p%parms%aggr_ord,'Ordering',& & mld_aggr_ord_nat_,is_legal_ml_aggr_ord) call mld_check_def(p%parms%aggr_thresh,'Aggr_Thresh',szero,is_legal_s_aggr_thrs) - select case(p%parms%aggr_alg) + select case(p%parms%par_aggr_alg) case (mld_dec_aggr_, mld_sym_dec_aggr_) ! @@ -125,7 +125,7 @@ subroutine mld_s_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! aggregation algorithm. This also defines a tentative prolongator from ! the coarse to the fine level. ! - call mld_aggrmap_bld(p%parms%aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& + call mld_aggrmap_bld(p%parms%par_aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& & a,desc_a,ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -137,14 +137,14 @@ subroutine mld_s_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) write(0,*) 'Matching is not implemented yet ' info = -1111 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 case default info = -1 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 end select diff --git a/mlprec/impl/mld_s_lev_aggrmat_asb.f90 b/mlprec/impl/mld_s_lev_aggrmat_asb.f90 index a1dc8ad1..43021d3c 100644 --- a/mlprec/impl/mld_s_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_s_lev_aggrmat_asb.f90 @@ -121,14 +121,12 @@ subroutine mld_s_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%aggr_kind,'Smoother',& - & mld_smooth_prol_,is_legal_ml_aggr_kind) + call mld_check_def(p%parms%aggr_prol,'Smoother',& + & mld_smooth_prol_,is_legal_ml_aggr_prol) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) call mld_check_def(p%parms%aggr_filter,'Use filtered matrix',& & mld_no_filter_mat_,is_legal_aggr_filter) - call mld_check_def(p%parms%smoother_pos,'smooth_pos',& - & mld_pre_smooth_,is_legal_ml_smooth_pos) call mld_check_def(p%parms%aggr_omega_alg,'Omega Alg.',& & mld_eig_est_,is_legal_ml_aggr_omega_alg) call mld_check_def(p%parms%aggr_eig,'Eigenvalue estimate',& @@ -139,7 +137,7 @@ subroutine mld_s_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! ! Build the coarse-level matrix from the fine-level one, starting from ! the mapping defined by mld_aggrmap_bld and applying the aggregation - ! algorithm specified by p%iprcparm(mld_aggr_kind_) + ! algorithm specified by p%iprcparm(mld_aggr_prol_) ! call mld_saggrmat_asb(a,desc_a,ilaggr,nlaggr,p%parms,ac,op_prol,op_restr,info) diff --git a/mlprec/impl/mld_s_smoothers_bld.f90 b/mlprec/impl/mld_s_smoothers_bld.f90 index b6f4e5b9..c88c0222 100644 --- a/mlprec/impl/mld_s_smoothers_bld.f90 +++ b/mlprec/impl/mld_s_smoothers_bld.f90 @@ -1,3 +1,5 @@ + + ! ! ! MLD2P4 version 2.1 @@ -95,15 +97,13 @@ subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs real(psb_spk_) :: mnaggratio - integer(psb_ipk_) :: ipv(mld_ifpsz_), val + integer(psb_ipk_) :: ipv(mld_ifpsz_), val, coarse_solve_id integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -124,22 +124,6 @@ subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' - if (.not.allocated(prec%precv)) then !! Error: should have called mld_sprecinit info=3111 @@ -165,7 +149,7 @@ subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 endif - + ! ! Now do the real build. ! @@ -184,7 +168,97 @@ subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) endif end do - + ! + ! Issue a warning for inconsistent changes to COARSE_SOLVE + ! + if (me == psb_root_) then + coarse_solve_id = prec%precv(iszv)%parms%coarse_solve + select case (coarse_solve_id) + case(mld_umf_,mld_slu_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id),& + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_ilu_n_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_mumps_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_mumps_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + + case(mld_sludist_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id), & + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case(mld_bjac_) + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case default + ! We should never get here. + info=psb_err_from_subroutine_ + ch_err='unkn coarse_solve' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + + end select + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Exiting with',iszv,' levels' diff --git a/mlprec/impl/mld_saggrmat_asb.f90 b/mlprec/impl/mld_saggrmat_asb.f90 index 6806a86b..da5b8878 100644 --- a/mlprec/impl/mld_saggrmat_asb.f90 +++ b/mlprec/impl/mld_saggrmat_asb.f90 @@ -52,7 +52,7 @@ ! A mapping from the nodes of the adjacency graph of A to the nodes of the ! adjacency graph of A_C has been computed by the mld_aggrmap_bld subroutine. ! The prolongator P_C is built here from this mapping, according to the -! value of p%iprcparm(mld_aggr_kind_), specified by the user through +! value of p%iprcparm(mld_aggr_prol_), specified by the user through ! mld_sprecinit and mld_zprecset. ! On output from this routine the entries of AC, op_prol, op_restr ! are still in "global numbering" mode; this is fixed in the calling routine @@ -153,7 +153,7 @@ subroutine mld_saggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,inf call psb_info(ictxt, me, np) - select case (parms%aggr_kind) + select case (parms%aggr_prol) case (mld_no_smooth_) call mld_saggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,& diff --git a/mlprec/impl/mld_saggrmat_biz_asb.f90 b/mlprec/impl/mld_saggrmat_biz_asb.f90 index d25bd5fb..edba3e3f 100644 --- a/mlprec/impl/mld_saggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_saggrmat_biz_asb.f90 @@ -342,7 +342,7 @@ subroutine mld_saggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr call psb_numbmm(a,tmp_prol,am3) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done NUMBMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done NUMBMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%transp(op_restr) if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/mld_saggrmat_smth_asb.f90 b/mlprec/impl/mld_saggrmat_smth_asb.f90 index e5d83c7e..45003a26 100644 --- a/mlprec/impl/mld_saggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_saggrmat_smth_asb.f90 @@ -352,7 +352,7 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done SPSPMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done SPSPMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%cp_to(tmpcoo) call tmpcoo%transp() diff --git a/mlprec/impl/mld_scprecset.F90 b/mlprec/impl/mld_scprecset.F90 index 604dbb5c..7df5b08f 100644 --- a/mlprec/impl/mld_scprecset.F90 +++ b/mlprec/impl/mld_scprecset.F90 @@ -135,11 +135,11 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) - case ('COARSE_AGGR_SIZE') - p%coarse_aggr_size = max(val,-1) + case ('MIN_COARSE_SIZE') + p%min_coarse_size = max(val,-1) return - case('MAX_PREC_LEVS') - p%max_prec_levs = max(val,1) + case('MAX_LEVS') + p%max_levs = max(val,1) return case ('OUTER_SWEEPS') p%outer_sweeps = max(val,1) @@ -162,11 +162,9 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) case('SMOOTHER_TYPE','SUB_SOLVE','SMOOTHER_SWEEPS',& - & 'ML_TYPE','AGGR_ALG','AGGR_ORD',& - & 'AGGR_KIND','SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','SMOOTHER_SWEEPS_PRE',& - & 'SMOOTHER_SWEEPS_POST',& - & 'SUB_RESTR','SUB_PROL', & + & 'ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD',& + & 'AGGR_TYPE','AGGR_PROL','AGGR_OMEGA_ALG',& + & 'AGGR_EIG','SUB_RESTR','SUB_PROL', & & 'SUB_REN','SUB_OVR','SUB_FILLIN',& & 'COARSE_MAT') call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -200,11 +198,11 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -253,10 +251,8 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case('ML_TYPE','AGGR_ALG','AGGR_ORD','AGGR_KIND',& - & 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',& - & 'SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','AGGR_FILTER') + case('ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD','AGGR_PROL','AGGR_TYPE',& + & 'AGGR_OMEGA_ALG','AGGR_EIG','AGGR_FILTER') do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) if (info /= 0) return @@ -281,11 +277,11 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -478,8 +474,8 @@ subroutine mld_scprecsetr(p,what,val,info,ilev,ilmax,pos) end if select case(psb_toupper(what)) - case ('MIN_AGGR_RATIO') - p%min_aggr_ratio = max(sone,val) + case ('MIN_CR_RATIO') + p%min_cr_ratio = max(sone,val) return end select @@ -517,18 +513,6 @@ subroutine mld_scprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) - case('AGGR_SCALE') - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_SCALE',val,info,pos=pos) - end do - - case('AGGR_THRESH') - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_THRESH',thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_smlprec_aply.f90 b/mlprec/impl/mld_smlprec_aply.f90 index 351fef8b..e05f7ce1 100644 --- a/mlprec/impl/mld_smlprec_aply.f90 +++ b/mlprec/impl/mld_smlprec_aply.f90 @@ -518,7 +518,7 @@ contains write(debug_unit,*) me,' Start inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -532,39 +532,7 @@ contains call mld_s_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_,mld_vcycle_ml_, mld_wcycle_ml_) call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) @@ -574,8 +542,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -643,7 +611,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(sone,& & mlprec_wrk(level)%vx2l,szero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -821,7 +789,7 @@ contains goto 9999 end if - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then call psb_geaxpby(sone,mlprec_wrk(level)%vx2l,& & szero,mlprec_wrk(level)%vty,& @@ -894,7 +862,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(sone,& & mlprec_wrk(level)%vx2l,szero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -976,7 +944,7 @@ contains ! ! Apply smoother ! - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(sone,& & mlprec_wrk(level)%vx2l,szero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -1036,13 +1004,13 @@ contains !Set the preconditioner if (level <= nlev - 2 ) then - if (p%precv(level)%parms%ml_type == mld_kcyclesym_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_kcyclesym_ml_) then call mld_sinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'FCG') - elseif (p%precv(level)%parms%ml_type == mld_kcycle_ml_) then + elseif (p%precv(level)%parms%ml_cycle == mld_kcycle_ml_) then call mld_sinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'GCR') else call psb_errpush(psb_err_internal_error_,name,& - & a_err='Bad value for ml_type') + & a_err='Bad value for ml_cycle') goto 9999 endif else @@ -1466,7 +1434,7 @@ contains write(debug_unit,*) me,' inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -1480,39 +1448,7 @@ contains call mld_s_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_, mld_vcycle_ml_, mld_wcycle_ml_) call mld_s_inner_mult(p, mlprec_wrk, level, trans, work) @@ -1522,8 +1458,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -1588,7 +1524,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(sone,& & mlprec_wrk(level)%x2l,szero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& @@ -1766,7 +1702,7 @@ contains call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then ! On second call will use output y2l as initial guess if (info == psb_success_) call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) endif @@ -1832,7 +1768,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(sone,& & mlprec_wrk(level)%x2l,szero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& diff --git a/mlprec/impl/mld_smlprec_bld.f90 b/mlprec/impl/mld_smlprec_bld.f90 index 20674637..861b9194 100644 --- a/mlprec/impl/mld_smlprec_bld.f90 +++ b/mlprec/impl/mld_smlprec_bld.f90 @@ -94,7 +94,6 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np @@ -102,7 +101,6 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold) real(psb_spk_) :: mnaggratio integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/mlprec/impl/mld_sprecaply.f90 b/mlprec/impl/mld_sprecaply.f90 index 946001df..7a7960f3 100644 --- a/mlprec/impl/mld_sprecaply.f90 +++ b/mlprec/impl/mld_sprecaply.f90 @@ -144,7 +144,8 @@ subroutine mld_sprecaply(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(sone,x,szero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post), & + & work_,info) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& @@ -336,7 +337,8 @@ subroutine mld_sprecaply2_vect(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(sone,x,szero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else @@ -438,7 +440,8 @@ subroutine mld_sprecaply1_vect(prec,x,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(sone,x,szero,ww,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else diff --git a/mlprec/impl/mld_sprecbld.f90 b/mlprec/impl/mld_sprecbld.f90 index c2e865a6..fc36fc62 100644 --- a/mlprec/impl/mld_sprecbld.f90 +++ b/mlprec/impl/mld_sprecbld.f90 @@ -74,7 +74,6 @@ subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables type(mld_sprec_type) :: t_prec @@ -82,7 +81,6 @@ subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) integer(psb_ipk_) :: err,i,k,err_act, iszv, newsz integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ type(mld_dml_parms) :: prm integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -105,21 +103,6 @@ subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. -!!$ if (present(upd)) then -!!$ if (debug_level >= psb_debug_outer_) & -!!$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd -!!$ -!!$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then -!!$ upd_=psb_toupper(upd) -!!$ else -!!$ upd_='F' -!!$ endif -!!$ else -!!$ upd_='F' -!!$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_sprecinit @@ -174,7 +157,7 @@ subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold) goto 9999 endif - call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + call prec%precv(1)%sm%build(a,desc_a,info,& & amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_sprecinit.F90 b/mlprec/impl/mld_sprecinit.F90 index 427f3a0c..21ec30ca 100644 --- a/mlprec/impl/mld_sprecinit.F90 +++ b/mlprec/impl/mld_sprecinit.F90 @@ -108,7 +108,7 @@ subroutine mld_sprecinit(prec,ptype,info) ! Local variables integer(psb_ipk_) :: nlev_, ilev_ - real(psb_spk_) :: thr, scale + real(psb_spk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -118,7 +118,7 @@ subroutine mld_sprecinit(prec,ptype,info) ! Do we want to do something? endif endif - prec%coarse_aggr_size = -1 + prec%min_coarse_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') @@ -160,9 +160,26 @@ subroutine mld_sprecinit(prec,ptype,info) case ('ML') - nlev_ = prec%max_prec_levs + nlev_ = prec%max_levs ilev_ = 1 - allocate(prec%precv(nlev_),stat=info) + allocate(prec%precv(nlev_),stat=info) + + +#if 1 + do ilev_ = 1, nlev_ + call prec%precv(ilev_)%default() + end do + call prec%set('ML_CYCLE','VCYCLE',info) + call prec%set('SMOOTHER_TYPE','FBGS',info) +#if defined(HAVE_MUMPS_) + call prec%set('COARSE_SOLVE','MUMPS',info) +#elif defined(HAVE_SLU_) + call prec%set('COARSE_SOLVE','SLU',info) +#else + call prec%set('COARSE_SOLVE','ILU',info) +#endif + !call prec%precv(nlev_)%default() +#else allocate(mld_s_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return allocate(mld_s_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) @@ -193,13 +210,11 @@ subroutine mld_sprecinit(prec,ptype,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 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 - +#endif case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_sprecset.F90 b/mlprec/impl/mld_sprecset.F90 index 34f9347f..93040252 100644 --- a/mlprec/impl/mld_sprecset.F90 +++ b/mlprec/impl/mld_sprecset.F90 @@ -134,11 +134,11 @@ subroutine mld_sprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) - case (mld_coarse_aggr_size_) - p%coarse_aggr_size = max(val,-1) + case (mld_min_coarse_size_) + p%min_coarse_size = max(val,-1) return - case(mld_max_prec_levs_) - p%max_prec_levs = max(val,1) + case(mld_max_levs_) + p%max_levs = max(val,1) return case(mld_outer_sweeps_) p%outer_sweeps = max(val,1) @@ -158,10 +158,8 @@ subroutine mld_sprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) case(mld_smoother_type_,mld_sub_solve_,mld_smoother_sweeps_,& - & mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,& - & mld_aggr_kind_,mld_smoother_pos_,& - & mld_aggr_omega_alg_,mld_aggr_eig_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& + & mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,& + & mld_aggr_prol_, mld_aggr_omega_alg_,mld_aggr_eig_,& & mld_sub_restr_,mld_sub_prol_, & & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_coarse_mat_) @@ -196,11 +194,11 @@ subroutine mld_sprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) @@ -248,9 +246,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case(mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,mld_aggr_kind_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& - & mld_smoother_pos_,mld_aggr_omega_alg_,& + case(mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,mld_aggr_prol_,& & mld_aggr_eig_,mld_aggr_filter_) do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -274,14 +270,10 @@ subroutine mld_sprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_) - call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) - call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) - call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) case(mld_mumps_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) @@ -574,8 +566,8 @@ subroutine mld_sprecsetr(p,what,val,info,ilev,ilmax,pos) info = psb_success_ select case(what) - case (mld_min_aggr_ratio_) - p%min_aggr_ratio = max(sone,val) + case (mld_min_cr_ratio_) + p%min_cr_ratio = max(sone,val) return end select @@ -619,18 +611,6 @@ subroutine mld_sprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set(mld_sub_iluthrs_,val,info,pos=pos) - case(mld_aggr_scale_) - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_scale_,val,info,pos=pos) - end do - - case(mld_aggr_thresh_) - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_sslud_interface.c b/mlprec/impl/mld_sslud_interface.c deleted file mode 100644 index a78a1ae4..00000000 --- a/mlprec/impl/mld_sslud_interface.c +++ /dev/null @@ -1,345 +0,0 @@ -/* - * - * MLD2P4 version 2.0 - * MultiLevel Domain Decomposition Parallel Preconditioners Package - * based on PSBLAS (Parallel Sparse BLAS version 3.3) - * - * (C) Copyright 2008, 2010, 2012, 2015, 2017 - * - * Salvatore Filippone Cranfield University - * Ambra Abdullahi Hassan University of Rome Tor Vergata - * Alfredo Buttari CNRS-IRIT, Toulouse - * Pasqua D'Ambra ICAR-CNR, Naples - * Daniela di Serafino University of Campania "L. Vanvitelli", Caserta - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions, and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the MLD2P4 group or the names of its contributors may - * not be used to endorse or promote products derived from this - * software without specific written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * - * File: mld_slud_interface.c - * - * Functions: mld_ssludist_fact, mld_ssludist_solve, mld_ssludist_free. - * - * This file is an interface to the SuperLU_dist routines for sparse factorization and - * solve. It was obtained by modifying the c_fortran_dgssv.c file from the SuperLU_dist - * source distribution; original copyright terms are reproduced below. - * - */ - -/* ===================== - -Copyright (c) 2003, The Regents of the University of California, through -Lawrence Berkeley National Laboratory (subject to receipt of any required -approvals from U.S. Dept. of Energy) - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -(1) Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -(2) Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -(3) Neither the name of Lawrence Berkeley National Laboratory, U.S. Dept. of -Energy nor the names of its contributors may be used to endorse or promote -products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -/* - * -- Distributed SuperLU routine (version 2.0) -- - * Lawrence Berkeley National Lab, Univ. of California Berkeley. - * March 15, 2003 - * - */ - -/* as of v 3.3 SLUDist does not have a single precision interface */ -#ifdef Have_SLUDist_ -#undef Have_SLUDist_ -#endif - -#ifdef Have_SLUDist_ -#include -#include "superlu_sdefs.h" - -#define HANDLE_SIZE 8 - -typedef struct { - SuperMatrix *A; - LUstruct_t *LUstruct; - gridinfo_t *grid; - ScalePermstruct_t *ScalePermstruct; -} factors_t; - - -#else - -#include - -#endif - - -int mld_ssludist_fact(int n, int nl, int nnzl, int ffstr, - float *values, int *rowptr, int *colind, - void **f_factors, int nprow, int npcol) -{ -/* - * This routine can be called from Fortran. - * performs LU decomposition. - * - * f_factors (input/output) void** - * On output contains the pointer pointing to - * the structure of the factored matrices. - * - */ - -#ifdef Have_SLUDist_ - SuperMatrix *A; - NRformat_loc *Astore; - - ScalePermstruct_t *ScalePermstruct; - LUstruct_t *LUstruct; - SOLVEstruct_t SOLVEstruct; - gridinfo_t *grid; - int i, panel_size, permc_spec, relax, info; - trans_t trans; - float drop_tol = 0.0, b[1], berr[1]; - mem_usage_t mem_usage; - superlu_options_t options; - SuperLUStat_t stat; - factors_t *LUfactors; - int fst_row; - int *icol,*irpt; - float *ival; - - trans = NOTRANS; - grid = (gridinfo_t *) SUPERLU_MALLOC(sizeof(gridinfo_t)); - superlu_gridinit(MPI_COMM_WORLD, nprow, npcol, grid); - /* Initialize the statistics variables. */ - PStatInit(&stat); - fst_row = (ffstr); - - A = (SuperMatrix *) malloc(sizeof(SuperMatrix)); - dCreate_CompRowLoc_Matrix_dist(A, n, n, nnzl, nl, fst_row, - values, colind, rowptr, - SLU_NR_loc, SLU_D, SLU_GE); - - /* Initialize ScalePermstruct and LUstruct. */ - ScalePermstruct = (ScalePermstruct_t *) SUPERLU_MALLOC(sizeof(ScalePermstruct_t)); - LUstruct = (LUstruct_t *) SUPERLU_MALLOC(sizeof(LUstruct_t)); - ScalePermstructInit(n,n, ScalePermstruct); -#if defined(SLUD_VERSION_4) - LUstructInit(n, LUstruct); -#elif defined(SLUD_VERSION_3) - LUstructInit(n,n, LUstruct); -#else - choke_on_me; -#endif - - - /* Set the default input options. */ - set_default_options_dist(&options); - options.IterRefine=NO; - options.PrintStat=NO; - - pdgssvx(&options, A, ScalePermstruct, b, nl, 0, - grid, LUstruct, &SOLVEstruct, berr, &stat, &info); - - if ( info == 0 ) { - ; - } else { - printf("pdgssvx() error returns INFO= %d\n", info); - if ( info <= n ) { /* factorization completes */ - ; - } - } - if (options.SolveInitialized) { - dSolveFinalize(&options,&SOLVEstruct); - } - - - /* Save the LU factors in the factors handle */ - LUfactors = (factors_t *) SUPERLU_MALLOC(sizeof(factors_t)); - LUfactors->LUstruct = LUstruct; - LUfactors->grid = grid; - LUfactors->A = A; - LUfactors->ScalePermstruct = ScalePermstruct; -/* fprintf(stderr,"slud factor: LUFactors %p \n",LUfactors); */ -/* fprintf(stderr,"slud factor: A %p %p\n",A,LUfactors->A); */ -/* fprintf(stderr,"slud factor: grid %p %p\n",grid,LUfactors->grid); */ -/* fprintf(stderr,"slud factor: LUstruct %p %p\n",LUstruct,LUfactors->LUstruct); */ - *f_factors = (void *) LUfactors; - PStatFree(&stat); - return(info); -#else - fprintf(stderr," SLUDist does not have single precision, sorry.\n"); - return(-1); -#endif -} - - -int mld_ssludist_solve(int itrans, int n, int nrhs, - float *b, int ldb, void *f_factors) - -{ -/* - * This routine can be called from Fortran. - * performs triangular solve - * - */ -#ifdef Have_SLUDist_ - SuperMatrix *A; - ScalePermstruct_t *ScalePermstruct; - LUstruct_t *LUstruct; - SOLVEstruct_t SOLVEstruct; - gridinfo_t *grid; - int i, panel_size, permc_spec, relax, info; - trans_t trans; - float drop_tol = 0.0; - float *berr; - mem_usage_t mem_usage; - superlu_options_t options; - SuperLUStat_t stat; - factors_t *LUfactors; - - LUfactors = (factors_t *) f_factors ; - A = LUfactors->A ; - LUstruct = LUfactors->LUstruct ; - grid = LUfactors->grid ; - - ScalePermstruct = LUfactors->ScalePermstruct; - fprintf(stderr,"slud solve: ldb %d n %d \n",ldb,n); -/* fprintf(stderr,"slud solve: LUFactors %p \n",LUfactors); */ -/* fprintf(stderr,"slud solve: A %p %p\n",A,LUfactors->A); */ -/* fprintf(stderr,"slud solve: grid %p %p\n",grid,LUfactors->grid); */ -/* fprintf(stderr,"slud solve: LUstruct %p %p\n",LUstruct,LUfactors->LUstruct); */ - - - if (itrans == 0) { - trans = NOTRANS; - } else if (itrans ==1) { - trans = TRANS; - } else if (itrans ==2) { - trans = CONJ; - } else { - trans = NOTRANS; - } - -/* fprintf(stderr,"Entry to sludist_solve\n"); */ - berr = (float *) malloc((nrhs) *sizeof(float)); - - /* Initialize the statistics variables. */ - PStatInit(&stat); - - /* Set the default input options. */ - set_default_options_dist(&options); - options.IterRefine = NO; - options.Fact = FACTORED; - options.PrintStat = NO; - - pdgssvx(&options, A, ScalePermstruct, b, ldb, nrhs, - grid, LUstruct, &SOLVEstruct, berr, &stat, &info); - -/* fprintf(stderr,"Float check: after solve %d %lf\n",*info,berr[0]); */ - if (options.SolveInitialized) { - dSolveFinalize(&options,&SOLVEstruct); - } - PStatFree(&stat); - free(berr); - return(info); -#else - fprintf(stderr," SLUDist does not have single precision, sorry.\n"); - return(-1); -#endif - -} - - -int mld_ssludist_free(void *f_factors) - - -{ -/* - * This routine can be called from Fortran. - * - * free all storage in the end - * - */ -#ifdef Have_SLUDist_ - SuperMatrix *A; - ScalePermstruct_t *ScalePermstruct; - LUstruct_t *LUstruct; - SOLVEstruct_t SOLVEstruct; - gridinfo_t *grid; - int i, panel_size, permc_spec, relax; - trans_t trans; - float drop_tol = 0.0; - float *berr; - mem_usage_t mem_usage; - superlu_options_t options; - SuperLUStat_t stat; - factors_t *LUfactors; - - - if (f_factors == NULL) - return(0); - LUfactors = (factors_t *) f_factors ; - A = LUfactors->A ; - LUstruct = LUfactors->LUstruct ; - grid = LUfactors->grid ; - ScalePermstruct = LUfactors->ScalePermstruct; - - // Memory leak: with SuperLU_Dist 3.3 - // we either have a leak or a segfault here. - // To be investigated further. - //Destroy_CompRowLoc_Matrix_dist(A); - ScalePermstructFree(ScalePermstruct); - LUstructFree(LUstruct); - superlu_gridexit(grid); - - free(grid); - free(LUstruct); - free(LUfactors); - return(0); - -#else - fprintf(stderr," SLUDist does not have single precision, sorry.\n"); - return(-1); -#endif -} - diff --git a/mlprec/impl/mld_z_extprol_bld.f90 b/mlprec/impl/mld_z_extprol_bld.f90 index 9252deda..2fb386f9 100644 --- a/mlprec/impl/mld_z_extprol_bld.f90 +++ b/mlprec/impl/mld_z_extprol_bld.f90 @@ -154,10 +154,9 @@ subroutine mld_z_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) ! 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 + mxplevs = p%max_levs + mnaggratio = p%min_cr_ratio + casize = p%min_coarse_size iszv = size(p%precv) nprolv = size(prolv) nrestrv = size(restrv) @@ -167,19 +166,19 @@ subroutine mld_z_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) call psb_bcast(ictxt,mnaggratio) call psb_bcast(ictxt,nprolv) call psb_bcast(ictxt,nrestrv) - if (casize /= p%coarse_aggr_size) then + if (casize /= p%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= p%max_prec_levs) then + if (mxplevs /= p%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= p%min_aggr_ratio) then + if (mnaggratio /= p%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(p%precv)) then @@ -220,8 +219,8 @@ subroutine mld_z_extprol_bld(a,desc_a,p,prolv,restrv,info,amold,vmold,imold) endif ! - nplevs = nrestrv + 1 - p%max_prec_levs = nplevs + nplevs = nrestrv + 1 + p%max_levs = nplevs ! ! Fixed number of levels. @@ -366,9 +365,9 @@ contains allocate(nlaggr(np),ilaggr(1)) nlaggr = 0 ilaggr = 0 - p%parms%aggr_alg = mld_ext_aggr_ - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) + p%parms%par_aggr_alg = mld_ext_aggr_ + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) diff --git a/mlprec/impl/mld_z_hierarchy_bld.f90 b/mlprec/impl/mld_z_hierarchy_bld.f90 index 19b2537d..0c1e5716 100644 --- a/mlprec/impl/mld_z_hierarchy_bld.f90 +++ b/mlprec/impl/mld_z_hierarchy_bld.f90 @@ -78,19 +78,19 @@ subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np - integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs, iaggsize - real(psb_dpk_) :: mnaggratio, sizeratio, athresh, ascale, aomega - class(mld_z_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, base_sm2, med_sm2, coarse_sm2 + integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize,& + & nplevs, mxplevs, iaggsize + real(psb_dpk_) :: mnaggratio, sizeratio, athresh, aomega + class(mld_z_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm, & + & base_sm2, med_sm2, coarse_sm2 type(mld_dml_parms) :: baseparms, medparms, coarseparms integer(psb_ipk_), allocatable :: ilaggr(:), nlaggr(:) type(psb_zspmat_type) :: op_prol type(mld_z_onelev_type), allocatable :: tprecv(:) integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -111,21 +111,6 @@ subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_zprecinit @@ -138,28 +123,27 @@ subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) ! Check to ensure all procs have the same ! newsz = -1 - casize = prec%coarse_aggr_size - mxplevs = prec%max_prec_levs - mnaggratio = prec%min_aggr_ratio - casize = prec%coarse_aggr_size + mxplevs = prec%max_levs + mnaggratio = prec%min_cr_ratio + casize = prec%min_coarse_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 /= prec%coarse_aggr_size) then + if (casize /= prec%min_coarse_size) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent coarse_aggr_size') + call psb_errpush(info,name,a_err='Inconsistent min_coarse_size') goto 9999 end if - if (mxplevs /= prec%max_prec_levs) then + if (mxplevs /= prec%max_levs) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent max_prec_levs') + call psb_errpush(info,name,a_err='Inconsistent max_levs') goto 9999 end if - if (mnaggratio /= prec%min_aggr_ratio) then + if (mnaggratio /= prec%min_cr_ratio) then info=psb_err_internal_error_ - call psb_errpush(info,name,a_err='Inconsistent min_aggr_ratio') + call psb_errpush(info,name,a_err='Inconsistent min_cr_ratio') goto 9999 end if if (iszv /= size(prec%precv)) then @@ -198,18 +182,20 @@ subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) ! 3. If the size of the array is different from target number of levels, ! reallocate; ! 4. Build the matrix hierarchy, stopping early if either the target - ! coarse size is hit, or the gain falls below the min_aggr_ratio + ! coarse size is hit, or the gain falls below the min_cr_ratio ! threshold. ! - if (casize <=0) then + if (casize < 0) then ! ! Default to the cubic root of the size at base level. ! casize = desc_a%get_global_rows() casize = int((done*casize)**(done/(done*3)),psb_ipk_) casize = max(casize,ione) - casize = casize*40_psb_ipk_ + casize = casize*40_psb_ipk_ + call psb_bcast(ictxt,casize) + prec%min_coarse_size = casize end if nplevs = max(itwo,mxplevs) @@ -357,11 +343,9 @@ subroutine mld_z_hierarchy_bld(a,desc_a,prec,info) ! of distr/repl matrix at coarse level. Should be rethought. ! 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(prec%precv(newsz),coarse_sm,coarse_sm2,info) diff --git a/mlprec/impl/mld_z_lev_aggrmap_bld.f90 b/mlprec/impl/mld_z_lev_aggrmap_bld.f90 index 10e7acc7..553a4b02 100644 --- a/mlprec/impl/mld_z_lev_aggrmap_bld.f90 +++ b/mlprec/impl/mld_z_lev_aggrmap_bld.f90 @@ -108,15 +108,15 @@ subroutine mld_z_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%ml_type,'Multilevel type',& - & mld_mult_ml_,is_legal_ml_type) - call mld_check_def(p%parms%aggr_alg,'Aggregation',& - & mld_dec_aggr_,is_legal_ml_aggr_alg) + call mld_check_def(p%parms%ml_cycle,'Multilevel cycle',& + & mld_mult_ml_,is_legal_ml_cycle) + call mld_check_def(p%parms%par_aggr_alg,'Aggregation',& + & mld_dec_aggr_,is_legal_ml_par_aggr_alg) call mld_check_def(p%parms%aggr_ord,'Ordering',& & mld_aggr_ord_nat_,is_legal_ml_aggr_ord) call mld_check_def(p%parms%aggr_thresh,'Aggr_Thresh',dzero,is_legal_d_aggr_thrs) - select case(p%parms%aggr_alg) + select case(p%parms%par_aggr_alg) case (mld_dec_aggr_, mld_sym_dec_aggr_) ! @@ -125,7 +125,7 @@ subroutine mld_z_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! aggregation algorithm. This also defines a tentative prolongator from ! the coarse to the fine level. ! - call mld_aggrmap_bld(p%parms%aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& + call mld_aggrmap_bld(p%parms%par_aggr_alg,p%parms%aggr_ord,p%parms%aggr_thresh,& & a,desc_a,ilaggr,nlaggr,op_prol,info) if (info /= psb_success_) then @@ -137,14 +137,14 @@ subroutine mld_z_lev_aggrmap_bld(p,a,desc_a,ilaggr,nlaggr,op_prol,info) write(0,*) 'Matching is not implemented yet ' info = -1111 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 case default info = -1 call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ione,p%parms%aggr_alg,izero,izero,izero/)) + & i_err=(/ione,p%parms%par_aggr_alg,izero,izero,izero/)) goto 9999 end select diff --git a/mlprec/impl/mld_z_lev_aggrmat_asb.f90 b/mlprec/impl/mld_z_lev_aggrmat_asb.f90 index 45c806e4..d21fd1c8 100644 --- a/mlprec/impl/mld_z_lev_aggrmat_asb.f90 +++ b/mlprec/impl/mld_z_lev_aggrmat_asb.f90 @@ -121,14 +121,12 @@ subroutine mld_z_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ictxt = desc_a%get_context() call psb_info(ictxt,me,np) - call mld_check_def(p%parms%aggr_kind,'Smoother',& - & mld_smooth_prol_,is_legal_ml_aggr_kind) + call mld_check_def(p%parms%aggr_prol,'Smoother',& + & mld_smooth_prol_,is_legal_ml_aggr_prol) call mld_check_def(p%parms%coarse_mat,'Coarse matrix',& & mld_distr_mat_,is_legal_ml_coarse_mat) call mld_check_def(p%parms%aggr_filter,'Use filtered matrix',& & mld_no_filter_mat_,is_legal_aggr_filter) - call mld_check_def(p%parms%smoother_pos,'smooth_pos',& - & mld_pre_smooth_,is_legal_ml_smooth_pos) call mld_check_def(p%parms%aggr_omega_alg,'Omega Alg.',& & mld_eig_est_,is_legal_ml_aggr_omega_alg) call mld_check_def(p%parms%aggr_eig,'Eigenvalue estimate',& @@ -139,7 +137,7 @@ subroutine mld_z_lev_aggrmat_asb(p,a,desc_a,ilaggr,nlaggr,op_prol,info) ! ! Build the coarse-level matrix from the fine-level one, starting from ! the mapping defined by mld_aggrmap_bld and applying the aggregation - ! algorithm specified by p%iprcparm(mld_aggr_kind_) + ! algorithm specified by p%iprcparm(mld_aggr_prol_) ! call mld_zaggrmat_asb(a,desc_a,ilaggr,nlaggr,p%parms,ac,op_prol,op_restr,info) diff --git a/mlprec/impl/mld_z_smoothers_bld.f90 b/mlprec/impl/mld_z_smoothers_bld.f90 index 2fbaa5a6..a1c8d36f 100644 --- a/mlprec/impl/mld_z_smoothers_bld.f90 +++ b/mlprec/impl/mld_z_smoothers_bld.f90 @@ -1,3 +1,5 @@ + + ! ! ! MLD2P4 version 2.1 @@ -95,15 +97,13 @@ subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize, nplevs, mxplevs real(psb_dpk_) :: mnaggratio - integer(psb_ipk_) :: ipv(mld_ifpsz_), val + integer(psb_ipk_) :: ipv(mld_ifpsz_), val, coarse_solve_id integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -124,22 +124,6 @@ subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. - ! !$ if (present(upd)) then - ! !$ if (debug_level >= psb_debug_outer_) & - ! !$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd - ! !$ - ! !$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then - ! !$ upd_=psb_toupper(upd) - ! !$ else - ! !$ upd_='F' - ! !$ endif - ! !$ else - ! !$ upd_='F' - ! !$ endif - upd_ = 'F' - if (.not.allocated(prec%precv)) then !! Error: should have called mld_zprecinit info=3111 @@ -165,7 +149,7 @@ subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 endif - + ! ! Now do the real build. ! @@ -184,7 +168,97 @@ subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) endif end do - + ! + ! Issue a warning for inconsistent changes to COARSE_SOLVE + ! + if (me == psb_root_) then + coarse_solve_id = prec%precv(iszv)%parms%coarse_solve + select case (coarse_solve_id) + case(mld_umf_,mld_slu_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id),& + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_ilu_n_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_repl_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to distributed' + end if + + case(mld_mumps_) + if (prec%precv(iszv)%sm%sv%get_id() /= mld_mumps_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) & + &'This may happen if coarse_subsolve has been reset' + end if + + case(mld_sludist_) + if (prec%precv(iszv)%sm%sv%get_id() /= coarse_solve_id) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id) + write(psb_err_unit,*) ' but I am building ',& + & mld_fact_names(prec%precv(iszv)%sm%sv%get_id()) + write(psb_err_unit,*) 'This may happen if: ' + write(psb_err_unit,*) ' 1. coarse_subsolve has been reset, or ' + write(psb_err_unit,*) ' 2. the solver ', mld_fact_names(coarse_solve_id), & + & ' was not configured at MLD2P4 build time, or' + write(psb_err_unit,*) ' 3. an unsupported solver setup was specified.' + end if + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case(mld_bjac_) + if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then + write(psb_err_unit,*) & + & 'MLD2P4: Warning: original coarse solver was requested as ',& + & mld_fact_names(coarse_solve_id),& + & ' but the coarse matrix has been changed to replicated' + end if + + case default + ! We should never get here. + info=psb_err_from_subroutine_ + ch_err='unkn coarse_solve' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + + end select + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Exiting with',iszv,' levels' diff --git a/mlprec/impl/mld_zaggrmat_asb.f90 b/mlprec/impl/mld_zaggrmat_asb.f90 index b1525418..501324a7 100644 --- a/mlprec/impl/mld_zaggrmat_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_asb.f90 @@ -52,7 +52,7 @@ ! A mapping from the nodes of the adjacency graph of A to the nodes of the ! adjacency graph of A_C has been computed by the mld_aggrmap_bld subroutine. ! The prolongator P_C is built here from this mapping, according to the -! value of p%iprcparm(mld_aggr_kind_), specified by the user through +! value of p%iprcparm(mld_aggr_prol_), specified by the user through ! mld_zprecinit and mld_zprecset. ! On output from this routine the entries of AC, op_prol, op_restr ! are still in "global numbering" mode; this is fixed in the calling routine @@ -153,7 +153,7 @@ subroutine mld_zaggrmat_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr,inf call psb_info(ictxt, me, np) - select case (parms%aggr_kind) + select case (parms%aggr_prol) case (mld_no_smooth_) call mld_zaggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,& diff --git a/mlprec/impl/mld_zaggrmat_biz_asb.f90 b/mlprec/impl/mld_zaggrmat_biz_asb.f90 index d3236d36..3937287d 100644 --- a/mlprec/impl/mld_zaggrmat_biz_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_biz_asb.f90 @@ -342,7 +342,7 @@ subroutine mld_zaggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr call psb_numbmm(a,tmp_prol,am3) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done NUMBMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done NUMBMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%transp(op_restr) if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/mld_zaggrmat_smth_asb.f90 b/mlprec/impl/mld_zaggrmat_smth_asb.f90 index 2dddf177..aaf461d2 100644 --- a/mlprec/impl/mld_zaggrmat_smth_asb.f90 +++ b/mlprec/impl/mld_zaggrmat_smth_asb.f90 @@ -352,7 +352,7 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& - & 'Done SPSPMM 2',parms%aggr_kind, mld_smooth_prol_ + & 'Done SPSPMM 2',parms%aggr_prol, mld_smooth_prol_ call tmp_prol%cp_to(tmpcoo) call tmpcoo%transp() diff --git a/mlprec/impl/mld_zcprecset.F90 b/mlprec/impl/mld_zcprecset.F90 index 6940040b..1e6298a3 100644 --- a/mlprec/impl/mld_zcprecset.F90 +++ b/mlprec/impl/mld_zcprecset.F90 @@ -141,11 +141,11 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) - case ('COARSE_AGGR_SIZE') - p%coarse_aggr_size = max(val,-1) + case ('MIN_COARSE_SIZE') + p%min_coarse_size = max(val,-1) return - case('MAX_PREC_LEVS') - p%max_prec_levs = max(val,1) + case('MAX_LEVS') + p%max_levs = max(val,1) return case ('OUTER_SWEEPS') p%outer_sweeps = max(val,1) @@ -168,11 +168,9 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos) select case(psb_toupper(what)) case('SMOOTHER_TYPE','SUB_SOLVE','SMOOTHER_SWEEPS',& - & 'ML_TYPE','AGGR_ALG','AGGR_ORD',& - & 'AGGR_KIND','SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','SMOOTHER_SWEEPS_PRE',& - & 'SMOOTHER_SWEEPS_POST',& - & 'SUB_RESTR','SUB_PROL', & + & 'ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD',& + & 'AGGR_TYPE','AGGR_PROL','AGGR_OMEGA_ALG',& + & 'AGGR_EIG','SUB_RESTR','SUB_PROL', & & 'SUB_REN','SUB_OVR','SUB_FILLIN',& & 'COARSE_MAT') call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -208,11 +206,19 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) + case(mld_umf_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) + case(mld_sludist_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -261,10 +267,8 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case('ML_TYPE','AGGR_ALG','AGGR_ORD','AGGR_KIND',& - & 'SMOOTHER_SWEEPS_PRE','SMOOTHER_SWEEPS_POST',& - & 'SMOOTHER_POS','AGGR_OMEGA_ALG',& - & 'AGGR_EIG','AGGR_FILTER') + case('ML_CYCLE','PAR_AGGR_ALG','AGGR_ORD','AGGR_PROL','AGGR_TYPE',& + & 'AGGR_OMEGA_ALG','AGGR_EIG','AGGR_FILTER') do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) if (info /= 0) return @@ -291,11 +295,19 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) + case(mld_mumps_) + call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) + call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) + case(mld_umf_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_sludist_) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',val,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) @@ -488,8 +500,8 @@ subroutine mld_zcprecsetr(p,what,val,info,ilev,ilmax,pos) end if select case(psb_toupper(what)) - case ('MIN_AGGR_RATIO') - p%min_aggr_ratio = max(done,val) + case ('MIN_CR_RATIO') + p%min_cr_ratio = max(done,val) return end select @@ -527,18 +539,6 @@ subroutine mld_zcprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) - case('AGGR_SCALE') - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_SCALE',val,info,pos=pos) - end do - - case('AGGR_THRESH') - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set('AGGR_THRESH',thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/mld_zmlprec_aply.f90 b/mlprec/impl/mld_zmlprec_aply.f90 index 56b2ad54..47171d55 100644 --- a/mlprec/impl/mld_zmlprec_aply.f90 +++ b/mlprec/impl/mld_zmlprec_aply.f90 @@ -518,7 +518,7 @@ contains write(debug_unit,*) me,' Start inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -532,39 +532,7 @@ contains call mld_z_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_,mld_vcycle_ml_, mld_wcycle_ml_) call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) @@ -574,8 +542,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -643,7 +611,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(zone,& & mlprec_wrk(level)%vx2l,zzero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -821,7 +789,7 @@ contains goto 9999 end if - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then call psb_geaxpby(zone,mlprec_wrk(level)%vx2l,& & zzero,mlprec_wrk(level)%vty,& @@ -894,7 +862,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(zone,& & mlprec_wrk(level)%vx2l,zzero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -976,7 +944,7 @@ contains ! ! Apply smoother ! - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(zone,& & mlprec_wrk(level)%vx2l,zzero,mlprec_wrk(level)%vy2l,& & p%precv(level)%base_desc, trans,& @@ -1036,13 +1004,13 @@ contains !Set the preconditioner if (level <= nlev - 2 ) then - if (p%precv(level)%parms%ml_type == mld_kcyclesym_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_kcyclesym_ml_) then call mld_zinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'FCG') - elseif (p%precv(level)%parms%ml_type == mld_kcycle_ml_) then + elseif (p%precv(level)%parms%ml_cycle == mld_kcycle_ml_) then call mld_zinneritkcycle(p, mlprec_wrk, level + 1, trans, work, 'GCR') else call psb_errpush(psb_err_internal_error_,name,& - & a_err='Bad value for ml_type') + & a_err='Bad value for ml_cycle') goto 9999 endif else @@ -1466,7 +1434,7 @@ contains write(debug_unit,*) me,' inner_ml_aply at level ',level end if - select case(p%precv(level)%parms%ml_type) + select case(p%precv(level)%parms%ml_cycle) case(mld_no_ml_) ! @@ -1480,39 +1448,7 @@ contains call mld_z_inner_add(p, mlprec_wrk, level, trans, work) - - case(mld_mult_ml_) - ! - ! Multiplicative multilevel (multiplicative among the levels, additive inside - ! each level) - ! - ! Pre/post-smoothing versions. - ! Note that the transpose switches pre <-> post. - ! - select case(p%precv(level)%parms%smoother_pos) - - case(mld_post_smooth_) - p%precv(level)%parms%sweeps_pre = 0 - call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) - - - case(mld_pre_smooth_) - p%precv(level)%parms%sweeps_post = 0 - call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) - - case(mld_twoside_smooth_) - call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) - - case default - info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid smooth_pos',& - & i_Err=(/p%precv(level)%parms%smoother_pos,izero,izero,izero,izero/)) - goto 9999 - - end select - - - case(mld_vcycle_ml_, mld_wcycle_ml_) + case(mld_mult_ml_, mld_vcycle_ml_, mld_wcycle_ml_) call mld_z_inner_mult(p, mlprec_wrk, level, trans, work) @@ -1522,8 +1458,8 @@ contains case default info = psb_err_from_subroutine_ai_ - call psb_errpush(info,name,a_err='invalid mltype',& - & i_Err=(/p%precv(level)%parms%ml_type,izero,izero,izero,izero/)) + call psb_errpush(info,name,a_err='invalid ml_cycle',& + & i_Err=(/p%precv(level)%parms%ml_cycle,izero,izero,izero,izero/)) goto 9999 end select @@ -1588,7 +1524,7 @@ contains goto 9999 end if - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre call p%precv(level)%sm%apply(zone,& & mlprec_wrk(level)%x2l,zzero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& @@ -1766,7 +1702,7 @@ contains call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) - if (p%precv(level)%parms%ml_type == mld_wcycle_ml_) then + if (p%precv(level)%parms%ml_cycle == mld_wcycle_ml_) then ! On second call will use output y2l as initial guess if (info == psb_success_) call inner_ml_aply(level+1,p,mlprec_wrk,trans,work,info) endif @@ -1832,7 +1768,7 @@ contains else if (level == nlev) then - sweeps = p%precv(level)%parms%sweeps + sweeps = p%precv(level)%parms%sweeps_pre if (info == psb_success_) call p%precv(level)%sm%apply(zone,& & mlprec_wrk(level)%x2l,zzero,mlprec_wrk(level)%y2l,& & p%precv(level)%base_desc, trans,& diff --git a/mlprec/impl/mld_zmlprec_bld.f90 b/mlprec/impl/mld_zmlprec_bld.f90 index 58349f14..342b63b5 100644 --- a/mlprec/impl/mld_zmlprec_bld.f90 +++ b/mlprec/impl/mld_zmlprec_bld.f90 @@ -94,7 +94,6 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold) 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 ! Local Variables integer(psb_ipk_) :: ictxt, me,np @@ -102,7 +101,6 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold) real(psb_dpk_) :: mnaggratio integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err diff --git a/mlprec/impl/mld_zprecaply.f90 b/mlprec/impl/mld_zprecaply.f90 index 96d32a2a..7040d8d5 100644 --- a/mlprec/impl/mld_zprecaply.f90 +++ b/mlprec/impl/mld_zprecaply.f90 @@ -144,7 +144,8 @@ subroutine mld_zprecaply(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(zone,x,zzero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post), & + & work_,info) else info = psb_err_from_subroutine_ai_ call psb_errpush(info,name,a_err='Invalid size of precv',& @@ -336,7 +337,8 @@ subroutine mld_zprecaply2_vect(prec,x,y,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(zone,x,zzero,y,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else @@ -438,7 +440,8 @@ subroutine mld_zprecaply1_vect(prec,x,desc_data,info,trans,work) ! Number of levels = 1: apply the base preconditioner ! call prec%precv(1)%sm%apply(zone,x,zzero,ww,desc_data,trans_,& - & prec%precv(1)%parms%sweeps, work_,info) + & max(prec%precv(1)%parms%sweeps_pre,prec%precv(1)%parms%sweeps_post),& + & work_,info) else diff --git a/mlprec/impl/mld_zprecbld.f90 b/mlprec/impl/mld_zprecbld.f90 index 6e9a12d9..305ef788 100644 --- a/mlprec/impl/mld_zprecbld.f90 +++ b/mlprec/impl/mld_zprecbld.f90 @@ -74,7 +74,6 @@ subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) 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 ! Local Variables type(mld_zprec_type) :: t_prec @@ -82,7 +81,6 @@ subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) integer(psb_ipk_) :: err,i,k,err_act, iszv, newsz integer(psb_ipk_) :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: int_err(5) - character :: upd_ type(mld_dml_parms) :: prm integer(psb_ipk_) :: debug_level, debug_unit character(len=20) :: name, ch_err @@ -105,21 +103,6 @@ subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) & write(debug_unit,*) me,' ',trim(name),& & 'Entering ' ! - ! For the time being we are commenting out the UPDATE argument - ! we plan to resurrect it later. -!!$ if (present(upd)) then -!!$ if (debug_level >= psb_debug_outer_) & -!!$ & write(debug_unit,*) me,' ',trim(name),'UPD ', upd -!!$ -!!$ if ((psb_toupper(upd).eq.'F').or.(psb_toupper(upd).eq.'T')) then -!!$ upd_=psb_toupper(upd) -!!$ else -!!$ upd_='F' -!!$ endif -!!$ else -!!$ upd_='F' -!!$ endif - upd_ = 'F' if (.not.allocated(prec%precv)) then !! Error: should have called mld_zprecinit @@ -174,7 +157,7 @@ subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold) goto 9999 endif - call prec%precv(1)%sm%build(a,desc_a,upd_,info,& + call prec%precv(1)%sm%build(a,desc_a,info,& & amold=amold,vmold=vmold,imold=imold) if (info /= psb_success_) then call psb_errpush(psb_err_internal_error_,name,& diff --git a/mlprec/impl/mld_zprecinit.F90 b/mlprec/impl/mld_zprecinit.F90 index 20e03db0..9c76e6c0 100644 --- a/mlprec/impl/mld_zprecinit.F90 +++ b/mlprec/impl/mld_zprecinit.F90 @@ -111,7 +111,7 @@ subroutine mld_zprecinit(prec,ptype,info) ! Local variables integer(psb_ipk_) :: nlev_, ilev_ - real(psb_dpk_) :: thr, scale + real(psb_dpk_) :: thr character(len=*), parameter :: name='mld_precinit' info = psb_success_ @@ -121,7 +121,7 @@ subroutine mld_zprecinit(prec,ptype,info) ! Do we want to do something? endif endif - prec%coarse_aggr_size = -1 + prec%min_coarse_size = -1 select case(psb_toupper(ptype(1:len_trim(ptype)))) case ('NOPREC','NONE') @@ -163,9 +163,28 @@ subroutine mld_zprecinit(prec,ptype,info) case ('ML') - nlev_ = prec%max_prec_levs + nlev_ = prec%max_levs ilev_ = 1 - allocate(prec%precv(nlev_),stat=info) + allocate(prec%precv(nlev_),stat=info) + + +#if 1 + do ilev_ = 1, nlev_ + call prec%precv(ilev_)%default() + end do + call prec%set('ML_CYCLE','VCYCLE',info) + call prec%set('SMOOTHER_TYPE','FBGS',info) +#if defined(HAVE_UMF_) + call prec%set('COARSE_SOLVE','UMF',info) +#elif defined(HAVE_MUMPS_) + call prec%set('COARSE_SOLVE','MUMPS',info) +#elif defined(HAVE_SLU_) + call prec%set('COARSE_SOLVE','SLU',info) +#else + call prec%set('COARSE_SOLVE','ILU',info) +#endif + !call prec%precv(nlev_)%default() +#else allocate(mld_z_as_smoother_type :: prec%precv(ilev_)%sm, stat=info) if (info /= psb_success_) return allocate(mld_z_ilu_solver_type :: prec%precv(ilev_)%sm%sv, stat=info) @@ -198,13 +217,11 @@ subroutine mld_zprecinit(prec,ptype,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 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 - +#endif case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_zprecset.F90 b/mlprec/impl/mld_zprecset.F90 index 32564de7..137f9fca 100644 --- a/mlprec/impl/mld_zprecset.F90 +++ b/mlprec/impl/mld_zprecset.F90 @@ -140,11 +140,11 @@ subroutine mld_zprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) - case (mld_coarse_aggr_size_) - p%coarse_aggr_size = max(val,-1) + case (mld_min_coarse_size_) + p%min_coarse_size = max(val,-1) return - case(mld_max_prec_levs_) - p%max_prec_levs = max(val,1) + case(mld_max_levs_) + p%max_levs = max(val,1) return case(mld_outer_sweeps_) p%outer_sweeps = max(val,1) @@ -164,10 +164,8 @@ subroutine mld_zprecseti(p,what,val,info,ilev,ilmax,pos) select case(what) case(mld_smoother_type_,mld_sub_solve_,mld_smoother_sweeps_,& - & mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,& - & mld_aggr_kind_,mld_smoother_pos_,& - & mld_aggr_omega_alg_,mld_aggr_eig_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& + & mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,& + & mld_aggr_prol_, mld_aggr_omega_alg_,mld_aggr_eig_,& & mld_sub_restr_,mld_sub_prol_, & & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_coarse_mat_) @@ -204,11 +202,19 @@ subroutine mld_zprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_,mld_mumps_) + case(mld_mumps_) + call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) + call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) + case(mld_umf_) + call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) + call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) + case(mld_sludist_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) @@ -256,9 +262,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev,ilmax,pos) if (info /= 0) return end do - case(mld_ml_type_,mld_aggr_alg_,mld_aggr_ord_,mld_aggr_kind_,& - & mld_smoother_sweeps_pre_,mld_smoother_sweeps_post_,& - & mld_smoother_pos_,mld_aggr_omega_alg_,& + case(mld_ml_cycle_,mld_par_aggr_alg_,mld_aggr_ord_,mld_aggr_type_,mld_aggr_prol_,& & mld_aggr_eig_,mld_aggr_filter_) do ilev_=1,nlev_ call p%precv(ilev_)%set(what,val,info,pos=pos) @@ -284,15 +288,19 @@ subroutine mld_zprecseti(p,what,val,info,ilev,ilmax,pos) call p%precv(nlev_)%set(mld_sub_solve_,mld_ilu_n_,info,pos=pos) #endif call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_umf_, mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) + case(mld_slu_,mld_ilu_n_, mld_ilu_t_,mld_milu_n_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) - case(mld_sludist_) + case(mld_mumps_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) - case(mld_mumps_) + case(mld_umf_) + call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) + call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) + call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info,pos=pos) + case(mld_sludist_) call p%precv(nlev_)%set(mld_smoother_type_,mld_bjac_,info,pos=pos) call p%precv(nlev_)%set(mld_sub_solve_,val,info,pos=pos) call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info,pos=pos) @@ -584,8 +592,8 @@ subroutine mld_zprecsetr(p,what,val,info,ilev,ilmax,pos) info = psb_success_ select case(what) - case (mld_min_aggr_ratio_) - p%min_aggr_ratio = max(done,val) + case (mld_min_cr_ratio_) + p%min_cr_ratio = max(done,val) return end select @@ -629,18 +637,6 @@ subroutine mld_zprecsetr(p,what,val,info,ilev,ilmax,pos) ilev_=nlev_ call p%precv(ilev_)%set(mld_sub_iluthrs_,val,info,pos=pos) - case(mld_aggr_scale_) - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_scale_,val,info,pos=pos) - end do - - case(mld_aggr_thresh_) - thr = val - do ilev_ = 2, nlev_ - call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info,pos=pos) - thr = thr * p%precv(ilev_)%parms%aggr_scale - end do - case default do ilev_=1,nlev_ diff --git a/mlprec/impl/smoother/mld_c_as_smoother_bld.f90 b/mlprec/impl/smoother/mld_c_as_smoother_bld.f90 index 5aa92366..6208d221 100644 --- a/mlprec/impl/smoother/mld_c_as_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_c_as_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_c_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_c_as_smoother, mld_protect_nam => mld_c_as_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_c_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -79,51 +78,47 @@ subroutine mld_c_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) endif if ((novr == 0).or.(np == 1)) then - if (psb_toupper(upd) == 'F') then - call psb_cdcpy(desc_a,sm%desc_data,info) - If(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' done cdcpy' - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdcpy' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & 'Early return: P>=3 N_OVR=0' - endif + call psb_cdcpy(desc_a,sm%desc_data,info) + If(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' done cdcpy' + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdcpy' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + if (debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & 'Early return: P>=3 N_OVR=0' call blck%csall(izero,izero,info,ione) else - If (psb_toupper(upd) == 'F') Then - ! - ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). - ! This is done by psb_cdbldext (interface to psb_cdovr), which is - ! independent of CSR, and has been placed in the tools directory - ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it - ! might be used independently of the AS preconditioner, to build - ! a descriptor for an extended stencil in a PDE solver. - ! - call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) - if(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' From cdbldext _:',sm%desc_data%get_local_rows(),& - & sm%desc_data%get_local_cols() - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdbldext' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - Endif + ! + ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). + ! This is done by psb_cdbldext (interface to psb_cdovr), which is + ! independent of CSR, and has been placed in the tools directory + ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it + ! might be used independently of the AS preconditioner, to build + ! a descriptor for an extended stencil in a PDE solver. + ! + call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) + if(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' From cdbldext _:',sm%desc_data%get_local_rows(),& + & sm%desc_data%get_local_cols() + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdbldext' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Before sphalo ' - + ! ! Retrieve the remote sparse matrix rows required for the AS extended ! matrix @@ -136,7 +131,7 @@ subroutine mld_c_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - + if (debug_level >=psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'After psb_sphalo ',& @@ -144,7 +139,7 @@ subroutine mld_c_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) End if if (info == psb_success_) & - & call sm%sv%build(a,sm%desc_data,upd,info,& + & call sm%sv%build(a,sm%desc_data,info,& & blck,amold=amold,vmold=vmold) nrow_a = a%get_nrows() diff --git a/mlprec/impl/smoother/mld_c_base_smoother_bld.f90 b/mlprec/impl/smoother/mld_c_base_smoother_bld.f90 index 20516590..bd3d8b71 100644 --- a/mlprec/impl/smoother/mld_c_base_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_c_base_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_c_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_c_base_smoother_mod, mld_protect_name => mld_c_base_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_c_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -59,7 +58,7 @@ subroutine mld_c_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) info = psb_success_ if (allocated(sm%sv)) then - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) else info = 1121 call psb_errpush(info,name) diff --git a/mlprec/impl/smoother/mld_c_jac_smoother_bld.f90 b/mlprec/impl/smoother/mld_c_jac_smoother_bld.f90 index b8819a22..8f5026de 100644 --- a/mlprec/impl/smoother/mld_c_jac_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_c_jac_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_c_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_c_diag_solver @@ -48,7 +48,6 @@ subroutine mld_c_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -95,7 +94,7 @@ subroutine mld_c_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) goto 9999 end if - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,& & a_err='solver build') diff --git a/mlprec/impl/smoother/mld_d_as_smoother_bld.f90 b/mlprec/impl/smoother/mld_d_as_smoother_bld.f90 index 49d361d5..090ca50e 100644 --- a/mlprec/impl/smoother/mld_d_as_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_d_as_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_d_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_d_as_smoother, mld_protect_nam => mld_d_as_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -79,51 +78,47 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) endif if ((novr == 0).or.(np == 1)) then - if (psb_toupper(upd) == 'F') then - call psb_cdcpy(desc_a,sm%desc_data,info) - If(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' done cdcpy' - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdcpy' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & 'Early return: P>=3 N_OVR=0' - endif + call psb_cdcpy(desc_a,sm%desc_data,info) + If(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' done cdcpy' + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdcpy' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + if (debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & 'Early return: P>=3 N_OVR=0' call blck%csall(izero,izero,info,ione) else - If (psb_toupper(upd) == 'F') Then - ! - ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). - ! This is done by psb_cdbldext (interface to psb_cdovr), which is - ! independent of CSR, and has been placed in the tools directory - ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it - ! might be used independently of the AS preconditioner, to build - ! a descriptor for an extended stencil in a PDE solver. - ! - call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) - if(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' From cdbldext _:',sm%desc_data%get_local_rows(),& - & sm%desc_data%get_local_cols() - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdbldext' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - Endif + ! + ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). + ! This is done by psb_cdbldext (interface to psb_cdovr), which is + ! independent of CSR, and has been placed in the tools directory + ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it + ! might be used independently of the AS preconditioner, to build + ! a descriptor for an extended stencil in a PDE solver. + ! + call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) + if(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' From cdbldext _:',sm%desc_data%get_local_rows(),& + & sm%desc_data%get_local_cols() + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdbldext' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Before sphalo ' - + ! ! Retrieve the remote sparse matrix rows required for the AS extended ! matrix @@ -136,7 +131,7 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - + if (debug_level >=psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'After psb_sphalo ',& @@ -144,7 +139,7 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) End if if (info == psb_success_) & - & call sm%sv%build(a,sm%desc_data,upd,info,& + & call sm%sv%build(a,sm%desc_data,info,& & blck,amold=amold,vmold=vmold) nrow_a = a%get_nrows() diff --git a/mlprec/impl/smoother/mld_d_base_smoother_bld.f90 b/mlprec/impl/smoother/mld_d_base_smoother_bld.f90 index 62f03319..9536bd31 100644 --- a/mlprec/impl/smoother/mld_d_base_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_d_base_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_d_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_d_base_smoother_mod, mld_protect_name => mld_d_base_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_d_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -59,7 +58,7 @@ subroutine mld_d_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) info = psb_success_ if (allocated(sm%sv)) then - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) else info = 1121 call psb_errpush(info,name) diff --git a/mlprec/impl/smoother/mld_d_jac_smoother_bld.f90 b/mlprec/impl/smoother/mld_d_jac_smoother_bld.f90 index 1579d07d..b59bd024 100644 --- a/mlprec/impl/smoother/mld_d_jac_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_d_jac_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_d_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_d_diag_solver @@ -48,7 +48,6 @@ subroutine mld_d_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -95,7 +94,7 @@ subroutine mld_d_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) goto 9999 end if - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,& & a_err='solver build') diff --git a/mlprec/impl/smoother/mld_s_as_smoother_bld.f90 b/mlprec/impl/smoother/mld_s_as_smoother_bld.f90 index 743465a3..a43289a7 100644 --- a/mlprec/impl/smoother/mld_s_as_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_s_as_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_s_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_s_as_smoother, mld_protect_nam => mld_s_as_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_s_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -79,51 +78,47 @@ subroutine mld_s_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) endif if ((novr == 0).or.(np == 1)) then - if (psb_toupper(upd) == 'F') then - call psb_cdcpy(desc_a,sm%desc_data,info) - If(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' done cdcpy' - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdcpy' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & 'Early return: P>=3 N_OVR=0' - endif + call psb_cdcpy(desc_a,sm%desc_data,info) + If(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' done cdcpy' + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdcpy' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + if (debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & 'Early return: P>=3 N_OVR=0' call blck%csall(izero,izero,info,ione) else - If (psb_toupper(upd) == 'F') Then - ! - ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). - ! This is done by psb_cdbldext (interface to psb_cdovr), which is - ! independent of CSR, and has been placed in the tools directory - ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it - ! might be used independently of the AS preconditioner, to build - ! a descriptor for an extended stencil in a PDE solver. - ! - call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) - if(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' From cdbldext _:',sm%desc_data%get_local_rows(),& - & sm%desc_data%get_local_cols() - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdbldext' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - Endif + ! + ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). + ! This is done by psb_cdbldext (interface to psb_cdovr), which is + ! independent of CSR, and has been placed in the tools directory + ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it + ! might be used independently of the AS preconditioner, to build + ! a descriptor for an extended stencil in a PDE solver. + ! + call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) + if(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' From cdbldext _:',sm%desc_data%get_local_rows(),& + & sm%desc_data%get_local_cols() + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdbldext' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Before sphalo ' - + ! ! Retrieve the remote sparse matrix rows required for the AS extended ! matrix @@ -136,7 +131,7 @@ subroutine mld_s_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - + if (debug_level >=psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'After psb_sphalo ',& @@ -144,7 +139,7 @@ subroutine mld_s_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) End if if (info == psb_success_) & - & call sm%sv%build(a,sm%desc_data,upd,info,& + & call sm%sv%build(a,sm%desc_data,info,& & blck,amold=amold,vmold=vmold) nrow_a = a%get_nrows() diff --git a/mlprec/impl/smoother/mld_s_base_smoother_bld.f90 b/mlprec/impl/smoother/mld_s_base_smoother_bld.f90 index 8cadeef6..2df1b646 100644 --- a/mlprec/impl/smoother/mld_s_base_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_s_base_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_s_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_s_base_smoother_mod, mld_protect_name => mld_s_base_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_s_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -59,7 +58,7 @@ subroutine mld_s_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) info = psb_success_ if (allocated(sm%sv)) then - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) else info = 1121 call psb_errpush(info,name) diff --git a/mlprec/impl/smoother/mld_s_jac_smoother_bld.f90 b/mlprec/impl/smoother/mld_s_jac_smoother_bld.f90 index 691f4169..e0b97840 100644 --- a/mlprec/impl/smoother/mld_s_jac_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_s_jac_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_s_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_s_diag_solver @@ -48,7 +48,6 @@ subroutine mld_s_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -95,7 +94,7 @@ subroutine mld_s_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) goto 9999 end if - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,& & a_err='solver build') diff --git a/mlprec/impl/smoother/mld_z_as_smoother_bld.f90 b/mlprec/impl/smoother/mld_z_as_smoother_bld.f90 index e3bea0b2..d9656def 100644 --- a/mlprec/impl/smoother/mld_z_as_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_z_as_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_z_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_z_as_smoother, mld_protect_nam => mld_z_as_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_z_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -79,51 +78,47 @@ subroutine mld_z_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) endif if ((novr == 0).or.(np == 1)) then - if (psb_toupper(upd) == 'F') then - call psb_cdcpy(desc_a,sm%desc_data,info) - If(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' done cdcpy' - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdcpy' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & 'Early return: P>=3 N_OVR=0' - endif + call psb_cdcpy(desc_a,sm%desc_data,info) + If(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' done cdcpy' + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdcpy' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + if (debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & 'Early return: P>=3 N_OVR=0' call blck%csall(izero,izero,info,ione) else - If (psb_toupper(upd) == 'F') Then - ! - ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). - ! This is done by psb_cdbldext (interface to psb_cdovr), which is - ! independent of CSR, and has been placed in the tools directory - ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it - ! might be used independently of the AS preconditioner, to build - ! a descriptor for an extended stencil in a PDE solver. - ! - call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) - if(debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),& - & ' From cdbldext _:',sm%desc_data%get_local_rows(),& - & sm%desc_data%get_local_cols() - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_cdbldext' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - Endif + ! + ! Build the auxiliary descriptor desc_p%matrix_data(psb_n_row_). + ! This is done by psb_cdbldext (interface to psb_cdovr), which is + ! independent of CSR, and has been placed in the tools directory + ! of PSBLAS, instead of the mlprec directory of MLD2P4, because it + ! might be used independently of the AS preconditioner, to build + ! a descriptor for an extended stencil in a PDE solver. + ! + call psb_cdbldext(a,desc_a,novr,sm%desc_data,info,extype=psb_ovt_asov_) + if(debug_level >= psb_debug_outer_) & + & write(debug_unit,*) me,' ',trim(name),& + & ' From cdbldext _:',sm%desc_data%get_local_rows(),& + & sm%desc_data%get_local_cols() + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_cdbldext' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Before sphalo ' - + ! ! Retrieve the remote sparse matrix rows required for the AS extended ! matrix @@ -136,7 +131,7 @@ subroutine mld_z_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - + if (debug_level >=psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'After psb_sphalo ',& @@ -144,7 +139,7 @@ subroutine mld_z_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) End if if (info == psb_success_) & - & call sm%sv%build(a,sm%desc_data,upd,info,& + & call sm%sv%build(a,sm%desc_data,info,& & blck,amold=amold,vmold=vmold) nrow_a = a%get_nrows() diff --git a/mlprec/impl/smoother/mld_z_base_smoother_bld.f90 b/mlprec/impl/smoother/mld_z_base_smoother_bld.f90 index 539fd3f4..4141dd27 100644 --- a/mlprec/impl/smoother/mld_z_base_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_z_base_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_z_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_z_base_smoother_mod, mld_protect_name => mld_z_base_smoother_bld @@ -47,7 +47,6 @@ subroutine mld_z_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -59,7 +58,7 @@ subroutine mld_z_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) info = psb_success_ if (allocated(sm%sv)) then - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) else info = 1121 call psb_errpush(info,name) diff --git a/mlprec/impl/smoother/mld_z_jac_smoother_bld.f90 b/mlprec/impl/smoother/mld_z_jac_smoother_bld.f90 index 0bf012da..5acf7556 100644 --- a/mlprec/impl/smoother/mld_z_jac_smoother_bld.f90 +++ b/mlprec/impl/smoother/mld_z_jac_smoother_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) +subroutine mld_z_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) use psb_base_mod use mld_z_diag_solver @@ -48,7 +48,6 @@ subroutine mld_z_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -95,7 +94,7 @@ subroutine mld_z_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) goto 9999 end if - call sm%sv%build(a,desc_a,upd,info,amold=amold,vmold=vmold) + call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold) if (info /= psb_success_) then call psb_errpush(psb_err_from_subroutine_,name,& & a_err='solver build') diff --git a/mlprec/impl/solver/mld_c_base_solver_bld.f90 b/mlprec/impl/solver/mld_c_base_solver_bld.f90 index 57b6c781..9f2658ab 100644 --- a/mlprec/impl/solver/mld_c_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_base_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_c_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_c_base_solver_mod, mld_protect_name => mld_c_base_solver_bld @@ -46,7 +46,6 @@ subroutine mld_c_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_c_bwgs_solver_bld.f90 b/mlprec/impl/solver/mld_c_bwgs_solver_bld.f90 index 6f3e5d48..fde44754 100644 --- a/mlprec/impl/solver/mld_c_bwgs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_bwgs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_c_gs_solver, mld_protect_name => mld_c_bwgs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -71,41 +70,39 @@ subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info,diag=-1) - call a%triu(sv%u,info,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info,diag=-1) + call a%triu(sv%u,info,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if + if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_c_diag_solver_bld.f90 b/mlprec/impl/solver/mld_c_diag_solver_bld.f90 index 020073d8..2ec2f03d 100644 --- a/mlprec/impl/solver/mld_c_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_diag_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_c_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_c_diag_solver, mld_protect_name => mld_c_diag_solver_bld @@ -48,7 +48,6 @@ subroutine mld_c_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_c_gs_solver_bld.f90 b/mlprec/impl/solver/mld_c_gs_solver_bld.f90 index c7c20d85..68923148 100644 --- a/mlprec/impl/solver/mld_c_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_gs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_c_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_c_gs_solver, mld_protect_name => mld_c_gs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_c_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -71,39 +70,36 @@ subroutine mld_c_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info) - call a%triu(sv%u,info,diag=1,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info) + call a%triu(sv%u,info,diag=1,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 index bd99dda4..323a94b3 100644 --- a/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_c_ilu_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_c_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_c_ilu_solver, mld_protect_name => mld_c_ilu_solver_bld @@ -48,7 +48,6 @@ subroutine mld_c_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -72,124 +71,104 @@ subroutine mld_c_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() - if (present(b)) then - nztota = nztota + b%get_nzeros() - end if + nrow_a = a%get_nrows() + nztota = a%get_nzeros() + if (present(b)) then + nztota = nztota + b%get_nzeros() + end if - call sv%l%csall(n_row,n_row,info,nztota) - if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_sp_all' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if + call sv%l%csall(n_row,n_row,info,nztota) + if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_sp_all' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if (allocated(sv%d)) then - if (size(sv%d) < n_row) then - deallocate(sv%d) - endif + if (allocated(sv%d)) then + if (size(sv%d) < n_row) then + deallocate(sv%d) endif - if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) + endif + if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) - if (info /= psb_success_) then - call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') - goto 9999 - endif + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') + goto 9999 + endif - select case(sv%fact_type) - - case (mld_ilu_t_) - ! - ! ILU(k,t) - ! - select case(sv%fill_in) - - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - - case(0:) - ! Fill-in >= 0 - call mld_ilut_fact(sv%fill_in,sv%thresh,& - & a, sv%l,sv%u,sv%d,info,blck=b) - end select - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_ilut_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case(mld_ilu_n_,mld_milu_n_) - ! - ! ILU(k) and MILU(k) - ! - select case(sv%fill_in) - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - case(0) - ! Fill-in 0 - ! Separate implementation of ILU(0) for better performance. - ! There seems to be a problem with the separate implementation of MILU(0), - ! contained into mld_ilu0_fact. This must be investigated. For the time being, - ! resort to the implementation of MILU(k) with k=0. - if (sv%fact_type == mld_ilu_n_) then - call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) - else - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - endif - case(1:) - ! Fill-in >= 1 - ! The same routine implements both ILU(k) and MILU(k) - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - end select - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_iluk_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case default - ! If we end up here, something was wrong up in the call chain. - info = psb_err_input_value_invalid_i_ - call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + select case(sv%fact_type) + + case (mld_ilu_t_) + ! + ! ILU(k,t) + ! + select case(sv%fill_in) + + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) goto 9999 + case(0:) + ! Fill-in >= 0 + call mld_ilut_fact(sv%fill_in,sv%thresh,& + & a, sv%l,sv%u,sv%d,info,blck=b) end select - else - ! Here we should add checks for reuse of L and U. - ! For the time being just throw an error. - info = 31 - call psb_errpush(info, name,& - & i_err=(/ithree,izero,izero,izero,izero/),a_err=upd) - goto 9999 + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_ilut_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + case(mld_ilu_n_,mld_milu_n_) ! - ! What is an update of a factorization?? - ! A first attempt could be to reuse EXACTLY the existing indices - ! as if it was an ILU(0) (since, effectively, the sparsity pattern - ! should not grow beyond what is already there). - ! - call mld_ilu0_fact(sv%fact_type,a,& - & sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) + ! ILU(k) and MILU(k) + ! + select case(sv%fill_in) + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) + goto 9999 + case(0) + ! Fill-in 0 + ! Separate implementation of ILU(0) for better performance. + ! There seems to be a problem with the separate implementation of MILU(0), + ! contained into mld_ilu0_fact. This must be investigated. For the time being, + ! resort to the implementation of MILU(k) with k=0. + if (sv%fact_type == mld_ilu_n_) then + call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& + & sv%d,info,blck=b) + else + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + endif + case(1:) + ! Fill-in >= 1 + ! The same routine implements both ILU(k) and MILU(k) + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + end select + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_iluk_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - end if + case default + ! If we end up here, something was wrong up in the call chain. + info = psb_err_input_value_invalid_i_ + call psb_errpush(psb_err_input_value_invalid_i_,name,& + & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + goto 9999 + + end select call sv%l%set_asb() call sv%l%trim() diff --git a/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 index 9a26c298..c7e90b42 100644 --- a/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_c_mumps_solver_bld.F90 @@ -39,7 +39,7 @@ ! - subroutine c_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine c_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_c_mumps_solver @@ -50,7 +50,6 @@ type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -73,101 +72,92 @@ debug_level = psb_get_debug_level() ictxt = desc_a%get_context() if (sv%ipar(1) < 0 ) then - call psb_info(ictxt, me, np) - call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) - call psb_get_mpicomm(ictxt1, icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt1 - call psb_info(ictxt1, me, np) - npr = np + call psb_info(ictxt, me, np) + call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) + call psb_get_mpicomm(ictxt1, icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt1 + call psb_info(ictxt1, me, np) + npr = np else - call psb_get_mpicomm(ictxt,icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt - call psb_info(ictxt, me, np) - npr = np + call psb_get_mpicomm(ictxt,icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt + call psb_info(ictxt, me, np) + npr = np end if npc = 1 if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' -! if (allocated(sv%id)) then -! call sv%free(info) + ! if (allocated(sv%id)) then + ! call sv%free(info) - ! deallocate(sv%id) - ! end if - if(.not.allocated(sv%id)) then + ! deallocate(sv%id) + ! end if + if(.not.allocated(sv%id)) then allocate(sv%id,stat=info) if (info /= psb_success_) then info=psb_err_alloc_dealloc_ call psb_errpush(info,name,a_err='mld_cmumps_default') goto 9999 - end if - end if - - - if (psb_toupper(upd) == 'F') then - - sv%id%comm = icomm - sv%id%job = -1 - sv%id%par=1 - call cmumps(sv%id) - !WARNING: CALLING cMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX - sv%id%icntl(3)=sv%ipar(2) - nglob = desc_a%get_global_rows() - if (sv%ipar(1) < 0) then - nglobrec=desc_a%get_local_rows() - call a%csclip(c,info,jmax=a%get_nrows()) - call c%cp_to(acoo) - nglob = c%get_nrows() - if (nglobrec /= nglob) then - write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' - end if - else - call a%cp_to(acoo) end if - nztota = acoo%get_nzeros() - - ! switch to global numbering - if (sv%ipar(1) >= 0 ) then - call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') - call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') - end if - sv%id%irn_loc=> acoo%ia - sv%id%jcn_loc=> acoo%ja - sv%id%a_loc=> acoo%val - sv%id%icntl(18)=3 - if(acoo%is_upper() .or. acoo%is_lower()) then - sv%id%sym = 2 - else - sv%id%sym = 0 - end if - sv%id%n = nglob - ! there should be a better way for this - sv%id%nz_loc = acoo%get_nzeros() - sv%id%nz = acoo%get_nzeros() - sv%id%job = 4 - call psb_barrier(ictxt) - write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc - call cmumps(sv%id) - call psb_barrier(ictxt) - info = sv%id%infog(1) - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_cmumps_fact ' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 + end if + + + sv%id%comm = icomm + sv%id%job = -1 + sv%id%par=1 + call cmumps(sv%id) + !WARNING: CALLING cMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX + sv%id%icntl(3)=sv%ipar(2) + nglob = desc_a%get_global_rows() + if (sv%ipar(1) < 0) then + nglobrec=desc_a%get_local_rows() + call a%csclip(c,info,jmax=a%get_nrows()) + call c%cp_to(acoo) + nglob = c%get_nrows() + if (nglobrec /= nglob) then + write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' end if - nullify(sv%id%irn) - nullify(sv%id%jcn) - nullify(sv%id%a) + else + call a%cp_to(acoo) + end if + nztota = acoo%get_nzeros() - call acoo%free() - sv%built=.true. + ! switch to global numbering + if (sv%ipar(1) >= 0 ) then + call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') + call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') + end if + sv%id%irn_loc=> acoo%ia + sv%id%jcn_loc=> acoo%ja + sv%id%a_loc=> acoo%val + sv%id%icntl(18)=3 + if(acoo%is_upper() .or. acoo%is_lower()) then + sv%id%sym = 2 else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + sv%id%sym = 0 + end if + sv%id%n = nglob + ! there should be a better way for this + sv%id%nz_loc = acoo%get_nzeros() + sv%id%nz = acoo%get_nzeros() + sv%id%job = 4 + call psb_barrier(ictxt) + write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc + call cmumps(sv%id) + call psb_barrier(ictxt) + info = sv%id%infog(1) + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_cmumps_fact ' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + nullify(sv%id%irn) + nullify(sv%id%jcn) + nullify(sv%id%a) + + call acoo%free() + sv%built=.true. if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_d_base_solver_bld.f90 b/mlprec/impl/solver/mld_d_base_solver_bld.f90 index 937f7fd3..286361b5 100644 --- a/mlprec/impl/solver/mld_d_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_base_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_d_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_d_base_solver_mod, mld_protect_name => mld_d_base_solver_bld @@ -46,7 +46,6 @@ subroutine mld_d_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_d_bwgs_solver_bld.f90 b/mlprec/impl/solver/mld_d_bwgs_solver_bld.f90 index 4d45feb1..689ac881 100644 --- a/mlprec/impl/solver/mld_d_bwgs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_bwgs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_d_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_d_gs_solver, mld_protect_name => mld_d_bwgs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_d_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -71,41 +70,39 @@ subroutine mld_d_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info,diag=-1) - call a%triu(sv%u,info,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info,diag=-1) + call a%triu(sv%u,info,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if + if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_d_diag_solver_bld.f90 b/mlprec/impl/solver/mld_d_diag_solver_bld.f90 index 83b010fd..b8939781 100644 --- a/mlprec/impl/solver/mld_d_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_diag_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_d_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_d_diag_solver, mld_protect_name => mld_d_diag_solver_bld @@ -48,7 +48,6 @@ subroutine mld_d_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_d_gs_solver_bld.f90 b/mlprec/impl/solver/mld_d_gs_solver_bld.f90 index 20cdde2c..545270cb 100644 --- a/mlprec/impl/solver/mld_d_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_gs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_d_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_d_gs_solver, mld_protect_name => mld_d_gs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_d_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -71,39 +70,36 @@ subroutine mld_d_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info) - call a%triu(sv%u,info,diag=1,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info) + call a%triu(sv%u,info,diag=1,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 index 65f05190..ffedac48 100644 --- a/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_d_ilu_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_d_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_d_ilu_solver, mld_protect_name => mld_d_ilu_solver_bld @@ -48,7 +48,6 @@ subroutine mld_d_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -72,124 +71,104 @@ subroutine mld_d_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() - if (present(b)) then - nztota = nztota + b%get_nzeros() - end if + nrow_a = a%get_nrows() + nztota = a%get_nzeros() + if (present(b)) then + nztota = nztota + b%get_nzeros() + end if - call sv%l%csall(n_row,n_row,info,nztota) - if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_sp_all' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if + call sv%l%csall(n_row,n_row,info,nztota) + if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_sp_all' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if (allocated(sv%d)) then - if (size(sv%d) < n_row) then - deallocate(sv%d) - endif + if (allocated(sv%d)) then + if (size(sv%d) < n_row) then + deallocate(sv%d) endif - if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) + endif + if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) - if (info /= psb_success_) then - call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') - goto 9999 - endif + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') + goto 9999 + endif - select case(sv%fact_type) - - case (mld_ilu_t_) - ! - ! ILU(k,t) - ! - select case(sv%fill_in) - - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - - case(0:) - ! Fill-in >= 0 - call mld_ilut_fact(sv%fill_in,sv%thresh,& - & a, sv%l,sv%u,sv%d,info,blck=b) - end select - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_ilut_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case(mld_ilu_n_,mld_milu_n_) - ! - ! ILU(k) and MILU(k) - ! - select case(sv%fill_in) - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - case(0) - ! Fill-in 0 - ! Separate implementation of ILU(0) for better performance. - ! There seems to be a problem with the separate implementation of MILU(0), - ! contained into mld_ilu0_fact. This must be investigated. For the time being, - ! resort to the implementation of MILU(k) with k=0. - if (sv%fact_type == mld_ilu_n_) then - call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) - else - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - endif - case(1:) - ! Fill-in >= 1 - ! The same routine implements both ILU(k) and MILU(k) - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - end select - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_iluk_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case default - ! If we end up here, something was wrong up in the call chain. - info = psb_err_input_value_invalid_i_ - call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + select case(sv%fact_type) + + case (mld_ilu_t_) + ! + ! ILU(k,t) + ! + select case(sv%fill_in) + + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) goto 9999 + case(0:) + ! Fill-in >= 0 + call mld_ilut_fact(sv%fill_in,sv%thresh,& + & a, sv%l,sv%u,sv%d,info,blck=b) end select - else - ! Here we should add checks for reuse of L and U. - ! For the time being just throw an error. - info = 31 - call psb_errpush(info, name,& - & i_err=(/ithree,izero,izero,izero,izero/),a_err=upd) - goto 9999 + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_ilut_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + case(mld_ilu_n_,mld_milu_n_) ! - ! What is an update of a factorization?? - ! A first attempt could be to reuse EXACTLY the existing indices - ! as if it was an ILU(0) (since, effectively, the sparsity pattern - ! should not grow beyond what is already there). - ! - call mld_ilu0_fact(sv%fact_type,a,& - & sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) + ! ILU(k) and MILU(k) + ! + select case(sv%fill_in) + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) + goto 9999 + case(0) + ! Fill-in 0 + ! Separate implementation of ILU(0) for better performance. + ! There seems to be a problem with the separate implementation of MILU(0), + ! contained into mld_ilu0_fact. This must be investigated. For the time being, + ! resort to the implementation of MILU(k) with k=0. + if (sv%fact_type == mld_ilu_n_) then + call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& + & sv%d,info,blck=b) + else + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + endif + case(1:) + ! Fill-in >= 1 + ! The same routine implements both ILU(k) and MILU(k) + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + end select + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_iluk_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - end if + case default + ! If we end up here, something was wrong up in the call chain. + info = psb_err_input_value_invalid_i_ + call psb_errpush(psb_err_input_value_invalid_i_,name,& + & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + goto 9999 + + end select call sv%l%set_asb() call sv%l%trim() diff --git a/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 index c38ae7a8..4caa28ac 100644 --- a/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_d_mumps_solver_bld.F90 @@ -39,7 +39,7 @@ ! - subroutine d_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine d_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_d_mumps_solver @@ -50,7 +50,6 @@ type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -73,101 +72,92 @@ debug_level = psb_get_debug_level() ictxt = desc_a%get_context() if (sv%ipar(1) < 0 ) then - call psb_info(ictxt, me, np) - call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) - call psb_get_mpicomm(ictxt1, icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt1 - call psb_info(ictxt1, me, np) - npr = np + call psb_info(ictxt, me, np) + call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) + call psb_get_mpicomm(ictxt1, icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt1 + call psb_info(ictxt1, me, np) + npr = np else - call psb_get_mpicomm(ictxt,icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt - call psb_info(ictxt, me, np) - npr = np + call psb_get_mpicomm(ictxt,icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt + call psb_info(ictxt, me, np) + npr = np end if npc = 1 if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' -! if (allocated(sv%id)) then -! call sv%free(info) + ! if (allocated(sv%id)) then + ! call sv%free(info) - ! deallocate(sv%id) - ! end if - if(.not.allocated(sv%id)) then + ! deallocate(sv%id) + ! end if + if(.not.allocated(sv%id)) then allocate(sv%id,stat=info) if (info /= psb_success_) then info=psb_err_alloc_dealloc_ call psb_errpush(info,name,a_err='mld_dmumps_default') goto 9999 - end if - end if - - - if (psb_toupper(upd) == 'F') then - - sv%id%comm = icomm - sv%id%job = -1 - sv%id%par=1 - call dmumps(sv%id) - !WARNING: CALLING dMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX - sv%id%icntl(3)=sv%ipar(2) - nglob = desc_a%get_global_rows() - if (sv%ipar(1) < 0) then - nglobrec=desc_a%get_local_rows() - call a%csclip(c,info,jmax=a%get_nrows()) - call c%cp_to(acoo) - nglob = c%get_nrows() - if (nglobrec /= nglob) then - write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' - end if - else - call a%cp_to(acoo) end if - nztota = acoo%get_nzeros() - - ! switch to global numbering - if (sv%ipar(1) >= 0 ) then - call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') - call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') - end if - sv%id%irn_loc=> acoo%ia - sv%id%jcn_loc=> acoo%ja - sv%id%a_loc=> acoo%val - sv%id%icntl(18)=3 - if(acoo%is_upper() .or. acoo%is_lower()) then - sv%id%sym = 2 - else - sv%id%sym = 0 - end if - sv%id%n = nglob - ! there should be a better way for this - sv%id%nz_loc = acoo%get_nzeros() - sv%id%nz = acoo%get_nzeros() - sv%id%job = 4 - call psb_barrier(ictxt) - write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc - call dmumps(sv%id) - call psb_barrier(ictxt) - info = sv%id%infog(1) - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_dmumps_fact ' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 + end if + + + sv%id%comm = icomm + sv%id%job = -1 + sv%id%par=1 + call dmumps(sv%id) + !WARNING: CALLING dMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX + sv%id%icntl(3)=sv%ipar(2) + nglob = desc_a%get_global_rows() + if (sv%ipar(1) < 0) then + nglobrec=desc_a%get_local_rows() + call a%csclip(c,info,jmax=a%get_nrows()) + call c%cp_to(acoo) + nglob = c%get_nrows() + if (nglobrec /= nglob) then + write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' end if - nullify(sv%id%irn) - nullify(sv%id%jcn) - nullify(sv%id%a) + else + call a%cp_to(acoo) + end if + nztota = acoo%get_nzeros() - call acoo%free() - sv%built=.true. + ! switch to global numbering + if (sv%ipar(1) >= 0 ) then + call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') + call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') + end if + sv%id%irn_loc=> acoo%ia + sv%id%jcn_loc=> acoo%ja + sv%id%a_loc=> acoo%val + sv%id%icntl(18)=3 + if(acoo%is_upper() .or. acoo%is_lower()) then + sv%id%sym = 2 else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + sv%id%sym = 0 + end if + sv%id%n = nglob + ! there should be a better way for this + sv%id%nz_loc = acoo%get_nzeros() + sv%id%nz = acoo%get_nzeros() + sv%id%job = 4 + call psb_barrier(ictxt) + write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc + call dmumps(sv%id) + call psb_barrier(ictxt) + info = sv%id%infog(1) + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_dmumps_fact ' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + nullify(sv%id%irn) + nullify(sv%id%jcn) + nullify(sv%id%a) + + call acoo%free() + sv%built=.true. if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_s_base_solver_bld.f90 b/mlprec/impl/solver/mld_s_base_solver_bld.f90 index 1a52d0b5..085e1515 100644 --- a/mlprec/impl/solver/mld_s_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_base_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_s_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_s_base_solver_mod, mld_protect_name => mld_s_base_solver_bld @@ -46,7 +46,6 @@ subroutine mld_s_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_s_bwgs_solver_bld.f90 b/mlprec/impl/solver/mld_s_bwgs_solver_bld.f90 index 72ff0036..0d6fb080 100644 --- a/mlprec/impl/solver/mld_s_bwgs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_bwgs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_s_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_s_gs_solver, mld_protect_name => mld_s_bwgs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_s_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -71,41 +70,39 @@ subroutine mld_s_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info,diag=-1) - call a%triu(sv%u,info,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info,diag=-1) + call a%triu(sv%u,info,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if + if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_s_diag_solver_bld.f90 b/mlprec/impl/solver/mld_s_diag_solver_bld.f90 index 1a9ee0ae..ef374ce3 100644 --- a/mlprec/impl/solver/mld_s_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_diag_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_s_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_s_diag_solver, mld_protect_name => mld_s_diag_solver_bld @@ -48,7 +48,6 @@ subroutine mld_s_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_s_gs_solver_bld.f90 b/mlprec/impl/solver/mld_s_gs_solver_bld.f90 index f3457dff..dd1ad477 100644 --- a/mlprec/impl/solver/mld_s_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_gs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_s_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_s_gs_solver, mld_protect_name => mld_s_gs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_s_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -71,39 +70,36 @@ subroutine mld_s_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info) - call a%triu(sv%u,info,diag=1,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info) + call a%triu(sv%u,info,diag=1,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 index 909bab22..aae78c1e 100644 --- a/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_s_ilu_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_s_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_s_ilu_solver, mld_protect_name => mld_s_ilu_solver_bld @@ -48,7 +48,6 @@ subroutine mld_s_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -72,124 +71,104 @@ subroutine mld_s_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() - if (present(b)) then - nztota = nztota + b%get_nzeros() - end if + nrow_a = a%get_nrows() + nztota = a%get_nzeros() + if (present(b)) then + nztota = nztota + b%get_nzeros() + end if - call sv%l%csall(n_row,n_row,info,nztota) - if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_sp_all' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if + call sv%l%csall(n_row,n_row,info,nztota) + if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_sp_all' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if (allocated(sv%d)) then - if (size(sv%d) < n_row) then - deallocate(sv%d) - endif + if (allocated(sv%d)) then + if (size(sv%d) < n_row) then + deallocate(sv%d) endif - if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) + endif + if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) - if (info /= psb_success_) then - call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') - goto 9999 - endif + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') + goto 9999 + endif - select case(sv%fact_type) - - case (mld_ilu_t_) - ! - ! ILU(k,t) - ! - select case(sv%fill_in) - - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - - case(0:) - ! Fill-in >= 0 - call mld_ilut_fact(sv%fill_in,sv%thresh,& - & a, sv%l,sv%u,sv%d,info,blck=b) - end select - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_ilut_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case(mld_ilu_n_,mld_milu_n_) - ! - ! ILU(k) and MILU(k) - ! - select case(sv%fill_in) - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - case(0) - ! Fill-in 0 - ! Separate implementation of ILU(0) for better performance. - ! There seems to be a problem with the separate implementation of MILU(0), - ! contained into mld_ilu0_fact. This must be investigated. For the time being, - ! resort to the implementation of MILU(k) with k=0. - if (sv%fact_type == mld_ilu_n_) then - call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) - else - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - endif - case(1:) - ! Fill-in >= 1 - ! The same routine implements both ILU(k) and MILU(k) - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - end select - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_iluk_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case default - ! If we end up here, something was wrong up in the call chain. - info = psb_err_input_value_invalid_i_ - call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + select case(sv%fact_type) + + case (mld_ilu_t_) + ! + ! ILU(k,t) + ! + select case(sv%fill_in) + + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) goto 9999 + case(0:) + ! Fill-in >= 0 + call mld_ilut_fact(sv%fill_in,sv%thresh,& + & a, sv%l,sv%u,sv%d,info,blck=b) end select - else - ! Here we should add checks for reuse of L and U. - ! For the time being just throw an error. - info = 31 - call psb_errpush(info, name,& - & i_err=(/ithree,izero,izero,izero,izero/),a_err=upd) - goto 9999 + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_ilut_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + case(mld_ilu_n_,mld_milu_n_) ! - ! What is an update of a factorization?? - ! A first attempt could be to reuse EXACTLY the existing indices - ! as if it was an ILU(0) (since, effectively, the sparsity pattern - ! should not grow beyond what is already there). - ! - call mld_ilu0_fact(sv%fact_type,a,& - & sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) + ! ILU(k) and MILU(k) + ! + select case(sv%fill_in) + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) + goto 9999 + case(0) + ! Fill-in 0 + ! Separate implementation of ILU(0) for better performance. + ! There seems to be a problem with the separate implementation of MILU(0), + ! contained into mld_ilu0_fact. This must be investigated. For the time being, + ! resort to the implementation of MILU(k) with k=0. + if (sv%fact_type == mld_ilu_n_) then + call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& + & sv%d,info,blck=b) + else + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + endif + case(1:) + ! Fill-in >= 1 + ! The same routine implements both ILU(k) and MILU(k) + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + end select + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_iluk_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - end if + case default + ! If we end up here, something was wrong up in the call chain. + info = psb_err_input_value_invalid_i_ + call psb_errpush(psb_err_input_value_invalid_i_,name,& + & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + goto 9999 + + end select call sv%l%set_asb() call sv%l%trim() diff --git a/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 index d66b7236..658c1479 100644 --- a/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_s_mumps_solver_bld.F90 @@ -39,7 +39,7 @@ ! - subroutine s_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine s_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_s_mumps_solver @@ -50,7 +50,6 @@ type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -73,101 +72,92 @@ debug_level = psb_get_debug_level() ictxt = desc_a%get_context() if (sv%ipar(1) < 0 ) then - call psb_info(ictxt, me, np) - call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) - call psb_get_mpicomm(ictxt1, icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt1 - call psb_info(ictxt1, me, np) - npr = np + call psb_info(ictxt, me, np) + call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) + call psb_get_mpicomm(ictxt1, icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt1 + call psb_info(ictxt1, me, np) + npr = np else - call psb_get_mpicomm(ictxt,icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt - call psb_info(ictxt, me, np) - npr = np + call psb_get_mpicomm(ictxt,icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt + call psb_info(ictxt, me, np) + npr = np end if npc = 1 if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' -! if (allocated(sv%id)) then -! call sv%free(info) + ! if (allocated(sv%id)) then + ! call sv%free(info) - ! deallocate(sv%id) - ! end if - if(.not.allocated(sv%id)) then + ! deallocate(sv%id) + ! end if + if(.not.allocated(sv%id)) then allocate(sv%id,stat=info) if (info /= psb_success_) then info=psb_err_alloc_dealloc_ call psb_errpush(info,name,a_err='mld_smumps_default') goto 9999 - end if - end if - - - if (psb_toupper(upd) == 'F') then - - sv%id%comm = icomm - sv%id%job = -1 - sv%id%par=1 - call smumps(sv%id) - !WARNING: CALLING sMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX - sv%id%icntl(3)=sv%ipar(2) - nglob = desc_a%get_global_rows() - if (sv%ipar(1) < 0) then - nglobrec=desc_a%get_local_rows() - call a%csclip(c,info,jmax=a%get_nrows()) - call c%cp_to(acoo) - nglob = c%get_nrows() - if (nglobrec /= nglob) then - write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' - end if - else - call a%cp_to(acoo) end if - nztota = acoo%get_nzeros() - - ! switch to global numbering - if (sv%ipar(1) >= 0 ) then - call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') - call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') - end if - sv%id%irn_loc=> acoo%ia - sv%id%jcn_loc=> acoo%ja - sv%id%a_loc=> acoo%val - sv%id%icntl(18)=3 - if(acoo%is_upper() .or. acoo%is_lower()) then - sv%id%sym = 2 - else - sv%id%sym = 0 - end if - sv%id%n = nglob - ! there should be a better way for this - sv%id%nz_loc = acoo%get_nzeros() - sv%id%nz = acoo%get_nzeros() - sv%id%job = 4 - call psb_barrier(ictxt) - write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc - call smumps(sv%id) - call psb_barrier(ictxt) - info = sv%id%infog(1) - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_smumps_fact ' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 + end if + + + sv%id%comm = icomm + sv%id%job = -1 + sv%id%par=1 + call smumps(sv%id) + !WARNING: CALLING sMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX + sv%id%icntl(3)=sv%ipar(2) + nglob = desc_a%get_global_rows() + if (sv%ipar(1) < 0) then + nglobrec=desc_a%get_local_rows() + call a%csclip(c,info,jmax=a%get_nrows()) + call c%cp_to(acoo) + nglob = c%get_nrows() + if (nglobrec /= nglob) then + write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' end if - nullify(sv%id%irn) - nullify(sv%id%jcn) - nullify(sv%id%a) + else + call a%cp_to(acoo) + end if + nztota = acoo%get_nzeros() - call acoo%free() - sv%built=.true. + ! switch to global numbering + if (sv%ipar(1) >= 0 ) then + call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') + call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') + end if + sv%id%irn_loc=> acoo%ia + sv%id%jcn_loc=> acoo%ja + sv%id%a_loc=> acoo%val + sv%id%icntl(18)=3 + if(acoo%is_upper() .or. acoo%is_lower()) then + sv%id%sym = 2 else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + sv%id%sym = 0 + end if + sv%id%n = nglob + ! there should be a better way for this + sv%id%nz_loc = acoo%get_nzeros() + sv%id%nz = acoo%get_nzeros() + sv%id%job = 4 + call psb_barrier(ictxt) + write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc + call smumps(sv%id) + call psb_barrier(ictxt) + info = sv%id%infog(1) + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_smumps_fact ' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + nullify(sv%id%irn) + nullify(sv%id%jcn) + nullify(sv%id%a) + + call acoo%free() + sv%built=.true. if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_z_base_solver_bld.f90 b/mlprec/impl/solver/mld_z_base_solver_bld.f90 index 5144832d..a05e5fb3 100644 --- a/mlprec/impl/solver/mld_z_base_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_base_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_z_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_z_base_solver_mod, mld_protect_name => mld_z_base_solver_bld @@ -46,7 +46,6 @@ subroutine mld_z_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_z_bwgs_solver_bld.f90 b/mlprec/impl/solver/mld_z_bwgs_solver_bld.f90 index ca30ea1f..12a935ea 100644 --- a/mlprec/impl/solver/mld_z_bwgs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_bwgs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_z_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_z_gs_solver, mld_protect_name => mld_z_bwgs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_z_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -71,41 +70,39 @@ subroutine mld_z_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info,diag=-1) - call a%triu(sv%u,info,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info,diag=-1) + call a%triu(sv%u,info,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if + if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/impl/solver/mld_z_diag_solver_bld.f90 b/mlprec/impl/solver/mld_z_diag_solver_bld.f90 index 5137ec98..d2b98fde 100644 --- a/mlprec/impl/solver/mld_z_diag_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_diag_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_z_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_z_diag_solver, mld_protect_name => mld_z_diag_solver_bld @@ -48,7 +48,6 @@ subroutine mld_z_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold diff --git a/mlprec/impl/solver/mld_z_gs_solver_bld.f90 b/mlprec/impl/solver/mld_z_gs_solver_bld.f90 index fdf70904..31708c0a 100644 --- a/mlprec/impl/solver/mld_z_gs_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_gs_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_z_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_z_gs_solver, mld_protect_name => mld_z_gs_solver_bld @@ -48,7 +48,6 @@ subroutine mld_z_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -71,39 +70,36 @@ subroutine mld_z_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() + nrow_a = a%get_nrows() + nztota = a%get_nzeros() !!$ if (present(b)) then !!$ nztota = nztota + b%get_nzeros() !!$ end if - if (sv%eps <= dzero) then - ! - ! This cuts out the off-diagonal part, because it's supposed to - ! be handled by the outer Jacobi smoother. - ! - call a%tril(sv%l,info) - call a%triu(sv%u,info,diag=1,jmax=nrow_a) - - else - - info = psb_err_missing_override_method_ - call psb_errpush(info,name) - goto 9999 - end if - + if (sv%eps <= dzero) then + ! + ! This cuts out the off-diagonal part, because it's supposed to + ! be handled by the outer Jacobi smoother. + ! + call a%tril(sv%l,info) + call a%triu(sv%u,info,diag=1,jmax=nrow_a) + + else + + info = psb_err_missing_override_method_ + call psb_errpush(info,name) + goto 9999 + end if - call sv%l%set_asb() - call sv%l%trim() - call sv%u%set_asb() - call sv%u%trim() - if (present(amold)) then - call sv%l%cscnv(info,mold=amold) - call sv%u%cscnv(info,mold=amold) - end if + call sv%l%set_asb() + call sv%l%trim() + call sv%u%set_asb() + call sv%u%trim() + if (present(amold)) then + call sv%l%cscnv(info,mold=amold) + call sv%u%cscnv(info,mold=amold) end if if (debug_level >= psb_debug_outer_) & diff --git a/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 b/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 index f53bac1e..7af80854 100644 --- a/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 +++ b/mlprec/impl/solver/mld_z_ilu_solver_bld.f90 @@ -37,7 +37,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) +subroutine mld_z_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_z_ilu_solver, mld_protect_name => mld_z_ilu_solver_bld @@ -48,7 +48,6 @@ subroutine mld_z_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -72,124 +71,104 @@ subroutine mld_z_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) n_row = desc_a%get_local_rows() - if (psb_toupper(upd) == 'F') then - nrow_a = a%get_nrows() - nztota = a%get_nzeros() - if (present(b)) then - nztota = nztota + b%get_nzeros() - end if + nrow_a = a%get_nrows() + nztota = a%get_nzeros() + if (present(b)) then + nztota = nztota + b%get_nzeros() + end if - call sv%l%csall(n_row,n_row,info,nztota) - if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_sp_all' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if + call sv%l%csall(n_row,n_row,info,nztota) + if (info == psb_success_) call sv%u%csall(n_row,n_row,info,nztota) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='psb_sp_all' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if (allocated(sv%d)) then - if (size(sv%d) < n_row) then - deallocate(sv%d) - endif + if (allocated(sv%d)) then + if (size(sv%d) < n_row) then + deallocate(sv%d) endif - if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) + endif + if (.not.allocated(sv%d)) allocate(sv%d(n_row),stat=info) - if (info /= psb_success_) then - call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') - goto 9999 - endif + if (info /= psb_success_) then + call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate') + goto 9999 + endif - select case(sv%fact_type) - - case (mld_ilu_t_) - ! - ! ILU(k,t) - ! - select case(sv%fill_in) - - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - - case(0:) - ! Fill-in >= 0 - call mld_ilut_fact(sv%fill_in,sv%thresh,& - & a, sv%l,sv%u,sv%d,info,blck=b) - end select - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_ilut_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case(mld_ilu_n_,mld_milu_n_) - ! - ! ILU(k) and MILU(k) - ! - select case(sv%fill_in) - case(:-1) - ! Error: fill-in <= -1 - call psb_errpush(psb_err_input_value_invalid_i_,& - & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) - goto 9999 - case(0) - ! Fill-in 0 - ! Separate implementation of ILU(0) for better performance. - ! There seems to be a problem with the separate implementation of MILU(0), - ! contained into mld_ilu0_fact. This must be investigated. For the time being, - ! resort to the implementation of MILU(k) with k=0. - if (sv%fact_type == mld_ilu_n_) then - call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) - else - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - endif - case(1:) - ! Fill-in >= 1 - ! The same routine implements both ILU(k) and MILU(k) - call mld_iluk_fact(sv%fill_in,sv%fact_type,& - & a,sv%l,sv%u,sv%d,info,blck=b) - end select - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_iluk_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - case default - ! If we end up here, something was wrong up in the call chain. - info = psb_err_input_value_invalid_i_ - call psb_errpush(psb_err_input_value_invalid_i_,name,& - & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + select case(sv%fact_type) + + case (mld_ilu_t_) + ! + ! ILU(k,t) + ! + select case(sv%fill_in) + + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) goto 9999 + case(0:) + ! Fill-in >= 0 + call mld_ilut_fact(sv%fill_in,sv%thresh,& + & a, sv%l,sv%u,sv%d,info,blck=b) end select - else - ! Here we should add checks for reuse of L and U. - ! For the time being just throw an error. - info = 31 - call psb_errpush(info, name,& - & i_err=(/ithree,izero,izero,izero,izero/),a_err=upd) - goto 9999 + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_ilut_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + case(mld_ilu_n_,mld_milu_n_) ! - ! What is an update of a factorization?? - ! A first attempt could be to reuse EXACTLY the existing indices - ! as if it was an ILU(0) (since, effectively, the sparsity pattern - ! should not grow beyond what is already there). - ! - call mld_ilu0_fact(sv%fact_type,a,& - & sv%l,sv%u,& - & sv%d,info,blck=b,upd=upd) + ! ILU(k) and MILU(k) + ! + select case(sv%fill_in) + case(:-1) + ! Error: fill-in <= -1 + call psb_errpush(psb_err_input_value_invalid_i_,& + & name,i_err=(/ithree,sv%fill_in,izero,izero,izero/)) + goto 9999 + case(0) + ! Fill-in 0 + ! Separate implementation of ILU(0) for better performance. + ! There seems to be a problem with the separate implementation of MILU(0), + ! contained into mld_ilu0_fact. This must be investigated. For the time being, + ! resort to the implementation of MILU(k) with k=0. + if (sv%fact_type == mld_ilu_n_) then + call mld_ilu0_fact(sv%fact_type,a,sv%l,sv%u,& + & sv%d,info,blck=b) + else + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + endif + case(1:) + ! Fill-in >= 1 + ! The same routine implements both ILU(k) and MILU(k) + call mld_iluk_fact(sv%fill_in,sv%fact_type,& + & a,sv%l,sv%u,sv%d,info,blck=b) + end select + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_iluk_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - end if + case default + ! If we end up here, something was wrong up in the call chain. + info = psb_err_input_value_invalid_i_ + call psb_errpush(psb_err_input_value_invalid_i_,name,& + & i_err=(/ithree,sv%fact_type,izero,izero,izero/)) + goto 9999 + + end select call sv%l%set_asb() call sv%l%trim() diff --git a/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 b/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 index c11662d3..94a70fea 100644 --- a/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 +++ b/mlprec/impl/solver/mld_z_mumps_solver_bld.F90 @@ -39,7 +39,7 @@ ! - subroutine z_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine z_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod use mld_z_mumps_solver @@ -50,7 +50,6 @@ type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -73,101 +72,92 @@ debug_level = psb_get_debug_level() ictxt = desc_a%get_context() if (sv%ipar(1) < 0 ) then - call psb_info(ictxt, me, np) - call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) - call psb_get_mpicomm(ictxt1, icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt1 - call psb_info(ictxt1, me, np) - npr = np + call psb_info(ictxt, me, np) + call psb_init(ictxt1,np=1,basectxt=ictxt,ids=(/me/)) + call psb_get_mpicomm(ictxt1, icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt1 + call psb_info(ictxt1, me, np) + npr = np else - call psb_get_mpicomm(ictxt,icomm) - write(*,*)'mumps_bld: +++++>',icomm,ictxt - call psb_info(ictxt, me, np) - npr = np + call psb_get_mpicomm(ictxt,icomm) + write(*,*)'mumps_bld: +++++>',icomm,ictxt + call psb_info(ictxt, me, np) + npr = np end if npc = 1 if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' -! if (allocated(sv%id)) then -! call sv%free(info) + ! if (allocated(sv%id)) then + ! call sv%free(info) - ! deallocate(sv%id) - ! end if - if(.not.allocated(sv%id)) then + ! deallocate(sv%id) + ! end if + if(.not.allocated(sv%id)) then allocate(sv%id,stat=info) if (info /= psb_success_) then info=psb_err_alloc_dealloc_ call psb_errpush(info,name,a_err='mld_zmumps_default') goto 9999 - end if - end if - - - if (psb_toupper(upd) == 'F') then - - sv%id%comm = icomm - sv%id%job = -1 - sv%id%par=1 - call zmumps(sv%id) - !WARNING: CALLING zMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX - sv%id%icntl(3)=sv%ipar(2) - nglob = desc_a%get_global_rows() - if (sv%ipar(1) < 0) then - nglobrec=desc_a%get_local_rows() - call a%csclip(c,info,jmax=a%get_nrows()) - call c%cp_to(acoo) - nglob = c%get_nrows() - if (nglobrec /= nglob) then - write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' - end if - else - call a%cp_to(acoo) end if - nztota = acoo%get_nzeros() - - ! switch to global numbering - if (sv%ipar(1) >= 0 ) then - call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') - call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') - end if - sv%id%irn_loc=> acoo%ia - sv%id%jcn_loc=> acoo%ja - sv%id%a_loc=> acoo%val - sv%id%icntl(18)=3 - if(acoo%is_upper() .or. acoo%is_lower()) then - sv%id%sym = 2 - else - sv%id%sym = 0 - end if - sv%id%n = nglob - ! there should be a better way for this - sv%id%nz_loc = acoo%get_nzeros() - sv%id%nz = acoo%get_nzeros() - sv%id%job = 4 - call psb_barrier(ictxt) - write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc - call zmumps(sv%id) - call psb_barrier(ictxt) - info = sv%id%infog(1) - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_zmumps_fact ' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 + end if + + + sv%id%comm = icomm + sv%id%job = -1 + sv%id%par=1 + call zmumps(sv%id) + !WARNING: CALLING zMUMPS WITH JOB=-1 DESTROY THE SETTING OF DEFAULT:TO FIX + sv%id%icntl(3)=sv%ipar(2) + nglob = desc_a%get_global_rows() + if (sv%ipar(1) < 0) then + nglobrec=desc_a%get_local_rows() + call a%csclip(c,info,jmax=a%get_nrows()) + call c%cp_to(acoo) + nglob = c%get_nrows() + if (nglobrec /= nglob) then + write(*,*)'WARNING: MUMPS solver does not allow overlap in AS yet. A zero-overlap is used instead' end if - nullify(sv%id%irn) - nullify(sv%id%jcn) - nullify(sv%id%a) + else + call a%cp_to(acoo) + end if + nztota = acoo%get_nzeros() - call acoo%free() - sv%built=.true. + ! switch to global numbering + if (sv%ipar(1) >= 0 ) then + call psb_loc_to_glob(acoo%ja(1:nztota), desc_a, info, iact='I') + call psb_loc_to_glob(acoo%ia(1:nztota), desc_a, info, iact='I') + end if + sv%id%irn_loc=> acoo%ia + sv%id%jcn_loc=> acoo%ja + sv%id%a_loc=> acoo%val + sv%id%icntl(18)=3 + if(acoo%is_upper() .or. acoo%is_lower()) then + sv%id%sym = 2 else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + sv%id%sym = 0 + end if + sv%id%n = nglob + ! there should be a better way for this + sv%id%nz_loc = acoo%get_nzeros() + sv%id%nz = acoo%get_nzeros() + sv%id%job = 4 + call psb_barrier(ictxt) + write(*,*)'calling mumps N,nz,nz_loc',sv%id%n,sv%id%nz,sv%id%nz_loc + call zmumps(sv%id) + call psb_barrier(ictxt) + info = sv%id%infog(1) + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_zmumps_fact ' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + nullify(sv%id%irn) + nullify(sv%id%jcn) + nullify(sv%id%a) + + call acoo%free() + sv%built=.true. if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' diff --git a/mlprec/mld_base_prec_type.F90 b/mlprec/mld_base_prec_type.F90 index 28210eb9..3dddcfa1 100644 --- a/mlprec/mld_base_prec_type.F90 +++ b/mlprec/mld_base_prec_type.F90 @@ -87,9 +87,10 @@ module mld_base_prec_type integer(psb_ipk_), parameter :: mld_patchlevel_ = 0 type mld_ml_parms - integer(psb_ipk_) :: sweeps, sweeps_pre, sweeps_post - integer(psb_ipk_) :: ml_type, smoother_pos - integer(psb_ipk_) :: aggr_alg, aggr_ord, aggr_kind + integer(psb_ipk_) :: sweeps_pre, sweeps_post + integer(psb_ipk_) :: ml_cycle + integer(psb_ipk_) :: aggr_type, par_aggr_alg + integer(psb_ipk_) :: aggr_ord, aggr_prol integer(psb_ipk_) :: aggr_omega_alg, aggr_eig, aggr_filter integer(psb_ipk_) :: coarse_mat, coarse_solve contains @@ -103,7 +104,7 @@ module mld_base_prec_type type, extends(mld_ml_parms) :: mld_sml_parms - real(psb_spk_) :: aggr_omega_val, aggr_thresh, aggr_scale + real(psb_spk_) :: aggr_omega_val, aggr_thresh contains procedure, pass(pm) :: clone => s_ml_parms_clone procedure, pass(pm) :: descr => s_ml_parms_descr @@ -111,7 +112,7 @@ module mld_base_prec_type end type mld_sml_parms type, extends(mld_ml_parms) :: mld_dml_parms - real(psb_dpk_) :: aggr_omega_val, aggr_thresh, aggr_scale + real(psb_dpk_) :: aggr_omega_val, aggr_thresh contains procedure, pass(pm) :: clone => d_ml_parms_clone procedure, pass(pm) :: descr => d_ml_parms_descr @@ -136,12 +137,12 @@ module mld_base_prec_type ! ! These are in onelev ! - integer(psb_ipk_), parameter :: mld_ml_type_ = 20 + integer(psb_ipk_), parameter :: mld_ml_cycle_ = 20 integer(psb_ipk_), parameter :: mld_smoother_sweeps_pre_ = 21 integer(psb_ipk_), parameter :: mld_smoother_sweeps_post_ = 22 - integer(psb_ipk_), parameter :: mld_smoother_pos_ = 23 - integer(psb_ipk_), parameter :: mld_aggr_kind_ = 24 - integer(psb_ipk_), parameter :: mld_aggr_alg_ = 25 + integer(psb_ipk_), parameter :: mld_aggr_type_ = 23 + integer(psb_ipk_), parameter :: mld_aggr_prol_ = 24 + integer(psb_ipk_), parameter :: mld_par_aggr_alg_ = 25 integer(psb_ipk_), parameter :: mld_aggr_ord_ = 26 integer(psb_ipk_), parameter :: mld_aggr_omega_alg_ = 27 integer(psb_ipk_), parameter :: mld_aggr_eig_ = 28 @@ -151,25 +152,33 @@ module mld_base_prec_type integer(psb_ipk_), parameter :: mld_coarse_sweeps_ = 32 integer(psb_ipk_), parameter :: mld_coarse_fillin_ = 33 integer(psb_ipk_), parameter :: mld_coarse_subsolve_ = 34 - integer(psb_ipk_), parameter :: mld_smoother_sweeps_ = 35 - integer(psb_ipk_), parameter :: mld_solver_sweeps_ = 36 - integer(psb_ipk_), parameter :: mld_coarse_aggr_size_ = 37 - integer(psb_ipk_), parameter :: mld_n_prec_levs_ = 38 - integer(psb_ipk_), parameter :: mld_max_prec_levs_ = 39 - integer(psb_ipk_), parameter :: mld_min_aggr_ratio_ = 40 - integer(psb_ipk_), parameter :: mld_outer_sweeps_ = 41 - integer(psb_ipk_), parameter :: mld_ifpsz_ = 42 + integer(psb_ipk_), parameter :: mld_smoother_sweeps_ = 36 + integer(psb_ipk_), parameter :: mld_solver_sweeps_ = 37 + integer(psb_ipk_), parameter :: mld_min_coarse_size_ = 38 + integer(psb_ipk_), parameter :: mld_n_prec_levs_ = 39 + integer(psb_ipk_), parameter :: mld_max_levs_ = 40 + integer(psb_ipk_), parameter :: mld_min_cr_ratio_ = 41 + integer(psb_ipk_), parameter :: mld_outer_sweeps_ = 42 + integer(psb_ipk_), parameter :: mld_ifpsz_ = 43 ! ! Legal values for entry: mld_smoother_type_ ! integer(psb_ipk_), parameter :: mld_min_prec_ = 0 integer(psb_ipk_), parameter :: mld_noprec_ = 0 + integer(psb_ipk_), parameter :: mld_base_smooth_ = 0 integer(psb_ipk_), parameter :: mld_jac_ = 1 integer(psb_ipk_), parameter :: mld_bjac_ = 2 integer(psb_ipk_), parameter :: mld_as_ = 3 integer(psb_ipk_), parameter :: mld_max_prec_ = 3 integer(psb_ipk_), parameter :: mld_fbgs_ = 4 + ! + ! Constants for pre/post signaling. Now only used internally + ! + integer(psb_ipk_), parameter :: mld_pre_smooth_ = 1 + integer(psb_ipk_), parameter :: mld_post_smooth_ = 2 + integer(psb_ipk_), parameter :: mld_both_smooth_ = 3 + ! ! This is a quick&dirty fix, but I have nothing better now... ! @@ -210,7 +219,7 @@ module mld_base_prec_type ! For the time being enable only maxval scale integer(psb_ipk_), parameter :: mld_max_ilu_scale_ = 1 ! - ! Legal values for entry: mld_ml_type_ + ! Legal values for entry: mld_ml_cycle_ ! integer(psb_ipk_), parameter :: mld_no_ml_ = 0 integer(psb_ipk_), parameter :: mld_add_ml_ = 1 @@ -221,23 +230,21 @@ module mld_base_prec_type integer(psb_ipk_), parameter :: mld_kcyclesym_ml_ = 6 integer(psb_ipk_), parameter :: mld_new_ml_prec_ = 7 integer(psb_ipk_), parameter :: mld_mult_dev_ml_ = 7 - integer(psb_ipk_), parameter :: mld_max_ml_type_ = 8 + integer(psb_ipk_), parameter :: mld_max_ml_cycle_ = 8 ! - ! Legal values for entry: mld_smoother_pos_ + ! Legal values for entry: mld_aggr_type_ ! - integer(psb_ipk_), parameter :: mld_pre_smooth_ = 1 - integer(psb_ipk_), parameter :: mld_post_smooth_ = 2 - integer(psb_ipk_), parameter :: mld_twoside_smooth_ = 3 - integer(psb_ipk_), parameter :: mld_max_smooth_ = mld_twoside_smooth_ + integer(psb_ipk_), parameter :: mld_noalg_ = 0 + integer(psb_ipk_), parameter :: mld_vmb_ = 1 ! - ! Legal values for entry: mld_aggr_kind_ + ! Legal values for entry: mld_aggr_prol_ ! integer(psb_ipk_), parameter :: mld_no_smooth_ = 0 integer(psb_ipk_), parameter :: mld_smooth_prol_ = 1 integer(psb_ipk_), parameter :: mld_min_energy_ = 2 integer(psb_ipk_), parameter :: mld_biz_prol_ = 3 ! Disabling biz_prol for the time being. - integer(psb_ipk_), parameter :: mld_max_aggr_kind_=mld_min_energy_ + integer(psb_ipk_), parameter :: mld_max_aggr_prol_=mld_min_energy_ ! ! Legal values for entry: mld_aggr_filter_ ! @@ -245,13 +252,13 @@ module mld_base_prec_type integer(psb_ipk_), parameter :: mld_filter_mat_ = 1 integer(psb_ipk_), parameter :: mld_max_filter_mat_ = mld_filter_mat_ ! - ! Legal values for entry: mld_aggr_alg_ + ! Legal values for entry: mld_par_aggr_alg_ ! integer(psb_ipk_), parameter :: mld_dec_aggr_ = 0 integer(psb_ipk_), parameter :: mld_sym_dec_aggr_ = 1 integer(psb_ipk_), parameter :: mld_ext_aggr_ = 2 integer(psb_ipk_), parameter :: mld_bcmatch_aggr_ = 3 - integer(psb_ipk_), parameter :: mld_max_aggr_alg_ = mld_ext_aggr_ + integer(psb_ipk_), parameter :: mld_max_par_aggr_alg_ = mld_ext_aggr_ ! ! Legal values for entry: mld_aggr_ord_ ! @@ -285,7 +292,6 @@ module mld_base_prec_type integer(psb_ipk_), parameter :: mld_aggr_omega_val_ = 2 integer(psb_ipk_), parameter :: mld_aggr_thresh_ = 3 integer(psb_ipk_), parameter :: mld_coarse_iluthrs_ = 4 - integer(psb_ipk_), parameter :: mld_aggr_scale_ = 5 integer(psb_ipk_), parameter :: mld_solver_eps_ = 6 integer(psb_ipk_), parameter :: mld_rfpsz_ = 8 @@ -316,19 +322,20 @@ module mld_base_prec_type ! character(len=19), parameter, private :: & & eigen_estimates(0:0)=(/'infinity norm '/) - character(len=19), parameter, private :: & - & smooth_pos_names(1:3)=(/'pre-smoothing ','post-smoothing ',& - & 'pre/post-smoothing'/) character(len=15), parameter, private :: & - & aggr_kinds(0:3)=(/'unsmoothed ','smoothed ',& + & aggr_prols(0:3)=(/'unsmoothed ','smoothed ',& & 'min energy ','bizr. smoothed'/) character(len=15), parameter, private :: & & aggr_filters(0:1)=(/'no filtering ','filtering '/) character(len=15), parameter, private :: & & matrix_names(0:1)=(/'distributed ','replicated '/) character(len=18), parameter, private :: & - & aggr_names(0:3)=(/'decoupled aggr. ','sym. dec. aggr. ',& - & 'user defined aggr.', 'matching aggr. '/) + & aggr_type_names(0:1)=(/'No aggregation ',& + & 'VMB aggregation '/) + character(len=18), parameter, private :: & + & par_aggr_alg_names(0:3)=(/'decoupled aggr. ',& + & 'sym. dec. aggr. ',& + & 'user defined aggr.', 'matching aggr. '/) character(len=18), parameter, private :: & & ord_names(0:1)=(/'Natural ordering ','Desc. degree ord. '/) character(len=6), parameter, private :: & @@ -405,9 +412,9 @@ contains val = mld_f_none_ case('FBGS') val = mld_fbgs_ - case('GS','FWGS') + case('GS','FGS','FWGS') val = mld_gs_ - case('BWGS') + case('BGS','BWGS') val = mld_bwgs_ case('ILU') val = mld_ilu_n_ @@ -439,6 +446,8 @@ contains val = mld_kcycle_ml_ case('KCYCLESYM') val = mld_kcyclesym_ml_ + case('VMB') + val = mld_vmb_ case('DEC') val = mld_dec_aggr_ case('SYMDEC') @@ -459,12 +468,6 @@ contains val = mld_smooth_prol_ case('MINENERGY') val = mld_min_energy_ - case('PRE') - val = mld_pre_smooth_ - case('POST') - val = mld_post_smooth_ - case('TWOSIDE') - val = mld_twoside_smooth_ case('NOPREC') val = mld_noprec_ case('BJAC') @@ -511,9 +514,9 @@ contains class(mld_ml_parms), intent(in) :: pm integer(psb_ipk_), intent(in) :: iout - write(iout,*) 'Sweeps: ',pm%sweeps,pm%sweeps_pre,pm%sweeps_post - write(iout,*) 'ML : ',pm%ml_type,pm%smoother_pos - write(iout,*) 'AGGR : ',pm%aggr_alg,pm%aggr_kind, pm%aggr_ord + write(iout,*) 'ML : ',pm%ml_cycle + write(iout,*) 'Sweeps: ',pm%sweeps_pre,pm%sweeps_post + write(iout,*) 'AGGR : ',pm%par_aggr_alg,pm%aggr_prol, pm%aggr_ord write(iout,*) ' : ',pm%aggr_omega_alg,pm%aggr_eig,pm%aggr_filter write(iout,*) 'COARSE: ',pm%coarse_mat,pm%coarse_solve end subroutine ml_parms_printout @@ -553,45 +556,29 @@ contains integer(psb_ipk_), intent(out) :: info info = psb_success_ - if ((pm%ml_type>=mld_no_ml_).and.(pm%ml_type<=mld_max_ml_type_)) then + if ((pm%ml_cycle>=mld_no_ml_).and.(pm%ml_cycle<=mld_max_ml_cycle_)) then - write(iout,*) ' Multilevel type: ',& - & ml_names(pm%ml_type) - select case (pm%ml_type) + write(iout,*) ' Multilevel cycle: ',& + & ml_names(pm%ml_cycle) + select case (pm%ml_cycle) case (mld_add_ml_) write(iout,*) ' Number of smoother sweeps : ',& - & pm%sweeps - case (mld_mult_ml_) - write(iout,*) ' Smoother position: ',& - & smooth_pos_names(pm%smoother_pos) - select case (pm%smoother_pos) - case (mld_pre_smooth_) - write(iout,*) ' Number of smoother sweeps : ',& - & pm%sweeps_pre - case (mld_post_smooth_) - write(iout,*) ' Number of smoother sweeps : ',& - & pm%sweeps_post - case (mld_twoside_smooth_) - write(iout,*) ' Number of smoother sweeps : pre: ',& - & pm%sweeps_pre ,& - & ' post: ',& - & pm%sweeps_post - end select - case (mld_vcycle_ml_, mld_wcycle_ml_, mld_kcycle_ml_, mld_kcyclesym_ml_) + & pm%sweeps_pre + case (mld_mult_ml_,mld_vcycle_ml_, mld_wcycle_ml_, mld_kcycle_ml_, mld_kcyclesym_ml_) write(iout,*) ' Number of smoother sweeps : pre: ',& - & pm%sweeps_pre ,& - & ' post: ',& - & pm%sweeps_post + & pm%sweeps_pre ,' post: ', pm%sweeps_post end select - write(iout,*) ' Aggregation: ', & - & aggr_names(pm%aggr_alg) - if (pm%aggr_alg /= mld_ext_aggr_) then + write(iout,*) ' Aggregation type: ',& + & aggr_type_names(pm%aggr_type) + write(iout,*) ' parallel algorithm: ',& + & par_aggr_alg_names(pm%par_aggr_alg) + if (pm%par_aggr_alg /= mld_ext_aggr_) then write(iout,*) ' with initial ordering: ',& & ord_names(pm%aggr_ord) - write(iout,*) ' Aggregation type: ', & - & aggr_kinds(pm%aggr_kind) - if (pm%aggr_kind /= mld_no_smooth_) then + write(iout,*) ' Aggregation prolongator: ', & + & aggr_prols(pm%aggr_prol) + if (pm%aggr_prol /= mld_no_smooth_) then write(iout,*) ' with: ', aggr_filters(pm%aggr_filter) if (pm%aggr_omega_alg == mld_eig_est_) then write(iout,*) ' Damping omega computation: spectral radius estimate' @@ -606,7 +593,7 @@ contains end if else write(iout,*) ' Multilevel type: Unkonwn value. Something is amis....',& - & pm%ml_type + & pm%ml_cycle end if return @@ -628,7 +615,7 @@ contains & matrix_names(pm%coarse_mat) if ((pm%coarse_solve == mld_bjac_).or.(pm%coarse_solve==mld_as_)) then write(iout,*) ' Number of sweeps : ',& - & pm%sweeps + & pm%sweeps_pre write(iout,*) ' Coarse solver: ',& & 'Block Jacobi' else @@ -677,7 +664,7 @@ contains info = psb_success_ call pm%mld_ml_parms%descr(iout,info,coarse) - if (pm%aggr_kind /= mld_no_smooth_) then + if (pm%aggr_prol /= mld_no_smooth_) then write(iout,*) ' Damping omega value :',pm%aggr_omega_val end if write(iout,*) ' Aggregation threshold:',pm%aggr_thresh @@ -699,7 +686,7 @@ contains info = psb_success_ call pm%mld_ml_parms%descr(iout,info,coarse) - if (pm%aggr_kind /= mld_no_smooth_) then + if (pm%aggr_prol /= mld_no_smooth_) then write(iout,*) ' Damping omega value :',pm%aggr_omega_val end if write(iout,*) ' Aggregation threshold:',pm%aggr_thresh @@ -765,22 +752,30 @@ contains is_legal_restrict = ((ip == psb_nohalo_).or.(ip==psb_halo_)) return end function is_legal_restrict - function is_legal_ml_type(ip) + function is_legal_ml_cycle(ip) implicit none integer(psb_ipk_), intent(in) :: ip - logical :: is_legal_ml_type + logical :: is_legal_ml_cycle - is_legal_ml_type = ((ip>=mld_no_ml_).and.(ip<=mld_max_ml_type_)) + is_legal_ml_cycle = ((ip>=mld_no_ml_).and.(ip<=mld_max_ml_cycle_)) return - end function is_legal_ml_type - function is_legal_ml_aggr_alg(ip) + end function is_legal_ml_cycle + function is_legal_ml_par_aggr_alg(ip) implicit none integer(psb_ipk_), intent(in) :: ip - logical :: is_legal_ml_aggr_alg + logical :: is_legal_ml_par_aggr_alg - is_legal_ml_aggr_alg = ((ip>=mld_dec_aggr_).and.(ip<=mld_max_aggr_alg_)) + is_legal_ml_par_aggr_alg = ((ip>=mld_dec_aggr_).and.(ip<=mld_max_par_aggr_alg_)) return - end function is_legal_ml_aggr_alg + end function is_legal_ml_par_aggr_alg + function is_legal_ml_aggr_type(ip) + implicit none + integer(psb_ipk_), intent(in) :: ip + logical :: is_legal_ml_aggr_type + + is_legal_ml_aggr_type = (ip == mld_vmb_) + return + end function is_legal_ml_aggr_type function is_legal_ml_aggr_ord(ip) implicit none integer(psb_ipk_), intent(in) :: ip @@ -805,22 +800,14 @@ contains is_legal_ml_aggr_eig = (ip == mld_max_norm_) return end function is_legal_ml_aggr_eig - function is_legal_ml_smooth_pos(ip) - implicit none - integer(psb_ipk_), intent(in) :: ip - logical :: is_legal_ml_smooth_pos - - is_legal_ml_smooth_pos = ((ip>=mld_pre_smooth_).and.(ip<=mld_max_smooth_)) - return - end function is_legal_ml_smooth_pos - function is_legal_ml_aggr_kind(ip) + function is_legal_ml_aggr_prol(ip) implicit none integer(psb_ipk_), intent(in) :: ip - logical :: is_legal_ml_aggr_kind + logical :: is_legal_ml_aggr_prol - is_legal_ml_aggr_kind = ((ip>=0).and.(ip<=mld_max_aggr_kind_)) + is_legal_ml_aggr_prol = ((ip>=0).and.(ip<=mld_max_aggr_prol_)) return - end function is_legal_ml_aggr_kind + end function is_legal_ml_aggr_prol function is_legal_ml_coarse_mat(ip) implicit none integer(psb_ipk_), intent(in) :: ip @@ -1002,14 +989,13 @@ contains type(mld_ml_parms), intent(inout) :: dat integer(psb_ipk_), intent(in), optional :: root - call psb_bcast(ictxt,dat%sweeps,root) call psb_bcast(ictxt,dat%sweeps_pre,root) call psb_bcast(ictxt,dat%sweeps_post,root) - call psb_bcast(ictxt,dat%ml_type,root) - call psb_bcast(ictxt,dat%smoother_pos,root) - call psb_bcast(ictxt,dat%aggr_alg,root) + call psb_bcast(ictxt,dat%ml_cycle,root) + call psb_bcast(ictxt,dat%aggr_type,root) + call psb_bcast(ictxt,dat%par_aggr_alg,root) call psb_bcast(ictxt,dat%aggr_ord,root) - call psb_bcast(ictxt,dat%aggr_kind,root) + call psb_bcast(ictxt,dat%aggr_prol,root) call psb_bcast(ictxt,dat%aggr_omega_alg,root) call psb_bcast(ictxt,dat%aggr_eig,root) call psb_bcast(ictxt,dat%aggr_filter,root) @@ -1049,14 +1035,13 @@ contains integer(psb_ipk_), intent(out) :: info info = psb_success_ - pmout%sweeps = pm%sweeps pmout%sweeps_pre = pm%sweeps_pre pmout%sweeps_post = pm%sweeps_post - pmout%ml_type = pm%ml_type - pmout%smoother_pos = pm%smoother_pos - pmout%aggr_alg = pm%aggr_alg + pmout%ml_cycle = pm%ml_cycle + pmout%aggr_type = pm%aggr_type + pmout%par_aggr_alg = pm%par_aggr_alg pmout%aggr_ord = pm%aggr_ord - pmout%aggr_kind = pm%aggr_kind + pmout%aggr_prol = pm%aggr_prol pmout%aggr_omega_alg = pm%aggr_omega_alg pmout%aggr_eig = pm%aggr_eig pmout%aggr_filter = pm%aggr_filter @@ -1083,7 +1068,6 @@ contains call pm%mld_ml_parms%clone(pout%mld_ml_parms,info) pout%aggr_omega_val = pm%aggr_omega_val pout%aggr_thresh = pm%aggr_thresh - pout%aggr_scale = pm%aggr_scale class default info = psb_err_invalid_dynamic_type_ ierr(1) = 2 @@ -1113,7 +1097,6 @@ contains call pm%mld_ml_parms%clone(pout%mld_ml_parms,info) pout%aggr_omega_val = pm%aggr_omega_val pout%aggr_thresh = pm%aggr_thresh - pout%aggr_scale = pm%aggr_scale class default info = psb_err_invalid_dynamic_type_ ierr(1) = 2 @@ -1130,14 +1113,14 @@ contains type(mld_sml_parms), intent(in) :: parms1, parms2 logical :: val - val = (parms1%aggr_alg == parms2%aggr_alg ) .and. & + val = (parms1%par_aggr_alg == parms2%par_aggr_alg ) .and. & + & (parms1%aggr_type == parms2%aggr_type ) .and. & & (parms1%aggr_ord == parms2%aggr_ord ) .and. & - & (parms1%aggr_kind == parms2%aggr_kind ) .and. & + & (parms1%aggr_prol == parms2%aggr_prol ) .and. & & (parms1%aggr_omega_alg == parms2%aggr_omega_alg ) .and. & & (parms1%aggr_eig == parms2%aggr_eig ) .and. & & (parms1%aggr_filter == parms2%aggr_filter ) .and. & & (parms1%aggr_omega_val == parms2%aggr_omega_val ) .and. & - & (parms1%aggr_scale == parms2%aggr_scale ) .and. & & (parms1%aggr_thresh == parms2%aggr_thresh ) end function mld_s_equal_aggregation @@ -1145,14 +1128,14 @@ contains type(mld_dml_parms), intent(in) :: parms1, parms2 logical :: val - val = (parms1%aggr_alg == parms2%aggr_alg ) .and. & + val = (parms1%par_aggr_alg == parms2%par_aggr_alg ) .and. & + & (parms1%aggr_type == parms2%aggr_type ) .and. & & (parms1%aggr_ord == parms2%aggr_ord ) .and. & - & (parms1%aggr_kind == parms2%aggr_kind ) .and. & + & (parms1%aggr_prol == parms2%aggr_prol ) .and. & & (parms1%aggr_omega_alg == parms2%aggr_omega_alg ) .and. & & (parms1%aggr_eig == parms2%aggr_eig ) .and. & & (parms1%aggr_filter == parms2%aggr_filter ) .and. & & (parms1%aggr_omega_val == parms2%aggr_omega_val ) .and. & - & (parms1%aggr_scale == parms2%aggr_scale ) .and. & & (parms1%aggr_thresh == parms2%aggr_thresh ) end function mld_d_equal_aggregation diff --git a/mlprec/mld_c_as_smoother.f90 b/mlprec/mld_c_as_smoother.f90 index 098baa2b..6228f073 100644 --- a/mlprec/mld_c_as_smoother.f90 +++ b/mlprec/mld_c_as_smoother.f90 @@ -94,12 +94,13 @@ module mld_c_as_smoother procedure, pass(sm) :: default => c_as_smoother_default procedure, pass(sm) :: get_nzeros => c_as_smoother_get_nzeros procedure, nopass :: get_fmt => c_as_smoother_get_fmt + procedure, nopass :: get_id => c_as_smoother_get_id end type mld_c_as_smoother_type private :: c_as_smoother_descr, c_as_smoother_sizeof, & & c_as_smoother_default, c_as_smoother_get_nzeros, & - & c_as_smoother_get_fmt + & c_as_smoother_get_fmt, c_as_smoother_get_id character(len=6), parameter, private :: & & restrict_names(0:4)=(/'none ','halo ',' ',' ',' '/) @@ -221,7 +222,7 @@ module mld_c_as_smoother end interface interface - subroutine mld_c_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_c_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_cspmat_type, psb_c_vect_type, psb_c_base_vect_type, & & psb_spk_, mld_c_as_smoother_type, psb_long_int_k_, & & psb_desc_type, psb_c_base_sparse_mat, psb_ipk_,& @@ -230,7 +231,6 @@ module mld_c_as_smoother type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -396,12 +396,13 @@ contains ! Arguments class(mld_c_as_smoother_type), intent(inout) :: sm - + ! + ! Default: RAS with 1 overlap layer + ! sm%restr = psb_halo_ sm%prol = psb_none_ sm%novr = 1 - if (allocated(sm%sv)) then call sm%sv%default() end if @@ -465,4 +466,11 @@ contains val = "Schwarz smoother" end function c_as_smoother_get_fmt + function c_as_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_as_ + end function c_as_smoother_get_id + end module mld_c_as_smoother diff --git a/mlprec/mld_c_base_smoother_mod.f90 b/mlprec/mld_c_base_smoother_mod.f90 index 105ccdbb..f4de5e77 100644 --- a/mlprec/mld_c_base_smoother_mod.f90 +++ b/mlprec/mld_c_base_smoother_mod.f90 @@ -123,11 +123,13 @@ module mld_c_base_smoother_mod procedure, pass(sm) :: get_nzeros => c_base_smoother_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => c_base_smoother_get_fmt + procedure, nopass :: get_id => c_base_smoother_get_id end type mld_c_base_smoother_type private :: c_base_smoother_sizeof, c_base_smoother_get_fmt, & - & c_base_smoother_default, c_base_smoother_get_nzeros + & c_base_smoother_default, c_base_smoother_get_nzeros, & + & c_base_smoother_get_id @@ -259,7 +261,7 @@ module mld_c_base_smoother_mod end interface interface - subroutine mld_c_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_c_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, & & psb_c_vect_type, psb_c_base_vect_type, psb_spk_, & & mld_c_base_smoother_type, psb_ipk_, psb_i_base_vect_type @@ -267,7 +269,6 @@ module mld_c_base_smoother_mod type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -394,4 +395,11 @@ contains val = "Base smoother" end function c_base_smoother_get_fmt + function c_base_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_base_smooth_ + end function c_base_smoother_get_id + end module mld_c_base_smoother_mod diff --git a/mlprec/mld_c_base_solver_mod.f90 b/mlprec/mld_c_base_solver_mod.f90 index 8ddc7ae3..0bbe7fa7 100644 --- a/mlprec/mld_c_base_solver_mod.f90 +++ b/mlprec/mld_c_base_solver_mod.f90 @@ -108,12 +108,13 @@ module mld_c_base_solver_mod procedure, pass(sv) :: get_nzeros => c_base_solver_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => c_base_solver_get_fmt + procedure, nopass :: get_id => c_base_solver_get_id procedure, nopass :: is_iterative => c_base_solver_is_iterative end type mld_c_base_solver_type private :: c_base_solver_sizeof, c_base_solver_default,& & c_base_solver_get_nzeros, c_base_solver_get_fmt, & - & c_base_solver_is_iterative + & c_base_solver_is_iterative, c_base_solver_get_id interface @@ -158,7 +159,7 @@ module mld_c_base_solver_mod end interface interface - subroutine mld_c_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_c_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, & & psb_c_vect_type, psb_c_base_vect_type, psb_spk_, & & mld_c_base_solver_type, psb_ipk_, psb_i_base_vect_type @@ -168,7 +169,6 @@ module mld_c_base_solver_mod type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -406,4 +406,12 @@ contains val = .false. end function c_base_solver_is_iterative + function c_base_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function c_base_solver_get_id + + end module mld_c_base_solver_mod diff --git a/mlprec/mld_c_diag_solver.f90 b/mlprec/mld_c_diag_solver.f90 index 2a0dbab2..66efb0a8 100644 --- a/mlprec/mld_c_diag_solver.f90 +++ b/mlprec/mld_c_diag_solver.f90 @@ -67,12 +67,13 @@ module mld_c_diag_solver procedure, pass(sv) :: sizeof => c_diag_solver_sizeof procedure, pass(sv) :: get_nzeros => c_diag_solver_get_nzeros procedure, nopass :: get_fmt => c_diag_solver_get_fmt + procedure, nopass :: get_id => c_diag_solver_get_id end type mld_c_diag_solver_type private :: c_diag_solver_free, c_diag_solver_descr, & & c_diag_solver_sizeof, c_diag_solver_get_nzeros, & - & c_diag_solver_get_fmt + & c_diag_solver_get_fmt, c_diag_solver_get_id interface @@ -114,14 +115,13 @@ module mld_c_diag_solver end interface interface - subroutine mld_c_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_c_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, & & psb_c_vect_type, psb_c_base_vect_type, psb_spk_, & & mld_c_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -267,5 +267,11 @@ contains val = "Diag solver" end function c_diag_solver_get_fmt + function c_diag_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_diag_scale_ + end function c_diag_solver_get_id end module mld_c_diag_solver diff --git a/mlprec/mld_c_gs_solver.f90 b/mlprec/mld_c_gs_solver.f90 index 6379c432..56785396 100644 --- a/mlprec/mld_c_gs_solver.f90 +++ b/mlprec/mld_c_gs_solver.f90 @@ -62,25 +62,26 @@ module mld_c_gs_solver real(psb_spk_) :: eps contains procedure, pass(sv) :: dump => mld_c_gs_solver_dmp - procedure, pass(sv) :: ccheck => d_gs_solver_check + procedure, pass(sv) :: ccheck => c_gs_solver_check procedure, pass(sv) :: clone => mld_c_gs_solver_clone procedure, pass(sv) :: build => mld_c_gs_solver_bld procedure, pass(sv) :: cnv => mld_c_gs_solver_cnv procedure, pass(sv) :: apply_v => mld_c_gs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_c_gs_solver_apply - procedure, pass(sv) :: free => d_gs_solver_free - procedure, pass(sv) :: seti => d_gs_solver_seti - procedure, pass(sv) :: setc => d_gs_solver_setc - procedure, pass(sv) :: setr => d_gs_solver_setr - procedure, pass(sv) :: cseti => d_gs_solver_cseti - procedure, pass(sv) :: csetc => d_gs_solver_csetc - procedure, pass(sv) :: csetr => d_gs_solver_csetr - procedure, pass(sv) :: descr => d_gs_solver_descr - procedure, pass(sv) :: default => d_gs_solver_default - procedure, pass(sv) :: sizeof => d_gs_solver_sizeof - procedure, pass(sv) :: get_nzeros => d_gs_solver_get_nzeros - procedure, nopass :: get_fmt => d_gs_solver_get_fmt - procedure, nopass :: is_iterative => d_gs_solver_is_iterative + procedure, pass(sv) :: free => c_gs_solver_free + procedure, pass(sv) :: seti => c_gs_solver_seti + procedure, pass(sv) :: setc => c_gs_solver_setc + procedure, pass(sv) :: setr => c_gs_solver_setr + procedure, pass(sv) :: cseti => c_gs_solver_cseti + procedure, pass(sv) :: csetc => c_gs_solver_csetc + procedure, pass(sv) :: csetr => c_gs_solver_csetr + procedure, pass(sv) :: descr => c_gs_solver_descr + procedure, pass(sv) :: default => c_gs_solver_default + procedure, pass(sv) :: sizeof => c_gs_solver_sizeof + procedure, pass(sv) :: get_nzeros => c_gs_solver_get_nzeros + procedure, nopass :: get_fmt => c_gs_solver_get_fmt + procedure, nopass :: get_id => c_gs_solver_get_id + procedure, nopass :: is_iterative => c_gs_solver_is_iterative end type mld_c_gs_solver_type type, extends(mld_c_gs_solver_type) :: mld_c_bwgs_solver_type @@ -89,6 +90,7 @@ module mld_c_gs_solver procedure, pass(sv) :: apply_v => mld_c_bwgs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_c_bwgs_solver_apply procedure, nopass :: get_fmt => c_bwgs_solver_get_fmt + procedure, nopass :: get_id => c_bwgs_solver_get_id procedure, pass(sv) :: descr => c_bwgs_solver_descr end type mld_c_bwgs_solver_type @@ -101,8 +103,8 @@ module mld_c_gs_solver & c_gs_solver_apply_vect, c_gs_solver_get_nzeros, & & c_gs_solver_get_fmt, c_gs_solver_check,& & c_gs_solver_is_iterative, & - & c_bwgs_solver_get_fmt, c_bwgs_solver_descr - + & c_bwgs_solver_get_fmt, c_bwgs_solver_descr, & + & c_gs_solver_get_id, c_bwgs_solver_get_id interface subroutine mld_c_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -174,7 +176,7 @@ module mld_c_gs_solver end interface interface - subroutine mld_c_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_c_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_c_gs_solver_type, psb_c_vect_type, psb_spk_, & & psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -182,14 +184,13 @@ module mld_c_gs_solver type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b 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 end subroutine mld_c_gs_solver_bld - subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_c_bwgs_solver_type, psb_c_vect_type, psb_spk_, & & psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -197,7 +198,6 @@ module mld_c_gs_solver type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -251,7 +251,7 @@ module mld_c_gs_solver contains - subroutine d_gs_solver_default(sv) + subroutine c_gs_solver_default(sv) Implicit None @@ -262,9 +262,9 @@ contains sv%eps = dzero return - end subroutine d_gs_solver_default + end subroutine c_gs_solver_default - subroutine d_gs_solver_check(sv,info) + subroutine c_gs_solver_check(sv,info) Implicit None @@ -272,7 +272,7 @@ contains class(mld_c_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_check' + character(len=20) :: name='c_gs_solver_check' call psb_erractionsave(err_act) info = psb_success_ @@ -288,10 +288,10 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_check + end subroutine c_gs_solver_check - subroutine d_gs_solver_seti(sv,what,val,info) + subroutine c_gs_solver_seti(sv,what,val,info) Implicit None @@ -301,7 +301,7 @@ contains integer(psb_ipk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_seti' + character(len=20) :: name='c_gs_solver_seti' info = psb_success_ call psb_erractionsave(err_act) @@ -318,9 +318,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_seti + end subroutine c_gs_solver_seti - subroutine d_gs_solver_setc(sv,what,val,info) + subroutine c_gs_solver_setc(sv,what,val,info) Implicit None @@ -330,7 +330,7 @@ contains character(len=*), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act, ival - character(len=20) :: name='d_gs_solver_setc' + character(len=20) :: name='c_gs_solver_setc' info = psb_success_ call psb_erractionsave(err_act) @@ -352,9 +352,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_setc + end subroutine c_gs_solver_setc - subroutine d_gs_solver_setr(sv,what,val,info) + subroutine c_gs_solver_setr(sv,what,val,info) Implicit None @@ -364,7 +364,7 @@ contains real(psb_spk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_setr' + character(len=20) :: name='c_gs_solver_setr' call psb_erractionsave(err_act) info = psb_success_ @@ -381,9 +381,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_setr + end subroutine c_gs_solver_setr - subroutine d_gs_solver_cseti(sv,what,val,info) + subroutine c_gs_solver_cseti(sv,what,val,info) Implicit None @@ -393,7 +393,7 @@ contains integer(psb_ipk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_cseti' + character(len=20) :: name='c_gs_solver_cseti' info = psb_success_ call psb_erractionsave(err_act) @@ -410,9 +410,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_cseti + end subroutine c_gs_solver_cseti - subroutine d_gs_solver_csetc(sv,what,val,info) + subroutine c_gs_solver_csetc(sv,what,val,info) Implicit None @@ -422,7 +422,7 @@ contains character(len=*), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act, ival - character(len=20) :: name='d_gs_solver_csetc' + character(len=20) :: name='c_gs_solver_csetc' info = psb_success_ call psb_erractionsave(err_act) @@ -444,9 +444,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_csetc + end subroutine c_gs_solver_csetc - subroutine d_gs_solver_csetr(sv,what,val,info) + subroutine c_gs_solver_csetr(sv,what,val,info) Implicit None @@ -456,7 +456,7 @@ contains real(psb_spk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_csetr' + character(len=20) :: name='c_gs_solver_csetr' call psb_erractionsave(err_act) info = psb_success_ @@ -474,9 +474,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_csetr + end subroutine c_gs_solver_csetr - subroutine d_gs_solver_free(sv,info) + subroutine c_gs_solver_free(sv,info) Implicit None @@ -484,7 +484,7 @@ contains class(mld_c_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_free' + character(len=20) :: name='c_gs_solver_free' call psb_erractionsave(err_act) info = psb_success_ @@ -497,9 +497,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_free + end subroutine c_gs_solver_free - subroutine d_gs_solver_descr(sv,info,iout,coarse) + subroutine c_gs_solver_descr(sv,info,iout,coarse) Implicit None @@ -535,9 +535,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_descr + end subroutine c_gs_solver_descr - function d_gs_solver_get_nzeros(sv) result(val) + function c_gs_solver_get_nzeros(sv) result(val) implicit none ! Arguments @@ -550,9 +550,9 @@ contains val = val + sv%u%get_nzeros() return - end function d_gs_solver_get_nzeros + end function c_gs_solver_get_nzeros - function d_gs_solver_sizeof(sv) result(val) + function c_gs_solver_sizeof(sv) result(val) implicit none ! Arguments @@ -565,26 +565,32 @@ contains val = val + sv%u%sizeof() return - end function d_gs_solver_sizeof + end function c_gs_solver_sizeof - function d_gs_solver_get_fmt() result(val) + function c_gs_solver_get_fmt() result(val) implicit none character(len=32) :: val val = "Forward Gauss-Seidel solver" - end function d_gs_solver_get_fmt + end function c_gs_solver_get_fmt + + function c_gs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + val = mld_gs_ + end function c_gs_solver_get_id ! ! If this is true, then the solver needs a starting ! guess. Currently only handled in JAC smoother. ! - function d_gs_solver_is_iterative() result(val) + function c_gs_solver_is_iterative() result(val) implicit none logical :: val val = .true. - end function d_gs_solver_is_iterative + end function c_gs_solver_is_iterative subroutine c_bwgs_solver_descr(sv,info,iout,coarse) @@ -631,4 +637,11 @@ contains val = "Backward Gauss-Seidel solver" end function c_bwgs_solver_get_fmt + function c_bwgs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_bwgs_ + end function c_bwgs_solver_get_id + end module mld_c_gs_solver diff --git a/mlprec/mld_c_id_solver.f90 b/mlprec/mld_c_id_solver.f90 index 162859ef..5999a9be 100644 --- a/mlprec/mld_c_id_solver.f90 +++ b/mlprec/mld_c_id_solver.f90 @@ -56,12 +56,13 @@ module mld_c_id_solver procedure, pass(sv) :: free => c_id_solver_free procedure, pass(sv) :: descr => c_id_solver_descr procedure, nopass :: get_fmt => c_id_solver_get_fmt + procedure, nopass :: get_id => c_id_solver_get_id end type mld_c_id_solver_type private :: c_id_solver_bld, & & c_id_solver_free, c_id_solver_get_fmt, & - & c_id_solver_descr + & c_id_solver_descr, c_id_solver_get_id interface subroutine mld_c_id_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -118,7 +119,7 @@ module mld_c_id_solver contains - subroutine c_id_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine c_id_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None @@ -126,7 +127,6 @@ contains type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_id_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -193,5 +193,11 @@ contains val = "Identity solver" end function c_id_solver_get_fmt + function c_id_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function c_id_solver_get_id end module mld_c_id_solver diff --git a/mlprec/mld_c_ilu_solver.f90 b/mlprec/mld_c_ilu_solver.f90 index 999599f1..aaa4409a 100644 --- a/mlprec/mld_c_ilu_solver.f90 +++ b/mlprec/mld_c_ilu_solver.f90 @@ -88,6 +88,7 @@ module mld_c_ilu_solver procedure, pass(sv) :: sizeof => c_ilu_solver_sizeof procedure, pass(sv) :: get_nzeros => c_ilu_solver_get_nzeros procedure, nopass :: get_fmt => c_ilu_solver_get_fmt + procedure, nopass :: get_id => c_ilu_solver_get_id end type mld_c_ilu_solver_type @@ -97,7 +98,7 @@ module mld_c_ilu_solver & c_ilu_solver_descr, c_ilu_solver_sizeof, & & c_ilu_solver_default, c_ilu_solver_dmp, & & c_ilu_solver_apply_vect, c_ilu_solver_get_nzeros, & - & c_ilu_solver_get_fmt, c_ilu_solver_check + & c_ilu_solver_get_fmt, c_ilu_solver_check, c_ilu_solver_get_id interface @@ -139,7 +140,7 @@ module mld_c_ilu_solver end interface interface - subroutine mld_c_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_c_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_c_ilu_solver_type, psb_c_vect_type, psb_spk_, & & psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -147,7 +148,6 @@ module mld_c_ilu_solver type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -550,4 +550,11 @@ contains val = "ILU solver" end function c_ilu_solver_get_fmt + function c_ilu_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_ilu_n_ + end function c_ilu_solver_get_id + end module mld_c_ilu_solver diff --git a/mlprec/mld_c_jac_smoother.f90 b/mlprec/mld_c_jac_smoother.f90 index d3c66be0..9c1e4b2e 100644 --- a/mlprec/mld_c_jac_smoother.f90 +++ b/mlprec/mld_c_jac_smoother.f90 @@ -74,12 +74,13 @@ module mld_c_jac_smoother procedure, pass(sm) :: sizeof => c_jac_smoother_sizeof procedure, pass(sm) :: get_nzeros => c_jac_smoother_get_nzeros procedure, nopass :: get_fmt => c_jac_smoother_get_fmt + procedure, nopass :: get_id => c_jac_smoother_get_id end type mld_c_jac_smoother_type private :: c_jac_smoother_free, c_jac_smoother_descr, & & c_jac_smoother_sizeof, c_jac_smoother_get_nzeros, & - & c_jac_smoother_get_fmt + & c_jac_smoother_get_fmt, c_jac_smoother_get_id interface @@ -124,14 +125,13 @@ module mld_c_jac_smoother end interface interface - subroutine mld_c_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_c_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, mld_c_jac_smoother_type, psb_c_vect_type, psb_spk_, & & psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,& & psb_ipk_, psb_i_base_vect_type type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_c_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -295,4 +295,11 @@ contains val = "Jacobi smoother" end function c_jac_smoother_get_fmt + function c_jac_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_jac_ + end function c_jac_smoother_get_id + end module mld_c_jac_smoother diff --git a/mlprec/mld_c_mumps_solver.F90 b/mlprec/mld_c_mumps_solver.F90 index 62d6a042..c957b9ec 100644 --- a/mlprec/mld_c_mumps_solver.F90 +++ b/mlprec/mld_c_mumps_solver.F90 @@ -81,6 +81,7 @@ module mld_c_mumps_solver procedure, pass(sv) :: csetr => c_mumps_solver_csetr procedure, pass(sv) :: default => c_mumps_solver_default procedure, nopass :: get_fmt => c_mumps_get_fmt + procedure, nopass :: get_id => c_mumps_get_id #if defined(HAVE_FINAL) final :: c_mumps_solver_finalize @@ -93,7 +94,8 @@ module mld_c_mumps_solver & c_mumps_solver_sizeof, c_mumps_solver_apply_vect,& & c_mumps_solver_seti, c_mumps_solver_setr, & & c_mumps_solver_cseti, c_mumps_solver_csetri, & - & c_mumps_solver_default + & c_mumps_solver_default, c_mumps_solver_get_fmt, & + & c_mumps_solver_get_id #if defined(HAVE_FINAL) private :: c_mumps_solver_finalize #endif @@ -136,7 +138,7 @@ module mld_c_mumps_solver end interface interface - subroutine c_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine c_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_c_mumps_solver_type, psb_c_vect_type, psb_spk_, & & psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,& @@ -148,7 +150,6 @@ module mld_c_mumps_solver type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -486,5 +487,12 @@ contains val = "MUMPS solver" end function c_mumps_get_fmt + function c_mumps_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_mumps_ + end function c_mumps_get_id + end module mld_c_mumps_solver diff --git a/mlprec/mld_c_onelev_mod.f90 b/mlprec/mld_c_onelev_mod.f90 index a2facb61..3ccff736 100644 --- a/mlprec/mld_c_onelev_mod.f90 +++ b/mlprec/mld_c_onelev_mod.f90 @@ -432,15 +432,14 @@ contains ! Arguments class(mld_c_onelev_type), target, intent(inout) :: lv - lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_vcycle_ml_ - lv%parms%aggr_alg = mld_dec_aggr_ + lv%parms%ml_cycle = mld_vcycle_ml_ + lv%parms%aggr_type = mld_vmb_ + lv%parms%par_aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ - lv%parms%aggr_kind = mld_smooth_prol_ + lv%parms%aggr_prol = mld_smooth_prol_ lv%parms%coarse_mat = mld_distr_mat_ - lv%parms%smoother_pos = mld_twoside_smooth_ lv%parms%aggr_omega_alg = mld_eig_est_ lv%parms%aggr_eig = mld_max_norm_ lv%parms%aggr_filter = mld_no_filter_mat_ diff --git a/mlprec/mld_c_prec_type.f90 b/mlprec/mld_c_prec_type.f90 index 92ecd8b2..6bd5ac45 100644 --- a/mlprec/mld_c_prec_type.f90 +++ b/mlprec/mld_c_prec_type.f90 @@ -88,12 +88,12 @@ module mld_c_prec_type ! ! Aggregation defaults: ! - ! 1. coarse_aggr_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) - integer(psb_ipk_) :: coarse_aggr_size = izero + ! 1. min_coarse_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) + integer(psb_ipk_) :: min_coarse_size = izero ! 2. maximum number of levels. Defaults to 20 - integer(psb_ipk_) :: max_prec_levs = 20_psb_ipk_ - ! 3. min_aggr_ratio = 1.5 - real(psb_spk_) :: min_aggr_ratio = 1.5_psb_spk_ + integer(psb_ipk_) :: max_levs = 20_psb_ipk_ + ! 3. min_cr_ratio = 1.5 + real(psb_spk_) :: min_cr_ratio = 1.5_psb_spk_ real(psb_spk_) :: op_complexity=szero ! ! Number of outer sweeps. Sometimes 2 V-cycles may be better than 1 W-cycle. @@ -577,9 +577,9 @@ contains endif call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_pre > 1) then + write(iout_,*) ' Number of smoother sweeps_pre : ',& + & prec%precv(1)%parms%sweeps_pre end if write(iout_,*) return @@ -588,9 +588,9 @@ contains write(iout_,*) 'Post smoother details' call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_post > 1) then + write(iout_,*) ' Number of smoother sweeps_post : ',& + & prec%precv(1)%parms%sweeps_post end if write(iout_,*) return @@ -884,9 +884,9 @@ contains select type(pout => precout) class is (mld_cprec_type) pout%ictxt = prec%ictxt - pout%coarse_aggr_size = prec%coarse_aggr_size - pout%max_prec_levs = prec%max_prec_levs - pout%coarse_aggr_size = prec%coarse_aggr_size + pout%max_levs = prec%max_levs + pout%min_coarse_size = prec%min_coarse_size + pout%min_cr_ratio = prec%min_cr_ratio pout%outer_sweeps = prec%outer_sweeps pout%op_complexity = prec%op_complexity if (allocated(prec%precv)) then diff --git a/mlprec/mld_c_slu_solver.F90 b/mlprec/mld_c_slu_solver.F90 index dcd9aaa4..36edd6fd 100644 --- a/mlprec/mld_c_slu_solver.F90 +++ b/mlprec/mld_c_slu_solver.F90 @@ -71,6 +71,8 @@ module mld_c_slu_solver procedure, pass(sv) :: free => c_slu_solver_free procedure, pass(sv) :: descr => c_slu_solver_descr procedure, pass(sv) :: sizeof => c_slu_solver_sizeof + procedure, nopass :: get_fmt => c_slu_get_fmt + procedure, nopass :: get_id => c_slu_get_id #if defined(HAVE_FINAL) final :: c_slu_solver_finalize #endif @@ -79,7 +81,8 @@ module mld_c_slu_solver private :: c_slu_solver_bld, c_slu_solver_apply, & & c_slu_solver_free, c_slu_solver_descr, & - & c_slu_solver_sizeof, c_slu_solver_apply_vect + & c_slu_solver_sizeof, c_slu_solver_apply_vect, & + & c_slu_solver_get_fmt, c_slu_solver_get_id #if defined(HAVE_FINAL) private :: c_slu_solver_finalize #endif @@ -248,7 +251,7 @@ contains end subroutine c_slu_solver_apply_vect - subroutine c_slu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine c_slu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -258,7 +261,6 @@ contains type(psb_cspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_c_slu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_cspmat_type), intent(in), target, optional :: b class(psb_c_base_sparse_mat), intent(in), optional :: amold @@ -280,42 +282,34 @@ contains call psb_info(ictxt, me, np) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' - - + + n_row = desc_a%get_local_rows() n_col = desc_a%get_local_cols() - - if (psb_toupper(upd) == 'F') then - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) - nrow_a = atmp%get_nrows() - call atmp%a%csclip(acoo,info,jmax=nrow_a) - call acsc%mv_from_coo(acoo,info) - nztota = acsc%get_nzeros() - ! Fix the entries to call C-base SuperLU - acsc%ia(:) = acsc%ia(:) - 1 - acsc%icp(:) = acsc%icp(:) - 1 - info = mld_cslu_fact(nrow_a,nztota,acsc%val,& - & acsc%icp,acsc%ia,sv%lufactors) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_cslu_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsc%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + + + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) + nrow_a = atmp%get_nrows() + call atmp%a%csclip(acoo,info,jmax=nrow_a) + call acsc%mv_from_coo(acoo,info) + nztota = acsc%get_nzeros() + ! Fix the entries to call C-base SuperLU + acsc%ia(:) = acsc%ia(:) - 1 + acsc%icp(:) = acsc%icp(:) - 1 + info = mld_cslu_fact(nrow_a,nztota,acsc%val,& + & acsc%icp,acsc%ia,sv%lufactors) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_cslu_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + + call acsc%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -417,5 +411,19 @@ contains val = val + sv%numsize return end function c_slu_solver_sizeof + + function c_slu_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "SuperLU solver" + end function c_slu_get_fmt + + function c_slu_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_slu_ + end function c_slu_get_id #endif end module mld_c_slu_solver diff --git a/mlprec/mld_c_sludist_solver.F90 b/mlprec/mld_c_sludist_solver.F90 deleted file mode 100644 index ed9ea171..00000000 --- a/mlprec/mld_c_sludist_solver.F90 +++ /dev/null @@ -1,430 +0,0 @@ -! -! -! MLD2P4 version 2.1 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.4) -! -! (C) Copyright 2008, 2010, 2012, 2015, 2017 -! -! Salvatore Filippone Cranfield University -! Ambra Abdullahi Hassan University of Rome Tor Vergata -! Alfredo Buttari CNRS-IRIT, Toulouse -! Pasqua D'Ambra ICAR-CNR, Naples -! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the MLD2P4 group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! -! File: mld_c_sludist_solver_mod.f90 -! -! Module: mld_c_sludist_solver_mod -! -! This module defines: -! - the mld_c_sludist_solver_type data structure containing the ingredients -! to interface with the SuperLU_Dist package. -! 1. The factorization is distributed (and thus exact) -! -! -! -module mld_c_sludist_solver - - use iso_c_binding - use mld_c_base_solver_mod - -#if defined(LONG_INTEGERS) - - type, extends(mld_c_base_solver_type) :: mld_c_sludist_solver_type - - end type mld_c_sludist_solver_type -#else - type, extends(mld_c_base_solver_type) :: mld_c_sludist_solver_type - type(c_ptr) :: lufactors=c_null_ptr - integer(c_long_long) :: symbsize=0, numsize=0 - contains - procedure, pass(sv) :: build => c_sludist_solver_bld - procedure, pass(sv) :: apply_a => c_sludist_solver_apply - procedure, pass(sv) :: apply_v => c_sludist_solver_apply_vect - procedure, pass(sv) :: free => c_sludist_solver_free - procedure, pass(sv) :: descr => c_sludist_solver_descr - procedure, pass(sv) :: sizeof => c_sludist_solver_sizeof -#if defined(HAVE_FINAL) - final :: c_sludist_solver_finalize -#endif - end type mld_c_sludist_solver_type - - - private :: c_sludist_solver_bld, c_sludist_solver_apply, & - & c_sludist_solver_free, c_sludist_solver_descr, & - & c_sludist_solver_sizeof, c_sludist_solver_apply_vect -#if defined(HAVE_FINAL) - private :: c_sludist_solver_finalize -#endif - - - interface - function mld_csludist_fact(n,nl,nnz,ifrst, & - & values,rowptr,colind,lufactors,npr,npc) & - & bind(c,name='mld_csludist_fact') result(info) - use iso_c_binding - integer(c_int), value :: n,nl,nnz,ifrst,npr,npc - integer(c_int) :: info - integer(c_int) :: rowptr(*),colind(*) - complex(c_float_complex) :: values(*) - type(c_ptr) :: lufactors - end function mld_csludist_fact - end interface - - interface - function mld_csludist_solve(itrans,n,nrhs, b, ldb, lufactors)& - & bind(c,name='mld_csludist_solve') result(info) - use iso_c_binding - integer(c_int) :: info - integer(c_int), value :: itrans,n,nrhs,ldb - complex(c_float_complex) :: b(ldb,*) - type(c_ptr), value :: lufactors - end function mld_csludist_solve - end interface - - interface - function mld_csludist_free(lufactors)& - & bind(c,name='mld_csludist_free') result(info) - use iso_c_binding - integer(c_int) :: info - type(c_ptr), value :: lufactors - end function mld_csludist_free - end interface - -contains - - subroutine c_sludist_solver_apply(alpha,sv,x,beta,y,desc_data,& - & trans,work,info,init,initu) - use psb_base_mod - implicit none - type(psb_desc_type), intent(in) :: desc_data - class(mld_c_sludist_solver_type), intent(inout) :: sv - complex(psb_spk_),intent(inout) :: x(:) - complex(psb_spk_),intent(inout) :: y(:) - complex(psb_spk_),intent(in) :: alpha,beta - character(len=1),intent(in) :: trans - complex(psb_spk_),target, intent(inout) :: work(:) - integer, intent(out) :: info - character, intent(in), optional :: init - complex(psb_spk_),intent(inout), optional :: initu(:) - - integer :: n_row,n_col - complex(psb_spk_), pointer :: ww(:) - integer :: ictxt,np,me,i, err_act - character :: trans_ - character(len=20) :: name='c_sludist_solver_apply' - - call psb_erractionsave(err_act) - - info = psb_success_ - - trans_ = psb_toupper(trans) - select case(trans_) - case('N') - case('T','C') - case default - call psb_errpush(psb_err_iarg_invalid_i_,name) - goto 9999 - end select - ! - ! For non-iterative solvers, init and initu are ignored. - ! - - - n_row = desc_data%get_local_rows() - n_col = desc_data%get_local_cols() - - if (n_col <= size(work)) then - ww => work(1:n_col) - else - allocate(ww(n_col),stat=info) - if (info /= psb_success_) then - info=psb_err_alloc_request_ - call psb_errpush(info,name,i_err=(/n_col,0,0,0,0/),& - & a_err='complex(psb_spk_)') - goto 9999 - end if - endif - - if (info == psb_success_)& - & call psb_geaxpby(cone,x,czero,ww,desc_data,info) - - select case(trans_) - case('N') - info = mld_csludist_solve(0,n_row,1,ww,n_row,sv%lufactors) - case('T') - info = mld_csludist_solve(1,n_row,1,ww,n_row,sv%lufactors) - case('C') - info = mld_csludist_solve(2,n_row,1,ww,n_row,sv%lufactors) - case default - call psb_errpush(psb_err_internal_error_,& - & name,a_err='Invalid TRANS in subsolve') - goto 9999 - end select - - if (info == psb_success_)& - & call psb_geaxpby(alpha,ww,beta,y,desc_data,info) - - - if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,& - & name,a_err='Error in subsolve') - goto 9999 - endif - - if (n_col > size(work)) then - deallocate(ww) - endif - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - - end subroutine c_sludist_solver_apply - - subroutine c_sludist_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& - & trans,work,info,init,initu) - use psb_base_mod - implicit none - type(psb_desc_type), intent(in) :: desc_data - class(mld_c_sludist_solver_type), intent(inout) :: sv - type(psb_c_vect_type),intent(inout) :: x - type(psb_c_vect_type),intent(inout) :: y - complex(psb_spk_),intent(in) :: alpha,beta - character(len=1),intent(in) :: trans - complex(psb_spk_),target, intent(inout) :: work(:) - integer, intent(out) :: info - character, intent(in), optional :: init - type(psb_c_vect_type),intent(inout), optional :: initu - - integer :: err_act - character(len=20) :: name='c_sludist_solver_apply_vect' - - call psb_erractionsave(err_act) - - info = psb_success_ - ! - ! For non-iterative solvers, init and initu are ignored. - ! - - - call x%v%sync() - call y%v%sync() - call sv%apply(alpha,x%v%v,beta,y%v%v,desc_data,trans,work,info) - call y%v%set_host() - if (info /= 0) goto 9999 - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - - end subroutine c_sludist_solver_apply_vect - - subroutine c_sludist_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) - - use psb_base_mod - - Implicit None - - ! Arguments - type(psb_cspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a - class(mld_c_sludist_solver_type), intent(inout) :: sv - character, intent(in) :: upd - integer, intent(out) :: info - type(psb_cspmat_type), intent(in), target, optional :: b - 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 - ! Local variables - type(psb_cspmat_type) :: atmp - type(psb_c_csr_sparse_mat) :: acsr - integer :: n_row,n_col, nrow_a, nztota, nglob, nzt, npr, npc - integer :: ifrst, ibcheck - integer :: ictxt,np,me,i, err_act, debug_unit, debug_level - character(len=20) :: name='c_sludist_solver_bld', ch_err - - info=psb_success_ - call psb_erractionsave(err_act) - debug_unit = psb_get_debug_unit() - debug_level = psb_get_debug_level() - ictxt = desc_a%get_context() - call psb_info(ictxt, me, np) - npr = np - npc = 1 - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),' start' - - - if (psb_toupper(upd) == 'F') then - - n_row = desc_a%get_local_rows() - n_col = desc_a%get_local_cols() - nglob = desc_a%get_global_rows() - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) - call atmp%mv_to(acsr) - nrow_a = acsr%get_nrows() - nztota = acsr%get_nzeros() - ! Fix the entries to call C-base SuperLU - call psb_loc_to_glob(1,ifrst,desc_a,info) - call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info) - call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I') - acsr%ja(:) = acsr%ja(:) - 1 - acsr%irp(:) = acsr%irp(:) - 1 - ifrst = ifrst - 1 - info = mld_csludist_fact(nglob,nrow_a,nztota,ifrst,& - & acsr%val,acsr%irp,acsr%ja,sv%lufactors,& - & npr,npc) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_csludist_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsr%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - - end if - - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),' end' - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - end subroutine c_sludist_solver_bld - - subroutine c_sludist_solver_free(sv,info) - - Implicit None - - ! Arguments - class(mld_c_sludist_solver_type), intent(inout) :: sv - integer, intent(out) :: info - Integer :: err_act - character(len=20) :: name='c_sludist_solver_free' - - call psb_erractionsave(err_act) - - - info = mld_csludist_free(sv%lufactors) - - if (info /= psb_success_) goto 9999 - sv%lufactors = c_null_ptr - - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - end subroutine c_sludist_solver_free - -#if defined(HAVE_FINAL) - subroutine c_sludist_solver_finalize(sv) - - Implicit None - - ! Arguments - type(mld_c_sludist_solver_type), intent(inout) :: sv - integer :: info - Integer :: err_act - character(len=20) :: name='c_sludist_solver_finalize' - - call sv%free(info) - - return - - end subroutine c_sludist_solver_finalize -#endif - - subroutine c_sludist_solver_descr(sv,info,iout,coarse) - - Implicit None - - ! Arguments - class(mld_c_sludist_solver_type), intent(in) :: sv - integer, intent(out) :: info - integer, intent(in), optional :: iout - logical, intent(in), optional :: coarse - - ! Local variables - integer :: err_act - integer :: ictxt, me, np - character(len=20), parameter :: name='mld_c_sludist_solver_descr' - integer :: iout_ - - call psb_erractionsave(err_act) - info = psb_success_ - if (present(iout)) then - iout_ = iout - else - iout_ = 6 - endif - - write(iout_,*) ' SuperLU_Dist Sparse Factorization Solver. ' - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - end subroutine c_sludist_solver_descr - - function c_sludist_solver_sizeof(sv) result(val) - - implicit none - ! Arguments - class(mld_c_sludist_solver_type), intent(in) :: sv - integer(psb_long_int_k_) :: val - integer :: i - - val = 2*psb_sizeof_int + psb_sizeof_dp - val = val + sv%symbsize - val = val + sv%numsize - return - end function c_sludist_solver_sizeof -#endif -end module mld_c_sludist_solver diff --git a/mlprec/mld_d_as_smoother.f90 b/mlprec/mld_d_as_smoother.f90 index 5c44f10b..e6edff3a 100644 --- a/mlprec/mld_d_as_smoother.f90 +++ b/mlprec/mld_d_as_smoother.f90 @@ -94,12 +94,13 @@ module mld_d_as_smoother procedure, pass(sm) :: default => d_as_smoother_default procedure, pass(sm) :: get_nzeros => d_as_smoother_get_nzeros procedure, nopass :: get_fmt => d_as_smoother_get_fmt + procedure, nopass :: get_id => d_as_smoother_get_id end type mld_d_as_smoother_type private :: d_as_smoother_descr, d_as_smoother_sizeof, & & d_as_smoother_default, d_as_smoother_get_nzeros, & - & d_as_smoother_get_fmt + & d_as_smoother_get_fmt, d_as_smoother_get_id character(len=6), parameter, private :: & & restrict_names(0:4)=(/'none ','halo ',' ',' ',' '/) @@ -221,7 +222,7 @@ module mld_d_as_smoother end interface interface - subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_d_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_dspmat_type, psb_d_vect_type, psb_d_base_vect_type, & & psb_dpk_, mld_d_as_smoother_type, psb_long_int_k_, & & psb_desc_type, psb_d_base_sparse_mat, psb_ipk_,& @@ -230,7 +231,6 @@ module mld_d_as_smoother type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -396,12 +396,13 @@ contains ! Arguments class(mld_d_as_smoother_type), intent(inout) :: sm - + ! + ! Default: RAS with 1 overlap layer + ! sm%restr = psb_halo_ sm%prol = psb_none_ sm%novr = 1 - if (allocated(sm%sv)) then call sm%sv%default() end if @@ -465,4 +466,11 @@ contains val = "Schwarz smoother" end function d_as_smoother_get_fmt + function d_as_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_as_ + end function d_as_smoother_get_id + end module mld_d_as_smoother diff --git a/mlprec/mld_d_base_smoother_mod.f90 b/mlprec/mld_d_base_smoother_mod.f90 index 04084b51..e974d10e 100644 --- a/mlprec/mld_d_base_smoother_mod.f90 +++ b/mlprec/mld_d_base_smoother_mod.f90 @@ -123,11 +123,13 @@ module mld_d_base_smoother_mod procedure, pass(sm) :: get_nzeros => d_base_smoother_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => d_base_smoother_get_fmt + procedure, nopass :: get_id => d_base_smoother_get_id end type mld_d_base_smoother_type private :: d_base_smoother_sizeof, d_base_smoother_get_fmt, & - & d_base_smoother_default, d_base_smoother_get_nzeros + & d_base_smoother_default, d_base_smoother_get_nzeros, & + & d_base_smoother_get_id @@ -259,7 +261,7 @@ module mld_d_base_smoother_mod end interface interface - subroutine mld_d_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_d_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, & & psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, & & mld_d_base_smoother_type, psb_ipk_, psb_i_base_vect_type @@ -267,7 +269,6 @@ module mld_d_base_smoother_mod type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -394,4 +395,11 @@ contains val = "Base smoother" end function d_base_smoother_get_fmt + function d_base_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_base_smooth_ + end function d_base_smoother_get_id + end module mld_d_base_smoother_mod diff --git a/mlprec/mld_d_base_solver_mod.f90 b/mlprec/mld_d_base_solver_mod.f90 index bef4520f..0586353e 100644 --- a/mlprec/mld_d_base_solver_mod.f90 +++ b/mlprec/mld_d_base_solver_mod.f90 @@ -108,12 +108,13 @@ module mld_d_base_solver_mod procedure, pass(sv) :: get_nzeros => d_base_solver_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => d_base_solver_get_fmt + procedure, nopass :: get_id => d_base_solver_get_id procedure, nopass :: is_iterative => d_base_solver_is_iterative end type mld_d_base_solver_type private :: d_base_solver_sizeof, d_base_solver_default,& & d_base_solver_get_nzeros, d_base_solver_get_fmt, & - & d_base_solver_is_iterative + & d_base_solver_is_iterative, d_base_solver_get_id interface @@ -158,7 +159,7 @@ module mld_d_base_solver_mod end interface interface - subroutine mld_d_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_d_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, & & psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, & & mld_d_base_solver_type, psb_ipk_, psb_i_base_vect_type @@ -168,7 +169,6 @@ module mld_d_base_solver_mod type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -406,4 +406,12 @@ contains val = .false. end function d_base_solver_is_iterative + function d_base_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function d_base_solver_get_id + + end module mld_d_base_solver_mod diff --git a/mlprec/mld_d_diag_solver.f90 b/mlprec/mld_d_diag_solver.f90 index de4cfa08..d335f6bd 100644 --- a/mlprec/mld_d_diag_solver.f90 +++ b/mlprec/mld_d_diag_solver.f90 @@ -67,12 +67,13 @@ module mld_d_diag_solver procedure, pass(sv) :: sizeof => d_diag_solver_sizeof procedure, pass(sv) :: get_nzeros => d_diag_solver_get_nzeros procedure, nopass :: get_fmt => d_diag_solver_get_fmt + procedure, nopass :: get_id => d_diag_solver_get_id end type mld_d_diag_solver_type private :: d_diag_solver_free, d_diag_solver_descr, & & d_diag_solver_sizeof, d_diag_solver_get_nzeros, & - & d_diag_solver_get_fmt + & d_diag_solver_get_fmt, d_diag_solver_get_id interface @@ -114,14 +115,13 @@ module mld_d_diag_solver end interface interface - subroutine mld_d_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_d_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, & & psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, & & mld_d_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -267,5 +267,11 @@ contains val = "Diag solver" end function d_diag_solver_get_fmt + function d_diag_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_diag_scale_ + end function d_diag_solver_get_id end module mld_d_diag_solver diff --git a/mlprec/mld_d_gs_solver.f90 b/mlprec/mld_d_gs_solver.f90 index e7da6235..d8456fc2 100644 --- a/mlprec/mld_d_gs_solver.f90 +++ b/mlprec/mld_d_gs_solver.f90 @@ -80,6 +80,7 @@ module mld_d_gs_solver procedure, pass(sv) :: sizeof => d_gs_solver_sizeof procedure, pass(sv) :: get_nzeros => d_gs_solver_get_nzeros procedure, nopass :: get_fmt => d_gs_solver_get_fmt + procedure, nopass :: get_id => d_gs_solver_get_id procedure, nopass :: is_iterative => d_gs_solver_is_iterative end type mld_d_gs_solver_type @@ -89,6 +90,7 @@ module mld_d_gs_solver procedure, pass(sv) :: apply_v => mld_d_bwgs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_d_bwgs_solver_apply procedure, nopass :: get_fmt => d_bwgs_solver_get_fmt + procedure, nopass :: get_id => d_bwgs_solver_get_id procedure, pass(sv) :: descr => d_bwgs_solver_descr end type mld_d_bwgs_solver_type @@ -101,8 +103,8 @@ module mld_d_gs_solver & d_gs_solver_apply_vect, d_gs_solver_get_nzeros, & & d_gs_solver_get_fmt, d_gs_solver_check,& & d_gs_solver_is_iterative, & - & d_bwgs_solver_get_fmt, d_bwgs_solver_descr - + & d_bwgs_solver_get_fmt, d_bwgs_solver_descr, & + & d_gs_solver_get_id, d_bwgs_solver_get_id interface subroutine mld_d_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -174,7 +176,7 @@ module mld_d_gs_solver end interface interface - subroutine mld_d_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_d_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_d_gs_solver_type, psb_d_vect_type, psb_dpk_, & & psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -182,14 +184,13 @@ module mld_d_gs_solver type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b 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_d_gs_solver_bld - subroutine mld_d_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_d_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_d_bwgs_solver_type, psb_d_vect_type, psb_dpk_, & & psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -197,7 +198,6 @@ module mld_d_gs_solver type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -574,6 +574,12 @@ contains val = "Forward Gauss-Seidel solver" end function d_gs_solver_get_fmt + function d_gs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_gs_ + end function d_gs_solver_get_id ! ! If this is true, then the solver needs a starting @@ -631,4 +637,11 @@ contains val = "Backward Gauss-Seidel solver" end function d_bwgs_solver_get_fmt + function d_bwgs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_bwgs_ + end function d_bwgs_solver_get_id + end module mld_d_gs_solver diff --git a/mlprec/mld_d_id_solver.f90 b/mlprec/mld_d_id_solver.f90 index f94dd36d..e1e9e5fe 100644 --- a/mlprec/mld_d_id_solver.f90 +++ b/mlprec/mld_d_id_solver.f90 @@ -56,12 +56,13 @@ module mld_d_id_solver procedure, pass(sv) :: free => d_id_solver_free procedure, pass(sv) :: descr => d_id_solver_descr procedure, nopass :: get_fmt => d_id_solver_get_fmt + procedure, nopass :: get_id => d_id_solver_get_id end type mld_d_id_solver_type private :: d_id_solver_bld, & & d_id_solver_free, d_id_solver_get_fmt, & - & d_id_solver_descr + & d_id_solver_descr, d_id_solver_get_id interface subroutine mld_d_id_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -118,7 +119,7 @@ module mld_d_id_solver contains - subroutine d_id_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine d_id_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None @@ -126,7 +127,6 @@ contains type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_id_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -193,5 +193,11 @@ contains val = "Identity solver" end function d_id_solver_get_fmt + function d_id_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function d_id_solver_get_id end module mld_d_id_solver diff --git a/mlprec/mld_d_ilu_solver.f90 b/mlprec/mld_d_ilu_solver.f90 index 8c236b8c..0d3e5e9d 100644 --- a/mlprec/mld_d_ilu_solver.f90 +++ b/mlprec/mld_d_ilu_solver.f90 @@ -88,6 +88,7 @@ module mld_d_ilu_solver procedure, pass(sv) :: sizeof => d_ilu_solver_sizeof procedure, pass(sv) :: get_nzeros => d_ilu_solver_get_nzeros procedure, nopass :: get_fmt => d_ilu_solver_get_fmt + procedure, nopass :: get_id => d_ilu_solver_get_id end type mld_d_ilu_solver_type @@ -97,7 +98,7 @@ module mld_d_ilu_solver & d_ilu_solver_descr, d_ilu_solver_sizeof, & & d_ilu_solver_default, d_ilu_solver_dmp, & & d_ilu_solver_apply_vect, d_ilu_solver_get_nzeros, & - & d_ilu_solver_get_fmt, d_ilu_solver_check + & d_ilu_solver_get_fmt, d_ilu_solver_check, d_ilu_solver_get_id interface @@ -139,7 +140,7 @@ module mld_d_ilu_solver end interface interface - subroutine mld_d_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_d_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_d_ilu_solver_type, psb_d_vect_type, psb_dpk_, & & psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -147,7 +148,6 @@ module mld_d_ilu_solver type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -550,4 +550,11 @@ contains val = "ILU solver" end function d_ilu_solver_get_fmt + function d_ilu_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_ilu_n_ + end function d_ilu_solver_get_id + end module mld_d_ilu_solver diff --git a/mlprec/mld_d_jac_smoother.f90 b/mlprec/mld_d_jac_smoother.f90 index df557da6..c872521c 100644 --- a/mlprec/mld_d_jac_smoother.f90 +++ b/mlprec/mld_d_jac_smoother.f90 @@ -74,12 +74,13 @@ module mld_d_jac_smoother procedure, pass(sm) :: sizeof => d_jac_smoother_sizeof procedure, pass(sm) :: get_nzeros => d_jac_smoother_get_nzeros procedure, nopass :: get_fmt => d_jac_smoother_get_fmt + procedure, nopass :: get_id => d_jac_smoother_get_id end type mld_d_jac_smoother_type private :: d_jac_smoother_free, d_jac_smoother_descr, & & d_jac_smoother_sizeof, d_jac_smoother_get_nzeros, & - & d_jac_smoother_get_fmt + & d_jac_smoother_get_fmt, d_jac_smoother_get_id interface @@ -124,14 +125,13 @@ module mld_d_jac_smoother end interface interface - subroutine mld_d_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_d_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, mld_d_jac_smoother_type, psb_d_vect_type, psb_dpk_, & & psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,& & psb_ipk_, psb_i_base_vect_type type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_d_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -295,4 +295,11 @@ contains val = "Jacobi smoother" end function d_jac_smoother_get_fmt + function d_jac_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_jac_ + end function d_jac_smoother_get_id + end module mld_d_jac_smoother diff --git a/mlprec/mld_d_mumps_solver.F90 b/mlprec/mld_d_mumps_solver.F90 index cd55d7ee..80b1e579 100644 --- a/mlprec/mld_d_mumps_solver.F90 +++ b/mlprec/mld_d_mumps_solver.F90 @@ -81,6 +81,7 @@ module mld_d_mumps_solver procedure, pass(sv) :: csetr => d_mumps_solver_csetr procedure, pass(sv) :: default => d_mumps_solver_default procedure, nopass :: get_fmt => d_mumps_get_fmt + procedure, nopass :: get_id => d_mumps_get_id #if defined(HAVE_FINAL) final :: d_mumps_solver_finalize @@ -93,7 +94,8 @@ module mld_d_mumps_solver & d_mumps_solver_sizeof, d_mumps_solver_apply_vect,& & d_mumps_solver_seti, d_mumps_solver_setr, & & d_mumps_solver_cseti, d_mumps_solver_csetri, & - & d_mumps_solver_default + & d_mumps_solver_default, d_mumps_solver_get_fmt, & + & d_mumps_solver_get_id #if defined(HAVE_FINAL) private :: d_mumps_solver_finalize #endif @@ -136,7 +138,7 @@ module mld_d_mumps_solver end interface interface - subroutine d_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine d_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_d_mumps_solver_type, psb_d_vect_type, psb_dpk_, & & psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,& @@ -148,7 +150,6 @@ module mld_d_mumps_solver type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -486,5 +487,12 @@ contains val = "MUMPS solver" end function d_mumps_get_fmt + function d_mumps_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_mumps_ + end function d_mumps_get_id + end module mld_d_mumps_solver diff --git a/mlprec/mld_d_onelev_mod.f90 b/mlprec/mld_d_onelev_mod.f90 index fecfd8b5..131d7d99 100644 --- a/mlprec/mld_d_onelev_mod.f90 +++ b/mlprec/mld_d_onelev_mod.f90 @@ -432,15 +432,14 @@ contains ! Arguments class(mld_d_onelev_type), target, intent(inout) :: lv - lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_vcycle_ml_ - lv%parms%aggr_alg = mld_dec_aggr_ + lv%parms%ml_cycle = mld_vcycle_ml_ + lv%parms%aggr_type = mld_vmb_ + lv%parms%par_aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ - lv%parms%aggr_kind = mld_smooth_prol_ + lv%parms%aggr_prol = mld_smooth_prol_ lv%parms%coarse_mat = mld_distr_mat_ - lv%parms%smoother_pos = mld_twoside_smooth_ lv%parms%aggr_omega_alg = mld_eig_est_ lv%parms%aggr_eig = mld_max_norm_ lv%parms%aggr_filter = mld_no_filter_mat_ diff --git a/mlprec/mld_d_prec_type.f90 b/mlprec/mld_d_prec_type.f90 index 07aafbc5..cf8a65ee 100644 --- a/mlprec/mld_d_prec_type.f90 +++ b/mlprec/mld_d_prec_type.f90 @@ -88,12 +88,12 @@ module mld_d_prec_type ! ! Aggregation defaults: ! - ! 1. coarse_aggr_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) - integer(psb_ipk_) :: coarse_aggr_size = izero + ! 1. min_coarse_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) + integer(psb_ipk_) :: min_coarse_size = izero ! 2. maximum number of levels. Defaults to 20 - integer(psb_ipk_) :: max_prec_levs = 20_psb_ipk_ - ! 3. min_aggr_ratio = 1.5 - real(psb_dpk_) :: min_aggr_ratio = 1.5_psb_dpk_ + integer(psb_ipk_) :: max_levs = 20_psb_ipk_ + ! 3. min_cr_ratio = 1.5 + real(psb_dpk_) :: min_cr_ratio = 1.5_psb_dpk_ real(psb_dpk_) :: op_complexity=dzero ! ! Number of outer sweeps. Sometimes 2 V-cycles may be better than 1 W-cycle. @@ -577,9 +577,9 @@ contains endif call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_pre > 1) then + write(iout_,*) ' Number of smoother sweeps_pre : ',& + & prec%precv(1)%parms%sweeps_pre end if write(iout_,*) return @@ -588,9 +588,9 @@ contains write(iout_,*) 'Post smoother details' call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_post > 1) then + write(iout_,*) ' Number of smoother sweeps_post : ',& + & prec%precv(1)%parms%sweeps_post end if write(iout_,*) return @@ -884,9 +884,9 @@ contains select type(pout => precout) class is (mld_dprec_type) pout%ictxt = prec%ictxt - pout%coarse_aggr_size = prec%coarse_aggr_size - pout%max_prec_levs = prec%max_prec_levs - pout%coarse_aggr_size = prec%coarse_aggr_size + pout%max_levs = prec%max_levs + pout%min_coarse_size = prec%min_coarse_size + pout%min_cr_ratio = prec%min_cr_ratio pout%outer_sweeps = prec%outer_sweeps pout%op_complexity = prec%op_complexity if (allocated(prec%precv)) then diff --git a/mlprec/mld_d_slu_solver.F90 b/mlprec/mld_d_slu_solver.F90 index ead03836..a53b70ae 100644 --- a/mlprec/mld_d_slu_solver.F90 +++ b/mlprec/mld_d_slu_solver.F90 @@ -71,6 +71,8 @@ module mld_d_slu_solver procedure, pass(sv) :: free => d_slu_solver_free procedure, pass(sv) :: descr => d_slu_solver_descr procedure, pass(sv) :: sizeof => d_slu_solver_sizeof + procedure, nopass :: get_fmt => d_slu_get_fmt + procedure, nopass :: get_id => d_slu_get_id #if defined(HAVE_FINAL) final :: d_slu_solver_finalize #endif @@ -79,7 +81,8 @@ module mld_d_slu_solver private :: d_slu_solver_bld, d_slu_solver_apply, & & d_slu_solver_free, d_slu_solver_descr, & - & d_slu_solver_sizeof, d_slu_solver_apply_vect + & d_slu_solver_sizeof, d_slu_solver_apply_vect, & + & d_slu_solver_get_fmt, d_slu_solver_get_id #if defined(HAVE_FINAL) private :: d_slu_solver_finalize #endif @@ -248,7 +251,7 @@ contains end subroutine d_slu_solver_apply_vect - subroutine d_slu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine d_slu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -258,7 +261,6 @@ contains type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_slu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -280,42 +282,34 @@ contains call psb_info(ictxt, me, np) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' - - + + n_row = desc_a%get_local_rows() n_col = desc_a%get_local_cols() - - if (psb_toupper(upd) == 'F') then - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) - nrow_a = atmp%get_nrows() - call atmp%a%csclip(acoo,info,jmax=nrow_a) - call acsc%mv_from_coo(acoo,info) - nztota = acsc%get_nzeros() - ! Fix the entries to call C-base SuperLU - acsc%ia(:) = acsc%ia(:) - 1 - acsc%icp(:) = acsc%icp(:) - 1 - info = mld_dslu_fact(nrow_a,nztota,acsc%val,& - & acsc%icp,acsc%ia,sv%lufactors) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_dslu_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsc%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + + + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) + nrow_a = atmp%get_nrows() + call atmp%a%csclip(acoo,info,jmax=nrow_a) + call acsc%mv_from_coo(acoo,info) + nztota = acsc%get_nzeros() + ! Fix the entries to call C-base SuperLU + acsc%ia(:) = acsc%ia(:) - 1 + acsc%icp(:) = acsc%icp(:) - 1 + info = mld_dslu_fact(nrow_a,nztota,acsc%val,& + & acsc%icp,acsc%ia,sv%lufactors) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_dslu_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + + call acsc%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -417,5 +411,19 @@ contains val = val + sv%numsize return end function d_slu_solver_sizeof + + function d_slu_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "SuperLU solver" + end function d_slu_get_fmt + + function d_slu_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_slu_ + end function d_slu_get_id #endif end module mld_d_slu_solver diff --git a/mlprec/mld_d_sludist_solver.F90 b/mlprec/mld_d_sludist_solver.F90 index eec18dbb..cb65a98a 100644 --- a/mlprec/mld_d_sludist_solver.F90 +++ b/mlprec/mld_d_sludist_solver.F90 @@ -70,6 +70,8 @@ module mld_d_sludist_solver procedure, pass(sv) :: free => d_sludist_solver_free procedure, pass(sv) :: descr => d_sludist_solver_descr procedure, pass(sv) :: sizeof => d_sludist_solver_sizeof + procedure, nopass :: get_fmt => d_sludist_get_fmt + procedure, nopass :: get_id => d_sludist_get_id #if defined(HAVE_FINAL) final :: d_sludist_solver_finalize #endif @@ -78,7 +80,8 @@ module mld_d_sludist_solver private :: d_sludist_solver_bld, d_sludist_solver_apply, & & d_sludist_solver_free, d_sludist_solver_descr, & - & d_sludist_solver_sizeof, d_sludist_solver_apply_vect + & d_sludist_solver_sizeof, d_sludist_solver_apply_vect, & + & d_sludist_solver_get_fmt, d_sludist_solver_get_id #if defined(HAVE_FINAL) private :: d_sludist_solver_finalize #endif @@ -250,7 +253,7 @@ contains end subroutine d_sludist_solver_apply_vect - subroutine d_sludist_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine d_sludist_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -260,7 +263,6 @@ contains type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_sludist_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -286,45 +288,37 @@ contains & write(debug_unit,*) me,' ',trim(name),' start' - if (psb_toupper(upd) == 'F') then - - n_row = desc_a%get_local_rows() - n_col = desc_a%get_local_cols() - nglob = desc_a%get_global_rows() - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) - call atmp%mv_to(acsr) - nrow_a = acsr%get_nrows() - nztota = acsr%get_nzeros() - ! Fix the entries to call C-base SuperLU - call psb_loc_to_glob(1,ifrst,desc_a,info) - call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info) - call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I') - acsr%ja(:) = acsr%ja(:) - 1 - acsr%irp(:) = acsr%irp(:) - 1 - ifrst = ifrst - 1 - info = mld_dsludist_fact(nglob,nrow_a,nztota,ifrst,& - & acsr%val,acsr%irp,acsr%ja,sv%lufactors,& - & npr,npc) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_dsludist_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsr%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + + n_row = desc_a%get_local_rows() + n_col = desc_a%get_local_cols() + nglob = desc_a%get_global_rows() + + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) + call atmp%mv_to(acsr) + nrow_a = acsr%get_nrows() + nztota = acsr%get_nzeros() + ! Fix the entries to call C-base SuperLU + call psb_loc_to_glob(1,ifrst,desc_a,info) + call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info) + call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I') + acsr%ja(:) = acsr%ja(:) - 1 + acsr%irp(:) = acsr%irp(:) - 1 + ifrst = ifrst - 1 + info = mld_dsludist_fact(nglob,nrow_a,nztota,ifrst,& + & acsr%val,acsr%irp,acsr%ja,sv%lufactors,& + & npr,npc) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_dsludist_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + + call acsr%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -426,5 +420,19 @@ contains val = val + sv%numsize return end function d_sludist_solver_sizeof + + function d_sludist_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "SuperLU_Dist solver" + end function d_sludist_get_fmt + + function d_sludist_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_sludist_ + end function d_sludist_get_id #endif end module mld_d_sludist_solver diff --git a/mlprec/mld_d_umf_solver.F90 b/mlprec/mld_d_umf_solver.F90 index 5a06ca19..78175c67 100644 --- a/mlprec/mld_d_umf_solver.F90 +++ b/mlprec/mld_d_umf_solver.F90 @@ -70,6 +70,8 @@ module mld_d_umf_solver procedure, pass(sv) :: free => d_umf_solver_free procedure, pass(sv) :: descr => d_umf_solver_descr procedure, pass(sv) :: sizeof => d_umf_solver_sizeof + procedure, nopass :: get_fmt => d_umf_get_fmt + procedure, nopass :: get_id => d_umf_get_id #if defined(HAVE_FINAL) final :: d_umf_solver_finalize #endif @@ -78,7 +80,8 @@ module mld_d_umf_solver private :: d_umf_solver_bld, d_umf_solver_apply, & & d_umf_solver_free, d_umf_solver_descr, & - & d_umf_solver_sizeof, d_umf_solver_apply_vect + & d_umf_solver_sizeof, d_umf_solver_apply_vect, & + & d_umf_solver_get_fmt, d_umf_solver_get_id #if defined(HAVE_FINAL) private :: d_umf_solver_finalize #endif @@ -252,7 +255,7 @@ contains end subroutine d_umf_solver_apply_vect - subroutine d_umf_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine d_umf_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -262,7 +265,6 @@ contains type(psb_dspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_d_umf_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_dspmat_type), intent(in), target, optional :: b class(psb_d_base_sparse_mat), intent(in), optional :: amold @@ -288,37 +290,28 @@ contains n_row = desc_a%get_local_rows() n_col = desc_a%get_local_cols() - if (psb_toupper(upd) == 'F') then - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='csc',dupl=psb_dupl_add_) - call atmp%mv_to(acsc) - nrow_a = acsc%get_nrows() - nztota = acsc%get_nzeros() - ! Fix the entres to call C-base UMFPACK. - acsc%ia(:) = acsc%ia(:) - 1 - acsc%icp(:) = acsc%icp(:) - 1 - info = mld_dumf_fact(nrow_a,nztota,acsc%val,& - & acsc%ia,acsc%icp,sv%symbolic,sv%numeric,& - & sv%symbsize,sv%numsize) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_dumf_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsc%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='csc',dupl=psb_dupl_add_) + call atmp%mv_to(acsc) + nrow_a = acsc%get_nrows() + nztota = acsc%get_nzeros() + ! Fix the entres to call C-base UMFPACK. + acsc%ia(:) = acsc%ia(:) - 1 + acsc%icp(:) = acsc%icp(:) - 1 + info = mld_dumf_fact(nrow_a,nztota,acsc%val,& + & acsc%ia,acsc%icp,sv%symbolic,sv%numeric,& + & sv%symbsize,sv%numsize) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_dumf_fact' + call psb_errpush(info,name,a_err=ch_err) goto 9999 - end if + + call acsc%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -422,5 +415,19 @@ contains val = val + sv%numsize return end function d_umf_solver_sizeof + + function d_umf_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "UMFPACK solver" + end function d_umf_get_fmt + + function d_umf_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_umf_ + end function d_umf_get_id #endif end module mld_d_umf_solver diff --git a/mlprec/mld_s_as_smoother.f90 b/mlprec/mld_s_as_smoother.f90 index ae123ace..bd49c8df 100644 --- a/mlprec/mld_s_as_smoother.f90 +++ b/mlprec/mld_s_as_smoother.f90 @@ -94,12 +94,13 @@ module mld_s_as_smoother procedure, pass(sm) :: default => s_as_smoother_default procedure, pass(sm) :: get_nzeros => s_as_smoother_get_nzeros procedure, nopass :: get_fmt => s_as_smoother_get_fmt + procedure, nopass :: get_id => s_as_smoother_get_id end type mld_s_as_smoother_type private :: s_as_smoother_descr, s_as_smoother_sizeof, & & s_as_smoother_default, s_as_smoother_get_nzeros, & - & s_as_smoother_get_fmt + & s_as_smoother_get_fmt, s_as_smoother_get_id character(len=6), parameter, private :: & & restrict_names(0:4)=(/'none ','halo ',' ',' ',' '/) @@ -221,7 +222,7 @@ module mld_s_as_smoother end interface interface - subroutine mld_s_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_s_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_sspmat_type, psb_s_vect_type, psb_s_base_vect_type, & & psb_spk_, mld_s_as_smoother_type, psb_long_int_k_, & & psb_desc_type, psb_s_base_sparse_mat, psb_ipk_,& @@ -230,7 +231,6 @@ module mld_s_as_smoother type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -396,12 +396,13 @@ contains ! Arguments class(mld_s_as_smoother_type), intent(inout) :: sm - + ! + ! Default: RAS with 1 overlap layer + ! sm%restr = psb_halo_ sm%prol = psb_none_ sm%novr = 1 - if (allocated(sm%sv)) then call sm%sv%default() end if @@ -465,4 +466,11 @@ contains val = "Schwarz smoother" end function s_as_smoother_get_fmt + function s_as_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_as_ + end function s_as_smoother_get_id + end module mld_s_as_smoother diff --git a/mlprec/mld_s_base_smoother_mod.f90 b/mlprec/mld_s_base_smoother_mod.f90 index 63eb4441..d3e2f02a 100644 --- a/mlprec/mld_s_base_smoother_mod.f90 +++ b/mlprec/mld_s_base_smoother_mod.f90 @@ -123,11 +123,13 @@ module mld_s_base_smoother_mod procedure, pass(sm) :: get_nzeros => s_base_smoother_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => s_base_smoother_get_fmt + procedure, nopass :: get_id => s_base_smoother_get_id end type mld_s_base_smoother_type private :: s_base_smoother_sizeof, s_base_smoother_get_fmt, & - & s_base_smoother_default, s_base_smoother_get_nzeros + & s_base_smoother_default, s_base_smoother_get_nzeros, & + & s_base_smoother_get_id @@ -259,7 +261,7 @@ module mld_s_base_smoother_mod end interface interface - subroutine mld_s_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_s_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, & & psb_s_vect_type, psb_s_base_vect_type, psb_spk_, & & mld_s_base_smoother_type, psb_ipk_, psb_i_base_vect_type @@ -267,7 +269,6 @@ module mld_s_base_smoother_mod type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -394,4 +395,11 @@ contains val = "Base smoother" end function s_base_smoother_get_fmt + function s_base_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_base_smooth_ + end function s_base_smoother_get_id + end module mld_s_base_smoother_mod diff --git a/mlprec/mld_s_base_solver_mod.f90 b/mlprec/mld_s_base_solver_mod.f90 index fd55b76d..c69f8153 100644 --- a/mlprec/mld_s_base_solver_mod.f90 +++ b/mlprec/mld_s_base_solver_mod.f90 @@ -108,12 +108,13 @@ module mld_s_base_solver_mod procedure, pass(sv) :: get_nzeros => s_base_solver_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => s_base_solver_get_fmt + procedure, nopass :: get_id => s_base_solver_get_id procedure, nopass :: is_iterative => s_base_solver_is_iterative end type mld_s_base_solver_type private :: s_base_solver_sizeof, s_base_solver_default,& & s_base_solver_get_nzeros, s_base_solver_get_fmt, & - & s_base_solver_is_iterative + & s_base_solver_is_iterative, s_base_solver_get_id interface @@ -158,7 +159,7 @@ module mld_s_base_solver_mod end interface interface - subroutine mld_s_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_s_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, & & psb_s_vect_type, psb_s_base_vect_type, psb_spk_, & & mld_s_base_solver_type, psb_ipk_, psb_i_base_vect_type @@ -168,7 +169,6 @@ module mld_s_base_solver_mod type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -406,4 +406,12 @@ contains val = .false. end function s_base_solver_is_iterative + function s_base_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function s_base_solver_get_id + + end module mld_s_base_solver_mod diff --git a/mlprec/mld_s_diag_solver.f90 b/mlprec/mld_s_diag_solver.f90 index ced8b384..33c532fb 100644 --- a/mlprec/mld_s_diag_solver.f90 +++ b/mlprec/mld_s_diag_solver.f90 @@ -67,12 +67,13 @@ module mld_s_diag_solver procedure, pass(sv) :: sizeof => s_diag_solver_sizeof procedure, pass(sv) :: get_nzeros => s_diag_solver_get_nzeros procedure, nopass :: get_fmt => s_diag_solver_get_fmt + procedure, nopass :: get_id => s_diag_solver_get_id end type mld_s_diag_solver_type private :: s_diag_solver_free, s_diag_solver_descr, & & s_diag_solver_sizeof, s_diag_solver_get_nzeros, & - & s_diag_solver_get_fmt + & s_diag_solver_get_fmt, s_diag_solver_get_id interface @@ -114,14 +115,13 @@ module mld_s_diag_solver end interface interface - subroutine mld_s_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_s_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, & & psb_s_vect_type, psb_s_base_vect_type, psb_spk_, & & mld_s_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -267,5 +267,11 @@ contains val = "Diag solver" end function s_diag_solver_get_fmt + function s_diag_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_diag_scale_ + end function s_diag_solver_get_id end module mld_s_diag_solver diff --git a/mlprec/mld_s_gs_solver.f90 b/mlprec/mld_s_gs_solver.f90 index fb3bf69e..3d7b30d7 100644 --- a/mlprec/mld_s_gs_solver.f90 +++ b/mlprec/mld_s_gs_solver.f90 @@ -62,25 +62,26 @@ module mld_s_gs_solver real(psb_spk_) :: eps contains procedure, pass(sv) :: dump => mld_s_gs_solver_dmp - procedure, pass(sv) :: ccheck => d_gs_solver_check + procedure, pass(sv) :: ccheck => s_gs_solver_check procedure, pass(sv) :: clone => mld_s_gs_solver_clone procedure, pass(sv) :: build => mld_s_gs_solver_bld procedure, pass(sv) :: cnv => mld_s_gs_solver_cnv procedure, pass(sv) :: apply_v => mld_s_gs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_s_gs_solver_apply - procedure, pass(sv) :: free => d_gs_solver_free - procedure, pass(sv) :: seti => d_gs_solver_seti - procedure, pass(sv) :: setc => d_gs_solver_setc - procedure, pass(sv) :: setr => d_gs_solver_setr - procedure, pass(sv) :: cseti => d_gs_solver_cseti - procedure, pass(sv) :: csetc => d_gs_solver_csetc - procedure, pass(sv) :: csetr => d_gs_solver_csetr - procedure, pass(sv) :: descr => d_gs_solver_descr - procedure, pass(sv) :: default => d_gs_solver_default - procedure, pass(sv) :: sizeof => d_gs_solver_sizeof - procedure, pass(sv) :: get_nzeros => d_gs_solver_get_nzeros - procedure, nopass :: get_fmt => d_gs_solver_get_fmt - procedure, nopass :: is_iterative => d_gs_solver_is_iterative + procedure, pass(sv) :: free => s_gs_solver_free + procedure, pass(sv) :: seti => s_gs_solver_seti + procedure, pass(sv) :: setc => s_gs_solver_setc + procedure, pass(sv) :: setr => s_gs_solver_setr + procedure, pass(sv) :: cseti => s_gs_solver_cseti + procedure, pass(sv) :: csetc => s_gs_solver_csetc + procedure, pass(sv) :: csetr => s_gs_solver_csetr + procedure, pass(sv) :: descr => s_gs_solver_descr + procedure, pass(sv) :: default => s_gs_solver_default + procedure, pass(sv) :: sizeof => s_gs_solver_sizeof + procedure, pass(sv) :: get_nzeros => s_gs_solver_get_nzeros + procedure, nopass :: get_fmt => s_gs_solver_get_fmt + procedure, nopass :: get_id => s_gs_solver_get_id + procedure, nopass :: is_iterative => s_gs_solver_is_iterative end type mld_s_gs_solver_type type, extends(mld_s_gs_solver_type) :: mld_s_bwgs_solver_type @@ -89,6 +90,7 @@ module mld_s_gs_solver procedure, pass(sv) :: apply_v => mld_s_bwgs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_s_bwgs_solver_apply procedure, nopass :: get_fmt => s_bwgs_solver_get_fmt + procedure, nopass :: get_id => s_bwgs_solver_get_id procedure, pass(sv) :: descr => s_bwgs_solver_descr end type mld_s_bwgs_solver_type @@ -101,8 +103,8 @@ module mld_s_gs_solver & s_gs_solver_apply_vect, s_gs_solver_get_nzeros, & & s_gs_solver_get_fmt, s_gs_solver_check,& & s_gs_solver_is_iterative, & - & s_bwgs_solver_get_fmt, s_bwgs_solver_descr - + & s_bwgs_solver_get_fmt, s_bwgs_solver_descr, & + & s_gs_solver_get_id, s_bwgs_solver_get_id interface subroutine mld_s_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -174,7 +176,7 @@ module mld_s_gs_solver end interface interface - subroutine mld_s_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_s_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_s_gs_solver_type, psb_s_vect_type, psb_spk_, & & psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -182,14 +184,13 @@ module mld_s_gs_solver type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b 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 end subroutine mld_s_gs_solver_bld - subroutine mld_s_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_s_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_s_bwgs_solver_type, psb_s_vect_type, psb_spk_, & & psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -197,7 +198,6 @@ module mld_s_gs_solver type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -251,7 +251,7 @@ module mld_s_gs_solver contains - subroutine d_gs_solver_default(sv) + subroutine s_gs_solver_default(sv) Implicit None @@ -262,9 +262,9 @@ contains sv%eps = dzero return - end subroutine d_gs_solver_default + end subroutine s_gs_solver_default - subroutine d_gs_solver_check(sv,info) + subroutine s_gs_solver_check(sv,info) Implicit None @@ -272,7 +272,7 @@ contains class(mld_s_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_check' + character(len=20) :: name='s_gs_solver_check' call psb_erractionsave(err_act) info = psb_success_ @@ -288,10 +288,10 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_check + end subroutine s_gs_solver_check - subroutine d_gs_solver_seti(sv,what,val,info) + subroutine s_gs_solver_seti(sv,what,val,info) Implicit None @@ -301,7 +301,7 @@ contains integer(psb_ipk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_seti' + character(len=20) :: name='s_gs_solver_seti' info = psb_success_ call psb_erractionsave(err_act) @@ -318,9 +318,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_seti + end subroutine s_gs_solver_seti - subroutine d_gs_solver_setc(sv,what,val,info) + subroutine s_gs_solver_setc(sv,what,val,info) Implicit None @@ -330,7 +330,7 @@ contains character(len=*), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act, ival - character(len=20) :: name='d_gs_solver_setc' + character(len=20) :: name='s_gs_solver_setc' info = psb_success_ call psb_erractionsave(err_act) @@ -352,9 +352,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_setc + end subroutine s_gs_solver_setc - subroutine d_gs_solver_setr(sv,what,val,info) + subroutine s_gs_solver_setr(sv,what,val,info) Implicit None @@ -364,7 +364,7 @@ contains real(psb_spk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_setr' + character(len=20) :: name='s_gs_solver_setr' call psb_erractionsave(err_act) info = psb_success_ @@ -381,9 +381,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_setr + end subroutine s_gs_solver_setr - subroutine d_gs_solver_cseti(sv,what,val,info) + subroutine s_gs_solver_cseti(sv,what,val,info) Implicit None @@ -393,7 +393,7 @@ contains integer(psb_ipk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_cseti' + character(len=20) :: name='s_gs_solver_cseti' info = psb_success_ call psb_erractionsave(err_act) @@ -410,9 +410,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_cseti + end subroutine s_gs_solver_cseti - subroutine d_gs_solver_csetc(sv,what,val,info) + subroutine s_gs_solver_csetc(sv,what,val,info) Implicit None @@ -422,7 +422,7 @@ contains character(len=*), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act, ival - character(len=20) :: name='d_gs_solver_csetc' + character(len=20) :: name='s_gs_solver_csetc' info = psb_success_ call psb_erractionsave(err_act) @@ -444,9 +444,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_csetc + end subroutine s_gs_solver_csetc - subroutine d_gs_solver_csetr(sv,what,val,info) + subroutine s_gs_solver_csetr(sv,what,val,info) Implicit None @@ -456,7 +456,7 @@ contains real(psb_spk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_csetr' + character(len=20) :: name='s_gs_solver_csetr' call psb_erractionsave(err_act) info = psb_success_ @@ -474,9 +474,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_csetr + end subroutine s_gs_solver_csetr - subroutine d_gs_solver_free(sv,info) + subroutine s_gs_solver_free(sv,info) Implicit None @@ -484,7 +484,7 @@ contains class(mld_s_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_free' + character(len=20) :: name='s_gs_solver_free' call psb_erractionsave(err_act) info = psb_success_ @@ -497,9 +497,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_free + end subroutine s_gs_solver_free - subroutine d_gs_solver_descr(sv,info,iout,coarse) + subroutine s_gs_solver_descr(sv,info,iout,coarse) Implicit None @@ -535,9 +535,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_descr + end subroutine s_gs_solver_descr - function d_gs_solver_get_nzeros(sv) result(val) + function s_gs_solver_get_nzeros(sv) result(val) implicit none ! Arguments @@ -550,9 +550,9 @@ contains val = val + sv%u%get_nzeros() return - end function d_gs_solver_get_nzeros + end function s_gs_solver_get_nzeros - function d_gs_solver_sizeof(sv) result(val) + function s_gs_solver_sizeof(sv) result(val) implicit none ! Arguments @@ -565,26 +565,32 @@ contains val = val + sv%u%sizeof() return - end function d_gs_solver_sizeof + end function s_gs_solver_sizeof - function d_gs_solver_get_fmt() result(val) + function s_gs_solver_get_fmt() result(val) implicit none character(len=32) :: val val = "Forward Gauss-Seidel solver" - end function d_gs_solver_get_fmt + end function s_gs_solver_get_fmt + + function s_gs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + val = mld_gs_ + end function s_gs_solver_get_id ! ! If this is true, then the solver needs a starting ! guess. Currently only handled in JAC smoother. ! - function d_gs_solver_is_iterative() result(val) + function s_gs_solver_is_iterative() result(val) implicit none logical :: val val = .true. - end function d_gs_solver_is_iterative + end function s_gs_solver_is_iterative subroutine s_bwgs_solver_descr(sv,info,iout,coarse) @@ -631,4 +637,11 @@ contains val = "Backward Gauss-Seidel solver" end function s_bwgs_solver_get_fmt + function s_bwgs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_bwgs_ + end function s_bwgs_solver_get_id + end module mld_s_gs_solver diff --git a/mlprec/mld_s_id_solver.f90 b/mlprec/mld_s_id_solver.f90 index 7eb71b78..e863f843 100644 --- a/mlprec/mld_s_id_solver.f90 +++ b/mlprec/mld_s_id_solver.f90 @@ -56,12 +56,13 @@ module mld_s_id_solver procedure, pass(sv) :: free => s_id_solver_free procedure, pass(sv) :: descr => s_id_solver_descr procedure, nopass :: get_fmt => s_id_solver_get_fmt + procedure, nopass :: get_id => s_id_solver_get_id end type mld_s_id_solver_type private :: s_id_solver_bld, & & s_id_solver_free, s_id_solver_get_fmt, & - & s_id_solver_descr + & s_id_solver_descr, s_id_solver_get_id interface subroutine mld_s_id_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -118,7 +119,7 @@ module mld_s_id_solver contains - subroutine s_id_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine s_id_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None @@ -126,7 +127,6 @@ contains type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_id_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -193,5 +193,11 @@ contains val = "Identity solver" end function s_id_solver_get_fmt + function s_id_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function s_id_solver_get_id end module mld_s_id_solver diff --git a/mlprec/mld_s_ilu_solver.f90 b/mlprec/mld_s_ilu_solver.f90 index dde04461..ff25931b 100644 --- a/mlprec/mld_s_ilu_solver.f90 +++ b/mlprec/mld_s_ilu_solver.f90 @@ -88,6 +88,7 @@ module mld_s_ilu_solver procedure, pass(sv) :: sizeof => s_ilu_solver_sizeof procedure, pass(sv) :: get_nzeros => s_ilu_solver_get_nzeros procedure, nopass :: get_fmt => s_ilu_solver_get_fmt + procedure, nopass :: get_id => s_ilu_solver_get_id end type mld_s_ilu_solver_type @@ -97,7 +98,7 @@ module mld_s_ilu_solver & s_ilu_solver_descr, s_ilu_solver_sizeof, & & s_ilu_solver_default, s_ilu_solver_dmp, & & s_ilu_solver_apply_vect, s_ilu_solver_get_nzeros, & - & s_ilu_solver_get_fmt, s_ilu_solver_check + & s_ilu_solver_get_fmt, s_ilu_solver_check, s_ilu_solver_get_id interface @@ -139,7 +140,7 @@ module mld_s_ilu_solver end interface interface - subroutine mld_s_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_s_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_s_ilu_solver_type, psb_s_vect_type, psb_spk_, & & psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -147,7 +148,6 @@ module mld_s_ilu_solver type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -550,4 +550,11 @@ contains val = "ILU solver" end function s_ilu_solver_get_fmt + function s_ilu_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_ilu_n_ + end function s_ilu_solver_get_id + end module mld_s_ilu_solver diff --git a/mlprec/mld_s_jac_smoother.f90 b/mlprec/mld_s_jac_smoother.f90 index c48525ea..c49d076f 100644 --- a/mlprec/mld_s_jac_smoother.f90 +++ b/mlprec/mld_s_jac_smoother.f90 @@ -74,12 +74,13 @@ module mld_s_jac_smoother procedure, pass(sm) :: sizeof => s_jac_smoother_sizeof procedure, pass(sm) :: get_nzeros => s_jac_smoother_get_nzeros procedure, nopass :: get_fmt => s_jac_smoother_get_fmt + procedure, nopass :: get_id => s_jac_smoother_get_id end type mld_s_jac_smoother_type private :: s_jac_smoother_free, s_jac_smoother_descr, & & s_jac_smoother_sizeof, s_jac_smoother_get_nzeros, & - & s_jac_smoother_get_fmt + & s_jac_smoother_get_fmt, s_jac_smoother_get_id interface @@ -124,14 +125,13 @@ module mld_s_jac_smoother end interface interface - subroutine mld_s_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_s_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, mld_s_jac_smoother_type, psb_s_vect_type, psb_spk_, & & psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,& & psb_ipk_, psb_i_base_vect_type type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_s_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -295,4 +295,11 @@ contains val = "Jacobi smoother" end function s_jac_smoother_get_fmt + function s_jac_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_jac_ + end function s_jac_smoother_get_id + end module mld_s_jac_smoother diff --git a/mlprec/mld_s_mumps_solver.F90 b/mlprec/mld_s_mumps_solver.F90 index 7311b050..2f626d66 100644 --- a/mlprec/mld_s_mumps_solver.F90 +++ b/mlprec/mld_s_mumps_solver.F90 @@ -81,6 +81,7 @@ module mld_s_mumps_solver procedure, pass(sv) :: csetr => s_mumps_solver_csetr procedure, pass(sv) :: default => s_mumps_solver_default procedure, nopass :: get_fmt => s_mumps_get_fmt + procedure, nopass :: get_id => s_mumps_get_id #if defined(HAVE_FINAL) final :: s_mumps_solver_finalize @@ -93,7 +94,8 @@ module mld_s_mumps_solver & s_mumps_solver_sizeof, s_mumps_solver_apply_vect,& & s_mumps_solver_seti, s_mumps_solver_setr, & & s_mumps_solver_cseti, s_mumps_solver_csetri, & - & s_mumps_solver_default + & s_mumps_solver_default, s_mumps_solver_get_fmt, & + & s_mumps_solver_get_id #if defined(HAVE_FINAL) private :: s_mumps_solver_finalize #endif @@ -136,7 +138,7 @@ module mld_s_mumps_solver end interface interface - subroutine s_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine s_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_s_mumps_solver_type, psb_s_vect_type, psb_spk_, & & psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,& @@ -148,7 +150,6 @@ module mld_s_mumps_solver type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -486,5 +487,12 @@ contains val = "MUMPS solver" end function s_mumps_get_fmt + function s_mumps_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_mumps_ + end function s_mumps_get_id + end module mld_s_mumps_solver diff --git a/mlprec/mld_s_onelev_mod.f90 b/mlprec/mld_s_onelev_mod.f90 index acecd951..43db3d22 100644 --- a/mlprec/mld_s_onelev_mod.f90 +++ b/mlprec/mld_s_onelev_mod.f90 @@ -432,15 +432,14 @@ contains ! Arguments class(mld_s_onelev_type), target, intent(inout) :: lv - lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_vcycle_ml_ - lv%parms%aggr_alg = mld_dec_aggr_ + lv%parms%ml_cycle = mld_vcycle_ml_ + lv%parms%aggr_type = mld_vmb_ + lv%parms%par_aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ - lv%parms%aggr_kind = mld_smooth_prol_ + lv%parms%aggr_prol = mld_smooth_prol_ lv%parms%coarse_mat = mld_distr_mat_ - lv%parms%smoother_pos = mld_twoside_smooth_ lv%parms%aggr_omega_alg = mld_eig_est_ lv%parms%aggr_eig = mld_max_norm_ lv%parms%aggr_filter = mld_no_filter_mat_ diff --git a/mlprec/mld_s_prec_type.f90 b/mlprec/mld_s_prec_type.f90 index c8aff456..792bf4b4 100644 --- a/mlprec/mld_s_prec_type.f90 +++ b/mlprec/mld_s_prec_type.f90 @@ -88,12 +88,12 @@ module mld_s_prec_type ! ! Aggregation defaults: ! - ! 1. coarse_aggr_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) - integer(psb_ipk_) :: coarse_aggr_size = izero + ! 1. min_coarse_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) + integer(psb_ipk_) :: min_coarse_size = izero ! 2. maximum number of levels. Defaults to 20 - integer(psb_ipk_) :: max_prec_levs = 20_psb_ipk_ - ! 3. min_aggr_ratio = 1.5 - real(psb_spk_) :: min_aggr_ratio = 1.5_psb_spk_ + integer(psb_ipk_) :: max_levs = 20_psb_ipk_ + ! 3. min_cr_ratio = 1.5 + real(psb_spk_) :: min_cr_ratio = 1.5_psb_spk_ real(psb_spk_) :: op_complexity=szero ! ! Number of outer sweeps. Sometimes 2 V-cycles may be better than 1 W-cycle. @@ -577,9 +577,9 @@ contains endif call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_pre > 1) then + write(iout_,*) ' Number of smoother sweeps_pre : ',& + & prec%precv(1)%parms%sweeps_pre end if write(iout_,*) return @@ -588,9 +588,9 @@ contains write(iout_,*) 'Post smoother details' call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_post > 1) then + write(iout_,*) ' Number of smoother sweeps_post : ',& + & prec%precv(1)%parms%sweeps_post end if write(iout_,*) return @@ -884,9 +884,9 @@ contains select type(pout => precout) class is (mld_sprec_type) pout%ictxt = prec%ictxt - pout%coarse_aggr_size = prec%coarse_aggr_size - pout%max_prec_levs = prec%max_prec_levs - pout%coarse_aggr_size = prec%coarse_aggr_size + pout%max_levs = prec%max_levs + pout%min_coarse_size = prec%min_coarse_size + pout%min_cr_ratio = prec%min_cr_ratio pout%outer_sweeps = prec%outer_sweeps pout%op_complexity = prec%op_complexity if (allocated(prec%precv)) then diff --git a/mlprec/mld_s_slu_solver.F90 b/mlprec/mld_s_slu_solver.F90 index 1dfd1c8b..b49a041a 100644 --- a/mlprec/mld_s_slu_solver.F90 +++ b/mlprec/mld_s_slu_solver.F90 @@ -71,6 +71,8 @@ module mld_s_slu_solver procedure, pass(sv) :: free => s_slu_solver_free procedure, pass(sv) :: descr => s_slu_solver_descr procedure, pass(sv) :: sizeof => s_slu_solver_sizeof + procedure, nopass :: get_fmt => s_slu_get_fmt + procedure, nopass :: get_id => s_slu_get_id #if defined(HAVE_FINAL) final :: s_slu_solver_finalize #endif @@ -79,7 +81,8 @@ module mld_s_slu_solver private :: s_slu_solver_bld, s_slu_solver_apply, & & s_slu_solver_free, s_slu_solver_descr, & - & s_slu_solver_sizeof, s_slu_solver_apply_vect + & s_slu_solver_sizeof, s_slu_solver_apply_vect, & + & s_slu_solver_get_fmt, s_slu_solver_get_id #if defined(HAVE_FINAL) private :: s_slu_solver_finalize #endif @@ -248,7 +251,7 @@ contains end subroutine s_slu_solver_apply_vect - subroutine s_slu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine s_slu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -258,7 +261,6 @@ contains type(psb_sspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_s_slu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_sspmat_type), intent(in), target, optional :: b class(psb_s_base_sparse_mat), intent(in), optional :: amold @@ -280,42 +282,34 @@ contains call psb_info(ictxt, me, np) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' - - + + n_row = desc_a%get_local_rows() n_col = desc_a%get_local_cols() - - if (psb_toupper(upd) == 'F') then - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) - nrow_a = atmp%get_nrows() - call atmp%a%csclip(acoo,info,jmax=nrow_a) - call acsc%mv_from_coo(acoo,info) - nztota = acsc%get_nzeros() - ! Fix the entries to call C-base SuperLU - acsc%ia(:) = acsc%ia(:) - 1 - acsc%icp(:) = acsc%icp(:) - 1 - info = mld_sslu_fact(nrow_a,nztota,acsc%val,& - & acsc%icp,acsc%ia,sv%lufactors) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_sslu_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsc%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + + + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) + nrow_a = atmp%get_nrows() + call atmp%a%csclip(acoo,info,jmax=nrow_a) + call acsc%mv_from_coo(acoo,info) + nztota = acsc%get_nzeros() + ! Fix the entries to call C-base SuperLU + acsc%ia(:) = acsc%ia(:) - 1 + acsc%icp(:) = acsc%icp(:) - 1 + info = mld_sslu_fact(nrow_a,nztota,acsc%val,& + & acsc%icp,acsc%ia,sv%lufactors) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_sslu_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + + call acsc%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -417,5 +411,19 @@ contains val = val + sv%numsize return end function s_slu_solver_sizeof + + function s_slu_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "SuperLU solver" + end function s_slu_get_fmt + + function s_slu_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_slu_ + end function s_slu_get_id #endif end module mld_s_slu_solver diff --git a/mlprec/mld_s_sludist_solver.F90 b/mlprec/mld_s_sludist_solver.F90 deleted file mode 100644 index f28e61c2..00000000 --- a/mlprec/mld_s_sludist_solver.F90 +++ /dev/null @@ -1,430 +0,0 @@ -! -! -! MLD2P4 version 2.1 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.4) -! -! (C) Copyright 2008, 2010, 2012, 2015, 2017 -! -! Salvatore Filippone Cranfield University -! Ambra Abdullahi Hassan University of Rome Tor Vergata -! Alfredo Buttari CNRS-IRIT, Toulouse -! Pasqua D'Ambra ICAR-CNR, Naples -! Daniela di Serafino University of Campania "L. Vanvitelli", Caserta -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the MLD2P4 group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MLD2P4 GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! -! File: mld_s_sludist_solver_mod.f90 -! -! Module: mld_s_sludist_solver_mod -! -! This module defines: -! - the mld_s_sludist_solver_type data structure containing the ingredients -! to interface with the SuperLU_Dist package. -! 1. The factorization is distributed (and thus exact) -! -! -! -module mld_s_sludist_solver - - use iso_c_binding - use mld_s_base_solver_mod - -#if defined(LONG_INTEGERS) - - type, extends(mld_s_base_solver_type) :: mld_s_sludist_solver_type - - end type mld_s_sludist_solver_type -#else - type, extends(mld_s_base_solver_type) :: mld_s_sludist_solver_type - type(c_ptr) :: lufactors=c_null_ptr - integer(c_long_long) :: symbsize=0, numsize=0 - contains - procedure, pass(sv) :: build => s_sludist_solver_bld - procedure, pass(sv) :: apply_a => s_sludist_solver_apply - procedure, pass(sv) :: apply_v => s_sludist_solver_apply_vect - procedure, pass(sv) :: free => s_sludist_solver_free - procedure, pass(sv) :: descr => s_sludist_solver_descr - procedure, pass(sv) :: sizeof => s_sludist_solver_sizeof -#if defined(HAVE_FINAL) - final :: s_sludist_solver_finalize -#endif - end type mld_s_sludist_solver_type - - - private :: s_sludist_solver_bld, s_sludist_solver_apply, & - & s_sludist_solver_free, s_sludist_solver_descr, & - & s_sludist_solver_sizeof, s_sludist_solver_apply_vect -#if defined(HAVE_FINAL) - private :: s_sludist_solver_finalize -#endif - - - interface - function mld_ssludist_fact(n,nl,nnz,ifrst, & - & values,rowptr,colind,lufactors,npr,npc) & - & bind(c,name='mld_ssludist_fact') result(info) - use iso_c_binding - integer(c_int), value :: n,nl,nnz,ifrst,npr,npc - integer(c_int) :: info - integer(c_int) :: rowptr(*),colind(*) - real(c_float) :: values(*) - type(c_ptr) :: lufactors - end function mld_ssludist_fact - end interface - - interface - function mld_ssludist_solve(itrans,n,nrhs, b, ldb, lufactors)& - & bind(c,name='mld_ssludist_solve') result(info) - use iso_c_binding - integer(c_int) :: info - integer(c_int), value :: itrans,n,nrhs,ldb - real(c_float) :: b(ldb,*) - type(c_ptr), value :: lufactors - end function mld_ssludist_solve - end interface - - interface - function mld_ssludist_free(lufactors)& - & bind(c,name='mld_ssludist_free') result(info) - use iso_c_binding - integer(c_int) :: info - type(c_ptr), value :: lufactors - end function mld_ssludist_free - end interface - -contains - - subroutine s_sludist_solver_apply(alpha,sv,x,beta,y,desc_data,& - & trans,work,info,init,initu) - use psb_base_mod - implicit none - type(psb_desc_type), intent(in) :: desc_data - class(mld_s_sludist_solver_type), intent(inout) :: sv - real(psb_spk_),intent(inout) :: x(:) - real(psb_spk_),intent(inout) :: y(:) - real(psb_spk_),intent(in) :: alpha,beta - character(len=1),intent(in) :: trans - real(psb_spk_),target, intent(inout) :: work(:) - integer, intent(out) :: info - character, intent(in), optional :: init - real(psb_spk_),intent(inout), optional :: initu(:) - - integer :: n_row,n_col - real(psb_spk_), pointer :: ww(:) - integer :: ictxt,np,me,i, err_act - character :: trans_ - character(len=20) :: name='s_sludist_solver_apply' - - call psb_erractionsave(err_act) - - info = psb_success_ - - trans_ = psb_toupper(trans) - select case(trans_) - case('N') - case('T','C') - case default - call psb_errpush(psb_err_iarg_invalid_i_,name) - goto 9999 - end select - ! - ! For non-iterative solvers, init and initu are ignored. - ! - - - n_row = desc_data%get_local_rows() - n_col = desc_data%get_local_cols() - - if (n_col <= size(work)) then - ww => work(1:n_col) - else - allocate(ww(n_col),stat=info) - if (info /= psb_success_) then - info=psb_err_alloc_request_ - call psb_errpush(info,name,i_err=(/n_col,0,0,0,0/),& - & a_err='real(psb_spk_)') - goto 9999 - end if - endif - - if (info == psb_success_)& - & call psb_geaxpby(sone,x,szero,ww,desc_data,info) - - select case(trans_) - case('N') - info = mld_ssludist_solve(0,n_row,1,ww,n_row,sv%lufactors) - case('T') - info = mld_ssludist_solve(1,n_row,1,ww,n_row,sv%lufactors) - case('C') - info = mld_ssludist_solve(2,n_row,1,ww,n_row,sv%lufactors) - case default - call psb_errpush(psb_err_internal_error_,& - & name,a_err='Invalid TRANS in subsolve') - goto 9999 - end select - - if (info == psb_success_)& - & call psb_geaxpby(alpha,ww,beta,y,desc_data,info) - - - if (info /= psb_success_) then - call psb_errpush(psb_err_internal_error_,& - & name,a_err='Error in subsolve') - goto 9999 - endif - - if (n_col > size(work)) then - deallocate(ww) - endif - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - - end subroutine s_sludist_solver_apply - - subroutine s_sludist_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& - & trans,work,info,init,initu) - use psb_base_mod - implicit none - type(psb_desc_type), intent(in) :: desc_data - class(mld_s_sludist_solver_type), intent(inout) :: sv - type(psb_s_vect_type),intent(inout) :: x - type(psb_s_vect_type),intent(inout) :: y - real(psb_spk_),intent(in) :: alpha,beta - character(len=1),intent(in) :: trans - real(psb_spk_),target, intent(inout) :: work(:) - integer, intent(out) :: info - character, intent(in), optional :: init - type(psb_s_vect_type),intent(inout), optional :: initu - - integer :: err_act - character(len=20) :: name='s_sludist_solver_apply_vect' - - call psb_erractionsave(err_act) - - info = psb_success_ - ! - ! For non-iterative solvers, init and initu are ignored. - ! - - - call x%v%sync() - call y%v%sync() - call sv%apply(alpha,x%v%v,beta,y%v%v,desc_data,trans,work,info) - call y%v%set_host() - if (info /= 0) goto 9999 - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - - end subroutine s_sludist_solver_apply_vect - - subroutine s_sludist_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) - - use psb_base_mod - - Implicit None - - ! Arguments - type(psb_sspmat_type), intent(in), target :: a - Type(psb_desc_type), Intent(in) :: desc_a - class(mld_s_sludist_solver_type), intent(inout) :: sv - character, intent(in) :: upd - integer, intent(out) :: info - type(psb_sspmat_type), intent(in), target, optional :: b - 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 - ! Local variables - type(psb_sspmat_type) :: atmp - type(psb_s_csr_sparse_mat) :: acsr - integer :: n_row,n_col, nrow_a, nztota, nglob, nzt, npr, npc - integer :: ifrst, ibcheck - integer :: ictxt,np,me,i, err_act, debug_unit, debug_level - character(len=20) :: name='s_sludist_solver_bld', ch_err - - info=psb_success_ - call psb_erractionsave(err_act) - debug_unit = psb_get_debug_unit() - debug_level = psb_get_debug_level() - ictxt = desc_a%get_context() - call psb_info(ictxt, me, np) - npr = np - npc = 1 - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),' start' - - - if (psb_toupper(upd) == 'F') then - - n_row = desc_a%get_local_rows() - n_col = desc_a%get_local_cols() - nglob = desc_a%get_global_rows() - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) - call atmp%mv_to(acsr) - nrow_a = acsr%get_nrows() - nztota = acsr%get_nzeros() - ! Fix the entries to call C-base SuperLU - call psb_loc_to_glob(1,ifrst,desc_a,info) - call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info) - call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I') - acsr%ja(:) = acsr%ja(:) - 1 - acsr%irp(:) = acsr%irp(:) - 1 - ifrst = ifrst - 1 - info = mld_ssludist_fact(nglob,nrow_a,nztota,ifrst,& - & acsr%val,acsr%irp,acsr%ja,sv%lufactors,& - & npr,npc) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_ssludist_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsr%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - - end if - - if (debug_level >= psb_debug_outer_) & - & write(debug_unit,*) me,' ',trim(name),' end' - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - end subroutine s_sludist_solver_bld - - subroutine s_sludist_solver_free(sv,info) - - Implicit None - - ! Arguments - class(mld_s_sludist_solver_type), intent(inout) :: sv - integer, intent(out) :: info - Integer :: err_act - character(len=20) :: name='s_sludist_solver_free' - - call psb_erractionsave(err_act) - - - info = mld_ssludist_free(sv%lufactors) - - if (info /= psb_success_) goto 9999 - sv%lufactors = c_null_ptr - - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - end subroutine s_sludist_solver_free - -#if defined(HAVE_FINAL) - subroutine s_sludist_solver_finalize(sv) - - Implicit None - - ! Arguments - type(mld_s_sludist_solver_type), intent(inout) :: sv - integer :: info - Integer :: err_act - character(len=20) :: name='s_sludist_solver_finalize' - - call sv%free(info) - - return - - end subroutine s_sludist_solver_finalize -#endif - - subroutine s_sludist_solver_descr(sv,info,iout,coarse) - - Implicit None - - ! Arguments - class(mld_s_sludist_solver_type), intent(in) :: sv - integer, intent(out) :: info - integer, intent(in), optional :: iout - logical, intent(in), optional :: coarse - - ! Local variables - integer :: err_act - integer :: ictxt, me, np - character(len=20), parameter :: name='mld_s_sludist_solver_descr' - integer :: iout_ - - call psb_erractionsave(err_act) - info = psb_success_ - if (present(iout)) then - iout_ = iout - else - iout_ = 6 - endif - - write(iout_,*) ' SuperLU_Dist Sparse Factorization Solver. ' - - call psb_erractionrestore(err_act) - return - -9999 call psb_error_handler(err_act) - return - end subroutine s_sludist_solver_descr - - function s_sludist_solver_sizeof(sv) result(val) - - implicit none - ! Arguments - class(mld_s_sludist_solver_type), intent(in) :: sv - integer(psb_long_int_k_) :: val - integer :: i - - val = 2*psb_sizeof_int + psb_sizeof_dp - val = val + sv%symbsize - val = val + sv%numsize - return - end function s_sludist_solver_sizeof -#endif -end module mld_s_sludist_solver diff --git a/mlprec/mld_z_as_smoother.f90 b/mlprec/mld_z_as_smoother.f90 index 481c21a1..655b00f3 100644 --- a/mlprec/mld_z_as_smoother.f90 +++ b/mlprec/mld_z_as_smoother.f90 @@ -94,12 +94,13 @@ module mld_z_as_smoother procedure, pass(sm) :: default => z_as_smoother_default procedure, pass(sm) :: get_nzeros => z_as_smoother_get_nzeros procedure, nopass :: get_fmt => z_as_smoother_get_fmt + procedure, nopass :: get_id => z_as_smoother_get_id end type mld_z_as_smoother_type private :: z_as_smoother_descr, z_as_smoother_sizeof, & & z_as_smoother_default, z_as_smoother_get_nzeros, & - & z_as_smoother_get_fmt + & z_as_smoother_get_fmt, z_as_smoother_get_id character(len=6), parameter, private :: & & restrict_names(0:4)=(/'none ','halo ',' ',' ',' '/) @@ -221,7 +222,7 @@ module mld_z_as_smoother end interface interface - subroutine mld_z_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_z_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_zspmat_type, psb_z_vect_type, psb_z_base_vect_type, & & psb_dpk_, mld_z_as_smoother_type, psb_long_int_k_, & & psb_desc_type, psb_z_base_sparse_mat, psb_ipk_,& @@ -230,7 +231,6 @@ module mld_z_as_smoother type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_as_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -396,12 +396,13 @@ contains ! Arguments class(mld_z_as_smoother_type), intent(inout) :: sm - + ! + ! Default: RAS with 1 overlap layer + ! sm%restr = psb_halo_ sm%prol = psb_none_ sm%novr = 1 - if (allocated(sm%sv)) then call sm%sv%default() end if @@ -465,4 +466,11 @@ contains val = "Schwarz smoother" end function z_as_smoother_get_fmt + function z_as_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_as_ + end function z_as_smoother_get_id + end module mld_z_as_smoother diff --git a/mlprec/mld_z_base_smoother_mod.f90 b/mlprec/mld_z_base_smoother_mod.f90 index e90b3ece..b7256d36 100644 --- a/mlprec/mld_z_base_smoother_mod.f90 +++ b/mlprec/mld_z_base_smoother_mod.f90 @@ -123,11 +123,13 @@ module mld_z_base_smoother_mod procedure, pass(sm) :: get_nzeros => z_base_smoother_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => z_base_smoother_get_fmt + procedure, nopass :: get_id => z_base_smoother_get_id end type mld_z_base_smoother_type private :: z_base_smoother_sizeof, z_base_smoother_get_fmt, & - & z_base_smoother_default, z_base_smoother_get_nzeros + & z_base_smoother_default, z_base_smoother_get_nzeros, & + & z_base_smoother_get_id @@ -259,7 +261,7 @@ module mld_z_base_smoother_mod end interface interface - subroutine mld_z_base_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_z_base_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, & & psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, & & mld_z_base_smoother_type, psb_ipk_, psb_i_base_vect_type @@ -267,7 +269,6 @@ module mld_z_base_smoother_mod type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_base_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -394,4 +395,11 @@ contains val = "Base smoother" end function z_base_smoother_get_fmt + function z_base_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_base_smooth_ + end function z_base_smoother_get_id + end module mld_z_base_smoother_mod diff --git a/mlprec/mld_z_base_solver_mod.f90 b/mlprec/mld_z_base_solver_mod.f90 index 7bb173df..5703c71c 100644 --- a/mlprec/mld_z_base_solver_mod.f90 +++ b/mlprec/mld_z_base_solver_mod.f90 @@ -108,12 +108,13 @@ module mld_z_base_solver_mod procedure, pass(sv) :: get_nzeros => z_base_solver_get_nzeros procedure, nopass :: stringval => mld_stringval procedure, nopass :: get_fmt => z_base_solver_get_fmt + procedure, nopass :: get_id => z_base_solver_get_id procedure, nopass :: is_iterative => z_base_solver_is_iterative end type mld_z_base_solver_type private :: z_base_solver_sizeof, z_base_solver_default,& & z_base_solver_get_nzeros, z_base_solver_get_fmt, & - & z_base_solver_is_iterative + & z_base_solver_is_iterative, z_base_solver_get_id interface @@ -158,7 +159,7 @@ module mld_z_base_solver_mod end interface interface - subroutine mld_z_base_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_z_base_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, & & psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, & & mld_z_base_solver_type, psb_ipk_, psb_i_base_vect_type @@ -168,7 +169,6 @@ module mld_z_base_solver_mod type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_base_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -406,4 +406,12 @@ contains val = .false. end function z_base_solver_is_iterative + function z_base_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function z_base_solver_get_id + + end module mld_z_base_solver_mod diff --git a/mlprec/mld_z_diag_solver.f90 b/mlprec/mld_z_diag_solver.f90 index 251997e2..5cd20a69 100644 --- a/mlprec/mld_z_diag_solver.f90 +++ b/mlprec/mld_z_diag_solver.f90 @@ -67,12 +67,13 @@ module mld_z_diag_solver procedure, pass(sv) :: sizeof => z_diag_solver_sizeof procedure, pass(sv) :: get_nzeros => z_diag_solver_get_nzeros procedure, nopass :: get_fmt => z_diag_solver_get_fmt + procedure, nopass :: get_id => z_diag_solver_get_id end type mld_z_diag_solver_type private :: z_diag_solver_free, z_diag_solver_descr, & & z_diag_solver_sizeof, z_diag_solver_get_nzeros, & - & z_diag_solver_get_fmt + & z_diag_solver_get_fmt, z_diag_solver_get_id interface @@ -114,14 +115,13 @@ module mld_z_diag_solver end interface interface - subroutine mld_z_diag_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_z_diag_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, & & psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, & & mld_z_diag_solver_type, psb_ipk_, psb_i_base_vect_type type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_diag_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -267,5 +267,11 @@ contains val = "Diag solver" end function z_diag_solver_get_fmt + function z_diag_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_diag_scale_ + end function z_diag_solver_get_id end module mld_z_diag_solver diff --git a/mlprec/mld_z_gs_solver.f90 b/mlprec/mld_z_gs_solver.f90 index 3140d693..2578c99d 100644 --- a/mlprec/mld_z_gs_solver.f90 +++ b/mlprec/mld_z_gs_solver.f90 @@ -62,25 +62,26 @@ module mld_z_gs_solver real(psb_dpk_) :: eps contains procedure, pass(sv) :: dump => mld_z_gs_solver_dmp - procedure, pass(sv) :: ccheck => d_gs_solver_check + procedure, pass(sv) :: ccheck => z_gs_solver_check procedure, pass(sv) :: clone => mld_z_gs_solver_clone procedure, pass(sv) :: build => mld_z_gs_solver_bld procedure, pass(sv) :: cnv => mld_z_gs_solver_cnv procedure, pass(sv) :: apply_v => mld_z_gs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_z_gs_solver_apply - procedure, pass(sv) :: free => d_gs_solver_free - procedure, pass(sv) :: seti => d_gs_solver_seti - procedure, pass(sv) :: setc => d_gs_solver_setc - procedure, pass(sv) :: setr => d_gs_solver_setr - procedure, pass(sv) :: cseti => d_gs_solver_cseti - procedure, pass(sv) :: csetc => d_gs_solver_csetc - procedure, pass(sv) :: csetr => d_gs_solver_csetr - procedure, pass(sv) :: descr => d_gs_solver_descr - procedure, pass(sv) :: default => d_gs_solver_default - procedure, pass(sv) :: sizeof => d_gs_solver_sizeof - procedure, pass(sv) :: get_nzeros => d_gs_solver_get_nzeros - procedure, nopass :: get_fmt => d_gs_solver_get_fmt - procedure, nopass :: is_iterative => d_gs_solver_is_iterative + procedure, pass(sv) :: free => z_gs_solver_free + procedure, pass(sv) :: seti => z_gs_solver_seti + procedure, pass(sv) :: setc => z_gs_solver_setc + procedure, pass(sv) :: setr => z_gs_solver_setr + procedure, pass(sv) :: cseti => z_gs_solver_cseti + procedure, pass(sv) :: csetc => z_gs_solver_csetc + procedure, pass(sv) :: csetr => z_gs_solver_csetr + procedure, pass(sv) :: descr => z_gs_solver_descr + procedure, pass(sv) :: default => z_gs_solver_default + procedure, pass(sv) :: sizeof => z_gs_solver_sizeof + procedure, pass(sv) :: get_nzeros => z_gs_solver_get_nzeros + procedure, nopass :: get_fmt => z_gs_solver_get_fmt + procedure, nopass :: get_id => z_gs_solver_get_id + procedure, nopass :: is_iterative => z_gs_solver_is_iterative end type mld_z_gs_solver_type type, extends(mld_z_gs_solver_type) :: mld_z_bwgs_solver_type @@ -89,6 +90,7 @@ module mld_z_gs_solver procedure, pass(sv) :: apply_v => mld_z_bwgs_solver_apply_vect procedure, pass(sv) :: apply_a => mld_z_bwgs_solver_apply procedure, nopass :: get_fmt => z_bwgs_solver_get_fmt + procedure, nopass :: get_id => z_bwgs_solver_get_id procedure, pass(sv) :: descr => z_bwgs_solver_descr end type mld_z_bwgs_solver_type @@ -101,8 +103,8 @@ module mld_z_gs_solver & z_gs_solver_apply_vect, z_gs_solver_get_nzeros, & & z_gs_solver_get_fmt, z_gs_solver_check,& & z_gs_solver_is_iterative, & - & z_bwgs_solver_get_fmt, z_bwgs_solver_descr - + & z_bwgs_solver_get_fmt, z_bwgs_solver_descr, & + & z_gs_solver_get_id, z_bwgs_solver_get_id interface subroutine mld_z_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -174,7 +176,7 @@ module mld_z_gs_solver end interface interface - subroutine mld_z_gs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_z_gs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_z_gs_solver_type, psb_z_vect_type, psb_dpk_, & & psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -182,14 +184,13 @@ module mld_z_gs_solver type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_gs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b 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 end subroutine mld_z_gs_solver_bld - subroutine mld_z_bwgs_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_z_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_z_bwgs_solver_type, psb_z_vect_type, psb_dpk_, & & psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -197,7 +198,6 @@ module mld_z_gs_solver type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_bwgs_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -251,7 +251,7 @@ module mld_z_gs_solver contains - subroutine d_gs_solver_default(sv) + subroutine z_gs_solver_default(sv) Implicit None @@ -262,9 +262,9 @@ contains sv%eps = dzero return - end subroutine d_gs_solver_default + end subroutine z_gs_solver_default - subroutine d_gs_solver_check(sv,info) + subroutine z_gs_solver_check(sv,info) Implicit None @@ -272,7 +272,7 @@ contains class(mld_z_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_check' + character(len=20) :: name='z_gs_solver_check' call psb_erractionsave(err_act) info = psb_success_ @@ -288,10 +288,10 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_check + end subroutine z_gs_solver_check - subroutine d_gs_solver_seti(sv,what,val,info) + subroutine z_gs_solver_seti(sv,what,val,info) Implicit None @@ -301,7 +301,7 @@ contains integer(psb_ipk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_seti' + character(len=20) :: name='z_gs_solver_seti' info = psb_success_ call psb_erractionsave(err_act) @@ -318,9 +318,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_seti + end subroutine z_gs_solver_seti - subroutine d_gs_solver_setc(sv,what,val,info) + subroutine z_gs_solver_setc(sv,what,val,info) Implicit None @@ -330,7 +330,7 @@ contains character(len=*), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act, ival - character(len=20) :: name='d_gs_solver_setc' + character(len=20) :: name='z_gs_solver_setc' info = psb_success_ call psb_erractionsave(err_act) @@ -352,9 +352,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_setc + end subroutine z_gs_solver_setc - subroutine d_gs_solver_setr(sv,what,val,info) + subroutine z_gs_solver_setr(sv,what,val,info) Implicit None @@ -364,7 +364,7 @@ contains real(psb_dpk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_setr' + character(len=20) :: name='z_gs_solver_setr' call psb_erractionsave(err_act) info = psb_success_ @@ -381,9 +381,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_setr + end subroutine z_gs_solver_setr - subroutine d_gs_solver_cseti(sv,what,val,info) + subroutine z_gs_solver_cseti(sv,what,val,info) Implicit None @@ -393,7 +393,7 @@ contains integer(psb_ipk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_cseti' + character(len=20) :: name='z_gs_solver_cseti' info = psb_success_ call psb_erractionsave(err_act) @@ -410,9 +410,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_cseti + end subroutine z_gs_solver_cseti - subroutine d_gs_solver_csetc(sv,what,val,info) + subroutine z_gs_solver_csetc(sv,what,val,info) Implicit None @@ -422,7 +422,7 @@ contains character(len=*), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act, ival - character(len=20) :: name='d_gs_solver_csetc' + character(len=20) :: name='z_gs_solver_csetc' info = psb_success_ call psb_erractionsave(err_act) @@ -444,9 +444,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_csetc + end subroutine z_gs_solver_csetc - subroutine d_gs_solver_csetr(sv,what,val,info) + subroutine z_gs_solver_csetr(sv,what,val,info) Implicit None @@ -456,7 +456,7 @@ contains real(psb_dpk_), intent(in) :: val integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_csetr' + character(len=20) :: name='z_gs_solver_csetr' call psb_erractionsave(err_act) info = psb_success_ @@ -474,9 +474,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_csetr + end subroutine z_gs_solver_csetr - subroutine d_gs_solver_free(sv,info) + subroutine z_gs_solver_free(sv,info) Implicit None @@ -484,7 +484,7 @@ contains class(mld_z_gs_solver_type), intent(inout) :: sv integer(psb_ipk_), intent(out) :: info integer(psb_ipk_) :: err_act - character(len=20) :: name='d_gs_solver_free' + character(len=20) :: name='z_gs_solver_free' call psb_erractionsave(err_act) info = psb_success_ @@ -497,9 +497,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_free + end subroutine z_gs_solver_free - subroutine d_gs_solver_descr(sv,info,iout,coarse) + subroutine z_gs_solver_descr(sv,info,iout,coarse) Implicit None @@ -535,9 +535,9 @@ contains 9999 call psb_error_handler(err_act) return - end subroutine d_gs_solver_descr + end subroutine z_gs_solver_descr - function d_gs_solver_get_nzeros(sv) result(val) + function z_gs_solver_get_nzeros(sv) result(val) implicit none ! Arguments @@ -550,9 +550,9 @@ contains val = val + sv%u%get_nzeros() return - end function d_gs_solver_get_nzeros + end function z_gs_solver_get_nzeros - function d_gs_solver_sizeof(sv) result(val) + function z_gs_solver_sizeof(sv) result(val) implicit none ! Arguments @@ -565,26 +565,32 @@ contains val = val + sv%u%sizeof() return - end function d_gs_solver_sizeof + end function z_gs_solver_sizeof - function d_gs_solver_get_fmt() result(val) + function z_gs_solver_get_fmt() result(val) implicit none character(len=32) :: val val = "Forward Gauss-Seidel solver" - end function d_gs_solver_get_fmt + end function z_gs_solver_get_fmt + + function z_gs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + val = mld_gs_ + end function z_gs_solver_get_id ! ! If this is true, then the solver needs a starting ! guess. Currently only handled in JAC smoother. ! - function d_gs_solver_is_iterative() result(val) + function z_gs_solver_is_iterative() result(val) implicit none logical :: val val = .true. - end function d_gs_solver_is_iterative + end function z_gs_solver_is_iterative subroutine z_bwgs_solver_descr(sv,info,iout,coarse) @@ -631,4 +637,11 @@ contains val = "Backward Gauss-Seidel solver" end function z_bwgs_solver_get_fmt + function z_bwgs_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_bwgs_ + end function z_bwgs_solver_get_id + end module mld_z_gs_solver diff --git a/mlprec/mld_z_id_solver.f90 b/mlprec/mld_z_id_solver.f90 index 8eaad1e9..3a505961 100644 --- a/mlprec/mld_z_id_solver.f90 +++ b/mlprec/mld_z_id_solver.f90 @@ -56,12 +56,13 @@ module mld_z_id_solver procedure, pass(sv) :: free => z_id_solver_free procedure, pass(sv) :: descr => z_id_solver_descr procedure, nopass :: get_fmt => z_id_solver_get_fmt + procedure, nopass :: get_id => z_id_solver_get_id end type mld_z_id_solver_type private :: z_id_solver_bld, & & z_id_solver_free, z_id_solver_get_fmt, & - & z_id_solver_descr + & z_id_solver_descr, z_id_solver_get_id interface subroutine mld_z_id_solver_apply_vect(alpha,sv,x,beta,y,desc_data,& @@ -118,7 +119,7 @@ module mld_z_id_solver contains - subroutine z_id_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine z_id_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) Implicit None @@ -126,7 +127,6 @@ contains type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_id_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -193,5 +193,11 @@ contains val = "Identity solver" end function z_id_solver_get_fmt + function z_id_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_f_none_ + end function z_id_solver_get_id end module mld_z_id_solver diff --git a/mlprec/mld_z_ilu_solver.f90 b/mlprec/mld_z_ilu_solver.f90 index 20126cf9..8c04f12b 100644 --- a/mlprec/mld_z_ilu_solver.f90 +++ b/mlprec/mld_z_ilu_solver.f90 @@ -88,6 +88,7 @@ module mld_z_ilu_solver procedure, pass(sv) :: sizeof => z_ilu_solver_sizeof procedure, pass(sv) :: get_nzeros => z_ilu_solver_get_nzeros procedure, nopass :: get_fmt => z_ilu_solver_get_fmt + procedure, nopass :: get_id => z_ilu_solver_get_id end type mld_z_ilu_solver_type @@ -97,7 +98,7 @@ module mld_z_ilu_solver & z_ilu_solver_descr, z_ilu_solver_sizeof, & & z_ilu_solver_default, z_ilu_solver_dmp, & & z_ilu_solver_apply_vect, z_ilu_solver_get_nzeros, & - & z_ilu_solver_get_fmt, z_ilu_solver_check + & z_ilu_solver_get_fmt, z_ilu_solver_check, z_ilu_solver_get_id interface @@ -139,7 +140,7 @@ module mld_z_ilu_solver end interface interface - subroutine mld_z_ilu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine mld_z_ilu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_z_ilu_solver_type, psb_z_vect_type, psb_dpk_, & & psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,& & psb_ipk_, psb_i_base_vect_type @@ -147,7 +148,6 @@ module mld_z_ilu_solver type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_ilu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -550,4 +550,11 @@ contains val = "ILU solver" end function z_ilu_solver_get_fmt + function z_ilu_solver_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_ilu_n_ + end function z_ilu_solver_get_id + end module mld_z_ilu_solver diff --git a/mlprec/mld_z_jac_smoother.f90 b/mlprec/mld_z_jac_smoother.f90 index 37a1cbee..2edd3367 100644 --- a/mlprec/mld_z_jac_smoother.f90 +++ b/mlprec/mld_z_jac_smoother.f90 @@ -74,12 +74,13 @@ module mld_z_jac_smoother procedure, pass(sm) :: sizeof => z_jac_smoother_sizeof procedure, pass(sm) :: get_nzeros => z_jac_smoother_get_nzeros procedure, nopass :: get_fmt => z_jac_smoother_get_fmt + procedure, nopass :: get_id => z_jac_smoother_get_id end type mld_z_jac_smoother_type private :: z_jac_smoother_free, z_jac_smoother_descr, & & z_jac_smoother_sizeof, z_jac_smoother_get_nzeros, & - & z_jac_smoother_get_fmt + & z_jac_smoother_get_fmt, z_jac_smoother_get_id interface @@ -124,14 +125,13 @@ module mld_z_jac_smoother end interface interface - subroutine mld_z_jac_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold) + subroutine mld_z_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold) import :: psb_desc_type, mld_z_jac_smoother_type, psb_z_vect_type, psb_dpk_, & & psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,& & psb_ipk_, psb_i_base_vect_type type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(inout) :: desc_a class(mld_z_jac_smoother_type), intent(inout) :: sm - character, intent(in) :: upd 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 @@ -295,4 +295,11 @@ contains val = "Jacobi smoother" end function z_jac_smoother_get_fmt + function z_jac_smoother_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_jac_ + end function z_jac_smoother_get_id + end module mld_z_jac_smoother diff --git a/mlprec/mld_z_mumps_solver.F90 b/mlprec/mld_z_mumps_solver.F90 index a5b51733..703e3717 100644 --- a/mlprec/mld_z_mumps_solver.F90 +++ b/mlprec/mld_z_mumps_solver.F90 @@ -81,6 +81,7 @@ module mld_z_mumps_solver procedure, pass(sv) :: csetr => z_mumps_solver_csetr procedure, pass(sv) :: default => z_mumps_solver_default procedure, nopass :: get_fmt => z_mumps_get_fmt + procedure, nopass :: get_id => z_mumps_get_id #if defined(HAVE_FINAL) final :: z_mumps_solver_finalize @@ -93,7 +94,8 @@ module mld_z_mumps_solver & z_mumps_solver_sizeof, z_mumps_solver_apply_vect,& & z_mumps_solver_seti, z_mumps_solver_setr, & & z_mumps_solver_cseti, z_mumps_solver_csetri, & - & z_mumps_solver_default + & z_mumps_solver_default, z_mumps_solver_get_fmt, & + & z_mumps_solver_get_id #if defined(HAVE_FINAL) private :: z_mumps_solver_finalize #endif @@ -136,7 +138,7 @@ module mld_z_mumps_solver end interface interface - subroutine z_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine z_mumps_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) import :: psb_desc_type, mld_z_mumps_solver_type, psb_z_vect_type, psb_dpk_, & & psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,& @@ -148,7 +150,6 @@ module mld_z_mumps_solver type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_mumps_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer(psb_ipk_), intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -486,5 +487,12 @@ contains val = "MUMPS solver" end function z_mumps_get_fmt + function z_mumps_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_mumps_ + end function z_mumps_get_id + end module mld_z_mumps_solver diff --git a/mlprec/mld_z_onelev_mod.f90 b/mlprec/mld_z_onelev_mod.f90 index 8a71887e..82cd315b 100644 --- a/mlprec/mld_z_onelev_mod.f90 +++ b/mlprec/mld_z_onelev_mod.f90 @@ -432,15 +432,14 @@ contains ! Arguments class(mld_z_onelev_type), target, intent(inout) :: lv - lv%parms%sweeps = 1 lv%parms%sweeps_pre = 1 lv%parms%sweeps_post = 1 - lv%parms%ml_type = mld_vcycle_ml_ - lv%parms%aggr_alg = mld_dec_aggr_ + lv%parms%ml_cycle = mld_vcycle_ml_ + lv%parms%aggr_type = mld_vmb_ + lv%parms%par_aggr_alg = mld_dec_aggr_ lv%parms%aggr_ord = mld_aggr_ord_nat_ - lv%parms%aggr_kind = mld_smooth_prol_ + lv%parms%aggr_prol = mld_smooth_prol_ lv%parms%coarse_mat = mld_distr_mat_ - lv%parms%smoother_pos = mld_twoside_smooth_ lv%parms%aggr_omega_alg = mld_eig_est_ lv%parms%aggr_eig = mld_max_norm_ lv%parms%aggr_filter = mld_no_filter_mat_ diff --git a/mlprec/mld_z_prec_type.f90 b/mlprec/mld_z_prec_type.f90 index 25a9a2a6..2dcddc33 100644 --- a/mlprec/mld_z_prec_type.f90 +++ b/mlprec/mld_z_prec_type.f90 @@ -88,12 +88,12 @@ module mld_z_prec_type ! ! Aggregation defaults: ! - ! 1. coarse_aggr_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) - integer(psb_ipk_) :: coarse_aggr_size = izero + ! 1. min_coarse_size = 0 Default target size will be computed as 40*(N_fine)**(1./3.) + integer(psb_ipk_) :: min_coarse_size = izero ! 2. maximum number of levels. Defaults to 20 - integer(psb_ipk_) :: max_prec_levs = 20_psb_ipk_ - ! 3. min_aggr_ratio = 1.5 - real(psb_dpk_) :: min_aggr_ratio = 1.5_psb_dpk_ + integer(psb_ipk_) :: max_levs = 20_psb_ipk_ + ! 3. min_cr_ratio = 1.5 + real(psb_dpk_) :: min_cr_ratio = 1.5_psb_dpk_ real(psb_dpk_) :: op_complexity=dzero ! ! Number of outer sweeps. Sometimes 2 V-cycles may be better than 1 W-cycle. @@ -577,9 +577,9 @@ contains endif call prec%precv(1)%sm%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_pre > 1) then + write(iout_,*) ' Number of smoother sweeps_pre : ',& + & prec%precv(1)%parms%sweeps_pre end if write(iout_,*) return @@ -588,9 +588,9 @@ contains write(iout_,*) 'Post smoother details' call prec%precv(1)%sm2a%descr(info,iout=iout_) if (nlev == 1) then - if (prec%precv(1)%parms%sweeps > 1) then - write(iout_,*) ' Number of smoother sweeps : ',& - & prec%precv(1)%parms%sweeps + if (prec%precv(1)%parms%sweeps_post > 1) then + write(iout_,*) ' Number of smoother sweeps_post : ',& + & prec%precv(1)%parms%sweeps_post end if write(iout_,*) return @@ -884,9 +884,9 @@ contains select type(pout => precout) class is (mld_zprec_type) pout%ictxt = prec%ictxt - pout%coarse_aggr_size = prec%coarse_aggr_size - pout%max_prec_levs = prec%max_prec_levs - pout%coarse_aggr_size = prec%coarse_aggr_size + pout%max_levs = prec%max_levs + pout%min_coarse_size = prec%min_coarse_size + pout%min_cr_ratio = prec%min_cr_ratio pout%outer_sweeps = prec%outer_sweeps pout%op_complexity = prec%op_complexity if (allocated(prec%precv)) then diff --git a/mlprec/mld_z_slu_solver.F90 b/mlprec/mld_z_slu_solver.F90 index 1b1ff7b2..04eed6a6 100644 --- a/mlprec/mld_z_slu_solver.F90 +++ b/mlprec/mld_z_slu_solver.F90 @@ -71,6 +71,8 @@ module mld_z_slu_solver procedure, pass(sv) :: free => z_slu_solver_free procedure, pass(sv) :: descr => z_slu_solver_descr procedure, pass(sv) :: sizeof => z_slu_solver_sizeof + procedure, nopass :: get_fmt => z_slu_get_fmt + procedure, nopass :: get_id => z_slu_get_id #if defined(HAVE_FINAL) final :: z_slu_solver_finalize #endif @@ -79,7 +81,8 @@ module mld_z_slu_solver private :: z_slu_solver_bld, z_slu_solver_apply, & & z_slu_solver_free, z_slu_solver_descr, & - & z_slu_solver_sizeof, z_slu_solver_apply_vect + & z_slu_solver_sizeof, z_slu_solver_apply_vect, & + & z_slu_solver_get_fmt, z_slu_solver_get_id #if defined(HAVE_FINAL) private :: z_slu_solver_finalize #endif @@ -248,7 +251,7 @@ contains end subroutine z_slu_solver_apply_vect - subroutine z_slu_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine z_slu_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -258,7 +261,6 @@ contains type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_slu_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -280,42 +282,34 @@ contains call psb_info(ictxt, me, np) if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' start' - - + + n_row = desc_a%get_local_rows() n_col = desc_a%get_local_cols() - - if (psb_toupper(upd) == 'F') then - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) - nrow_a = atmp%get_nrows() - call atmp%a%csclip(acoo,info,jmax=nrow_a) - call acsc%mv_from_coo(acoo,info) - nztota = acsc%get_nzeros() - ! Fix the entries to call C-base SuperLU - acsc%ia(:) = acsc%ia(:) - 1 - acsc%icp(:) = acsc%icp(:) - 1 - info = mld_zslu_fact(nrow_a,nztota,acsc%val,& - & acsc%icp,acsc%ia,sv%lufactors) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_zslu_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsc%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + + + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='coo',dupl=psb_dupl_add_) + nrow_a = atmp%get_nrows() + call atmp%a%csclip(acoo,info,jmax=nrow_a) + call acsc%mv_from_coo(acoo,info) + nztota = acsc%get_nzeros() + ! Fix the entries to call C-base SuperLU + acsc%ia(:) = acsc%ia(:) - 1 + acsc%icp(:) = acsc%icp(:) - 1 + info = mld_zslu_fact(nrow_a,nztota,acsc%val,& + & acsc%icp,acsc%ia,sv%lufactors) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_zslu_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + + call acsc%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -417,5 +411,19 @@ contains val = val + sv%numsize return end function z_slu_solver_sizeof + + function z_slu_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "SuperLU solver" + end function z_slu_get_fmt + + function z_slu_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_slu_ + end function z_slu_get_id #endif end module mld_z_slu_solver diff --git a/mlprec/mld_z_sludist_solver.F90 b/mlprec/mld_z_sludist_solver.F90 index 96c7db7b..3db48038 100644 --- a/mlprec/mld_z_sludist_solver.F90 +++ b/mlprec/mld_z_sludist_solver.F90 @@ -70,6 +70,8 @@ module mld_z_sludist_solver procedure, pass(sv) :: free => z_sludist_solver_free procedure, pass(sv) :: descr => z_sludist_solver_descr procedure, pass(sv) :: sizeof => z_sludist_solver_sizeof + procedure, nopass :: get_fmt => z_sludist_get_fmt + procedure, nopass :: get_id => z_sludist_get_id #if defined(HAVE_FINAL) final :: z_sludist_solver_finalize #endif @@ -78,7 +80,8 @@ module mld_z_sludist_solver private :: z_sludist_solver_bld, z_sludist_solver_apply, & & z_sludist_solver_free, z_sludist_solver_descr, & - & z_sludist_solver_sizeof, z_sludist_solver_apply_vect + & z_sludist_solver_sizeof, z_sludist_solver_apply_vect, & + & z_sludist_solver_get_fmt, z_sludist_solver_get_id #if defined(HAVE_FINAL) private :: z_sludist_solver_finalize #endif @@ -250,7 +253,7 @@ contains end subroutine z_sludist_solver_apply_vect - subroutine z_sludist_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine z_sludist_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -260,7 +263,6 @@ contains type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_sludist_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -286,45 +288,37 @@ contains & write(debug_unit,*) me,' ',trim(name),' start' - if (psb_toupper(upd) == 'F') then - - n_row = desc_a%get_local_rows() - n_col = desc_a%get_local_cols() - nglob = desc_a%get_global_rows() - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) - call atmp%mv_to(acsr) - nrow_a = acsr%get_nrows() - nztota = acsr%get_nzeros() - ! Fix the entries to call C-base SuperLU - call psb_loc_to_glob(1,ifrst,desc_a,info) - call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info) - call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I') - acsr%ja(:) = acsr%ja(:) - 1 - acsr%irp(:) = acsr%irp(:) - 1 - ifrst = ifrst - 1 - info = mld_zsludist_fact(nglob,nrow_a,nztota,ifrst,& - & acsr%val,acsr%irp,acsr%ja,sv%lufactors,& - & npr,npc) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_zsludist_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsr%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) - goto 9999 - + + n_row = desc_a%get_local_rows() + n_col = desc_a%get_local_cols() + nglob = desc_a%get_global_rows() + + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='csr',dupl=psb_dupl_add_) + call atmp%mv_to(acsr) + nrow_a = acsr%get_nrows() + nztota = acsr%get_nzeros() + ! Fix the entries to call C-base SuperLU + call psb_loc_to_glob(1,ifrst,desc_a,info) + call psb_loc_to_glob(nrow_a,ibcheck,desc_a,info) + call psb_loc_to_glob(acsr%ja(1:nztota),desc_a,info,iact='I') + acsr%ja(:) = acsr%ja(:) - 1 + acsr%irp(:) = acsr%irp(:) - 1 + ifrst = ifrst - 1 + info = mld_zsludist_fact(nglob,nrow_a,nztota,ifrst,& + & acsr%val,acsr%irp,acsr%ja,sv%lufactors,& + & npr,npc) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_zsludist_fact' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if + + call acsr%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -426,5 +420,19 @@ contains val = val + sv%numsize return end function z_sludist_solver_sizeof + + function z_sludist_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "SuperLU_Dist solver" + end function z_sludist_get_fmt + + function z_sludist_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_sludist_ + end function z_sludist_get_id #endif end module mld_z_sludist_solver diff --git a/mlprec/mld_z_umf_solver.F90 b/mlprec/mld_z_umf_solver.F90 index 5b94a3a2..6d1a16be 100644 --- a/mlprec/mld_z_umf_solver.F90 +++ b/mlprec/mld_z_umf_solver.F90 @@ -70,6 +70,8 @@ module mld_z_umf_solver procedure, pass(sv) :: free => z_umf_solver_free procedure, pass(sv) :: descr => z_umf_solver_descr procedure, pass(sv) :: sizeof => z_umf_solver_sizeof + procedure, nopass :: get_fmt => z_umf_get_fmt + procedure, nopass :: get_id => z_umf_get_id #if defined(HAVE_FINAL) final :: z_umf_solver_finalize #endif @@ -78,7 +80,8 @@ module mld_z_umf_solver private :: z_umf_solver_bld, z_umf_solver_apply, & & z_umf_solver_free, z_umf_solver_descr, & - & z_umf_solver_sizeof, z_umf_solver_apply_vect + & z_umf_solver_sizeof, z_umf_solver_apply_vect, & + & z_umf_solver_get_fmt, z_umf_solver_get_id #if defined(HAVE_FINAL) private :: z_umf_solver_finalize #endif @@ -252,7 +255,7 @@ contains end subroutine z_umf_solver_apply_vect - subroutine z_umf_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold) + subroutine z_umf_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold) use psb_base_mod @@ -262,7 +265,6 @@ contains type(psb_zspmat_type), intent(in), target :: a Type(psb_desc_type), Intent(in) :: desc_a class(mld_z_umf_solver_type), intent(inout) :: sv - character, intent(in) :: upd integer, intent(out) :: info type(psb_zspmat_type), intent(in), target, optional :: b class(psb_z_base_sparse_mat), intent(in), optional :: amold @@ -288,37 +290,28 @@ contains n_row = desc_a%get_local_rows() n_col = desc_a%get_local_cols() - if (psb_toupper(upd) == 'F') then - - call a%cscnv(atmp,info,type='coo') - call psb_rwextd(n_row,atmp,info,b=b) - call atmp%cscnv(info,type='csc',dupl=psb_dupl_add_) - call atmp%mv_to(acsc) - nrow_a = acsc%get_nrows() - nztota = acsc%get_nzeros() - ! Fix the entres to call C-base UMFPACK. - acsc%ia(:) = acsc%ia(:) - 1 - acsc%icp(:) = acsc%icp(:) - 1 - info = mld_zumf_fact(nrow_a,nztota,acsc%val,& - & acsc%ia,acsc%icp,sv%symbolic,sv%numeric,& - & sv%symbsize,sv%numsize) - - if (info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='mld_zumf_fact' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call acsc%free() - call atmp%free() - else - ! ? - info=psb_err_internal_error_ - call psb_errpush(info,name) + call a%cscnv(atmp,info,type='coo') + call psb_rwextd(n_row,atmp,info,b=b) + call atmp%cscnv(info,type='csc',dupl=psb_dupl_add_) + call atmp%mv_to(acsc) + nrow_a = acsc%get_nrows() + nztota = acsc%get_nzeros() + ! Fix the entres to call C-base UMFPACK. + acsc%ia(:) = acsc%ia(:) - 1 + acsc%icp(:) = acsc%icp(:) - 1 + info = mld_zumf_fact(nrow_a,nztota,acsc%val,& + & acsc%ia,acsc%icp,sv%symbolic,sv%numeric,& + & sv%symbsize,sv%numsize) + + if (info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='mld_zumf_fact' + call psb_errpush(info,name,a_err=ch_err) goto 9999 - end if + + call acsc%free() + call atmp%free() if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),' end' @@ -422,5 +415,19 @@ contains val = val + sv%numsize return end function z_umf_solver_sizeof + + function z_umf_get_fmt() result(val) + implicit none + character(len=32) :: val + + val = "UMFPACK solver" + end function z_umf_get_fmt + + function z_umf_get_id() result(val) + implicit none + integer(psb_ipk_) :: val + + val = mld_umf_ + end function z_umf_get_id #endif end module mld_z_umf_solver diff --git a/tests/pdegen/Makefile b/tests/pdegen/Makefile index e39a0a7c..254d3eca 100644 --- a/tests/pdegen/Makefile +++ b/tests/pdegen/Makefile @@ -5,25 +5,25 @@ MLDLIBDIR=$(MLDDIR)/lib MLD_LIBS=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(PSBLAS_INCLUDES) $(FIFLAG). - +LINKOPT= 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 - $(FLINK) mld_d_pde3d.o data_input.o -o mld_d_pde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) $(LINKOPT) 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 - $(FLINK) mld_s_pde3d.o data_input.o -o mld_s_pde3d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) $(LINKOPT) 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 - $(FLINK) mld_d_pde2d.o data_input.o -o mld_d_pde2d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) $(LINKOPT) 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 - $(FLINK) mld_s_pde2d.o data_input.o -o mld_s_pde2d $(MLD_LIBS) $(PSBLAS_LIBS) $(LDLIBS) + $(FLINK) $(LINKOPT) 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 db417021..0df896a8 100644 --- a/tests/pdegen/mld_d_pde2d.f90 +++ b/tests/pdegen/mld_d_pde2d.f90 @@ -157,8 +157,8 @@ program mld_d_pde2d real(psb_dpk_) :: thr1 ! Threshold for fact. 1 ILU(T) character(len=16) :: smther ! Smoother integer(psb_ipk_) :: maxlevs ! Maximum number of levels in multilevel prec. - character(len=16) :: aggrkind ! smoothed/raw aggregatin - character(len=16) :: aggr_alg ! local or global aggregation + character(len=16) :: aggrprol ! smoothed/raw aggregatin + character(len=16) :: par_aggr_alg ! decouplted aggregation? character(len=16) :: aggr_ord ! Ordering for aggregation character(len=16) :: aggr_filter ! Use filtering? character(len=16) :: mltype ! additive or multiplicative 2nd level prec @@ -171,7 +171,7 @@ program mld_d_pde2d real(psb_dpk_) :: cthres ! Threshold for fact. 1 ILU(T) integer(psb_ipk_) :: cjswp ! Jacobi sweeps real(psb_dpk_) :: athres ! smoother aggregation threshold - real(psb_dpk_) :: mnaggratio ! Minimum aggregation ratio + real(psb_dpk_) :: mncrratio ! Minimum aggregation ratio end type precdata type(precdata) :: prectype type(psb_d_coo_sparse_mat) :: acoo @@ -233,23 +233,23 @@ program mld_d_pde2d ! prepare the preconditioner. ! if (psb_toupper(prectype%prec) == 'ML') then - call prec%init(prectype%prec, info) + call mld_precinit(prec,prectype%prec, info) if (prectype%csize>0)& - & call prec%set('coarse_aggr_size', prectype%csize, info) + & call mld_precset(prec,'min_coarse_size', prectype%csize, info) if (prectype%maxlevs>0)& - & call prec%set('max_prec_levs', prectype%maxlevs, info) - if (prectype%mnaggratio>0)& - & call prec%set('min_aggr_ratio', prectype%mnaggratio, info) + & call mld_precset(prec,'max_levs', prectype%maxlevs, info) + if (prectype%mncrratio>0)& + & call mld_precset(prec,'min_cr_ratio', prectype%mncrratio, info) if (prectype%athres >= dzero) & - & 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 mld_precset(prec,'aggr_thresh', prectype%athres, info) + call mld_precset(prec,'aggr_prol', prectype%aggrprol,info) + call mld_precset(prec,'par_aggr_alg', prectype%par_aggr_alg,info) + call mld_precset(prec,'aggr_ord', prectype%aggr_ord,info) + call mld_precset(prec,'aggr_filter', prectype%aggr_filter, info) call psb_barrier(ictxt) t1 = psb_wtime() - call prec%hierarchy_build(a,desc_a,info) + call mld_hierarchy_bld(a,desc_a,prec,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 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 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 psb_barrier(ictxt) t1 = psb_wtime() - call prec%smoothers_build(a,desc_a,info) + call mld_smoothers_bld(a,desc_a,prec,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 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 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 psb_barrier(ictxt) thier = dzero t1 = psb_wtime() - call prec%build(a,desc_a,info) + call mld_precbld(a,desc_a,prec,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 prec%descr(info) + if (iam == psb_root_) call mld_precdescr(prec,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 prec%free(info) + call mld_precfree(prec,info) call psb_cdfree(desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ @@ -425,11 +425,11 @@ contains call read_data(prectype%descr,psb_inp_unit) ! verbose description of the prec call read_data(prectype%prec,psb_inp_unit) ! overall prectype call read_data(prectype%csize,psb_inp_unit) ! coarse size - call read_data(prectype%mnaggratio,psb_inp_unit) ! Minimum aggregation ratio + call read_data(prectype%mncrratio,psb_inp_unit) ! Minimum aggregation ratio call read_data(prectype%athres,psb_inp_unit) ! smoother aggr thresh call read_data(prectype%maxlevs,psb_inp_unit) ! Maximum number of levels - call read_data(prectype%aggrkind,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin - call read_data(prectype%aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation + call read_data(prectype%aggrprol,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin + call read_data(prectype%par_aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation call read_data(prectype%aggr_ord,psb_inp_unit) ! aggregation ordering: natural, node degree call read_data(prectype%aggr_filter,psb_inp_unit) ! aggregation filtering: filter, no_filter call read_data(prectype%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec @@ -465,11 +465,11 @@ contains call psb_bcast(ictxt,prectype%descr) ! verbose description of the prec call psb_bcast(ictxt,prectype%prec) ! overall prectype call psb_bcast(ictxt,prectype%csize) ! coarse size - call psb_bcast(ictxt,prectype%mnaggratio) ! Minimum aggregation ratio + call psb_bcast(ictxt,prectype%mncrratio) ! Minimum aggregation ratio call psb_bcast(ictxt,prectype%athres) ! smoother aggr thresh call psb_bcast(ictxt,prectype%maxlevs) ! Maximum number of levels - call psb_bcast(ictxt,prectype%aggrkind) ! smoothed/nonsmoothed/minenergy aggregatin - call psb_bcast(ictxt,prectype%aggr_alg) ! decoupled or sym. decoupled aggregation + call psb_bcast(ictxt,prectype%aggrprol) ! smoothed/nonsmoothed/minenergy aggregatin + call psb_bcast(ictxt,prectype%par_aggr_alg) ! decoupled or sym. decoupled aggregation call psb_bcast(ictxt,prectype%aggr_ord) ! aggregation ordering: natural, node degree call psb_bcast(ictxt,prectype%aggr_filter) ! aggregation filtering: filter, no_filter call psb_bcast(ictxt,prectype%mltype) ! additive or multiplicative 2nd level prec diff --git a/tests/pdegen/mld_d_pde3d.f90 b/tests/pdegen/mld_d_pde3d.f90 index 2f2f2621..a19905c5 100644 --- a/tests/pdegen/mld_d_pde3d.f90 +++ b/tests/pdegen/mld_d_pde3d.f90 @@ -168,8 +168,8 @@ program mld_d_pde3d real(psb_dpk_) :: thr1 ! Threshold for fact. 1 ILU(T) character(len=16) :: smther ! Smoother integer(psb_ipk_) :: maxlevs ! Maximum number of levels in multilevel prec. - character(len=16) :: aggrkind ! smoothed/raw aggregatin - character(len=16) :: aggr_alg ! local or global aggregation + character(len=16) :: aggrprol ! smoothed/raw aggregatin + character(len=16) :: par_aggr_alg ! decoupled aggregation character(len=16) :: aggr_ord ! Ordering for aggregation character(len=16) :: aggr_filter ! Use filtering? character(len=16) :: mltype ! additive or multiplicative 2nd level prec @@ -182,7 +182,7 @@ program mld_d_pde3d real(psb_dpk_) :: cthres ! Threshold for fact. 1 ILU(T) integer(psb_ipk_) :: cjswp ! Jacobi sweeps real(psb_dpk_) :: athres ! smoother aggregation threshold - real(psb_dpk_) :: mnaggratio ! Minimum aggregation ratio + real(psb_dpk_) :: mncrratio ! Minimum aggregation ratio end type precdata type(precdata) :: prectype type(psb_d_coo_sparse_mat) :: acoo @@ -245,23 +245,24 @@ program mld_d_pde3d ! prepare the preconditioner. ! if (psb_toupper(prectype%prec) == 'ML') then - call prec%init(prectype%prec, info) + call mld_precinit(prec,prectype%prec, info) + if (prectype%csize>0)& - & call prec%set('coarse_aggr_size', prectype%csize, info) + & call mld_precset(prec,'min_coarse_size', prectype%csize, info) if (prectype%maxlevs>0)& - & call prec%set('max_prec_levs', prectype%maxlevs, info) - if (prectype%mnaggratio>0)& - & call prec%set('min_aggr_ratio', prectype%mnaggratio, info) + & call mld_precset(prec,'max_levs', prectype%maxlevs, info) + if (prectype%mncrratio>0)& + & call mld_precset(prec,'min_cr_ratio', prectype%mncrratio, info) if (prectype%athres >= dzero) & - & 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 mld_precset(prec,'aggr_thresh', prectype%athres, info) + call mld_precset(prec,'aggr_prol', prectype%aggrprol,info) + call mld_precset(prec,'par_aggr_alg', prectype%par_aggr_alg,info) + call mld_precset(prec,'aggr_ord', prectype%aggr_ord,info) + call mld_precset(prec,'aggr_filter', prectype%aggr_filter, info) call psb_barrier(ictxt) t1 = psb_wtime() - call prec%hierarchy_build(a,desc_a,info) + call mld_hierarchy_bld(a,desc_a,prec,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -271,27 +272,27 @@ program mld_d_pde3d thier = psb_wtime()-t1 - 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 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 psb_barrier(ictxt) t1 = psb_wtime() - call prec%smoothers_build(a,desc_a,info) + call mld_smoothers_bld(a,desc_a,prec,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -302,19 +303,19 @@ program mld_d_pde3d else nlv = 1 - 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 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 psb_barrier(ictxt) thier = dzero t1 = psb_wtime() - call prec%build(a,desc_a,info) + call mld_precbld(a,desc_a,prec,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_precbld' @@ -331,7 +332,7 @@ program mld_d_pde3d if (iam == psb_root_) & & write(psb_out_unit,'("Preconditioner time : ",es12.5)') tprec+thier - if (iam == psb_root_) call prec%descr(info) + if (iam == psb_root_) call mld_precdescr(prec,info) if (iam == psb_root_) & & write(psb_out_unit,'(" ")') @@ -390,7 +391,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 prec%free(info) + call mld_precfree(prec,info) call psb_cdfree(desc_a,info) if(info /= psb_success_) then info=psb_err_from_subroutine_ @@ -437,11 +438,11 @@ contains call read_data(prectype%descr,psb_inp_unit) ! verbose description of the prec call read_data(prectype%prec,psb_inp_unit) ! overall prectype call read_data(prectype%csize,psb_inp_unit) ! coarse size - call read_data(prectype%mnaggratio,psb_inp_unit) ! Minimum aggregation ratio + call read_data(prectype%mncrratio,psb_inp_unit) ! Minimum aggregation ratio call read_data(prectype%athres,psb_inp_unit) ! smoother aggr thresh call read_data(prectype%maxlevs,psb_inp_unit) ! Maximum number of levels - call read_data(prectype%aggrkind,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin - call read_data(prectype%aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation + call read_data(prectype%aggrprol,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin + call read_data(prectype%par_aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation call read_data(prectype%aggr_ord,psb_inp_unit) ! aggregation ordering: natural, node degree call read_data(prectype%aggr_filter,psb_inp_unit) ! aggregation filtering: filter, no_filter call read_data(prectype%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec @@ -477,11 +478,11 @@ contains call psb_bcast(ictxt,prectype%descr) ! verbose description of the prec call psb_bcast(ictxt,prectype%prec) ! overall prectype call psb_bcast(ictxt,prectype%csize) ! coarse size - call psb_bcast(ictxt,prectype%mnaggratio) ! Minimum aggregation ratio + call psb_bcast(ictxt,prectype%mncrratio) ! Minimum aggregation ratio call psb_bcast(ictxt,prectype%athres) ! smoother aggr thresh call psb_bcast(ictxt,prectype%maxlevs) ! Maximum number of levels - call psb_bcast(ictxt,prectype%aggrkind) ! smoothed/nonsmoothed/minenergy aggregatin - call psb_bcast(ictxt,prectype%aggr_alg) ! decoupled or sym. decoupled aggregation + call psb_bcast(ictxt,prectype%aggrprol) ! smoothed/nonsmoothed/minenergy aggregatin + call psb_bcast(ictxt,prectype%par_aggr_alg) ! decoupled or sym. decoupled aggregation call psb_bcast(ictxt,prectype%aggr_ord) ! aggregation ordering: natural, node degree call psb_bcast(ictxt,prectype%aggr_filter) ! aggregation filtering: filter, no_filter call psb_bcast(ictxt,prectype%mltype) ! additive or multiplicative 2nd level prec diff --git a/tests/pdegen/mld_s_pde2d.f90 b/tests/pdegen/mld_s_pde2d.f90 index 42476a07..7ac44144 100644 --- a/tests/pdegen/mld_s_pde2d.f90 +++ b/tests/pdegen/mld_s_pde2d.f90 @@ -157,8 +157,8 @@ program mld_s_pde2d real(psb_spk_) :: thr1 ! Threshold for fact. 1 ILU(T) character(len=16) :: smther ! Smoother integer(psb_ipk_) :: maxlevs ! Maximum number of levels in multilevel prec. - character(len=16) :: aggrkind ! smoothed/raw aggregatin - character(len=16) :: aggr_alg ! local or global aggregation + character(len=16) :: aggrprol ! smoothed/raw aggregatin + character(len=16) :: par_aggr_alg ! decouplted aggregation? character(len=16) :: aggr_ord ! Ordering for aggregation character(len=16) :: aggr_filter ! Use filtering? character(len=16) :: mltype ! additive or multiplicative 2nd level prec @@ -171,7 +171,7 @@ program mld_s_pde2d real(psb_spk_) :: cthres ! Threshold for fact. 1 ILU(T) integer(psb_ipk_) :: cjswp ! Jacobi sweeps real(psb_spk_) :: athres ! smoother aggregation threshold - real(psb_spk_) :: mnaggratio ! Minimum aggregation ratio + real(psb_spk_) :: mncrratio ! Minimum aggregation ratio end type precdata type(precdata) :: prectype type(psb_s_coo_sparse_mat) :: acoo @@ -235,15 +235,15 @@ program mld_s_pde2d if (psb_toupper(prectype%prec) == 'ML') then call mld_precinit(prec,prectype%prec, info) if (prectype%csize>0)& - & call mld_precset(prec,'coarse_aggr_size', prectype%csize, info) + & call mld_precset(prec,'min_coarse_size', prectype%csize, info) if (prectype%maxlevs>0)& - & call mld_precset(prec,'max_prec_levs', prectype%maxlevs, info) - if (prectype%mnaggratio>0)& - & call mld_precset(prec,'min_aggr_ratio', prectype%mnaggratio, info) + & call mld_precset(prec,'max_levs', prectype%maxlevs, info) + if (prectype%mncrratio>0)& + & call mld_precset(prec,'min_cr_ratio', prectype%mncrratio, info) if (prectype%athres >= szero) & & 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_prol', prectype%aggrprol,info) + call mld_precset(prec,'par_aggr_alg', prectype%par_aggr_alg,info) call mld_precset(prec,'aggr_ord', prectype%aggr_ord,info) call mld_precset(prec,'aggr_filter', prectype%aggr_filter, info) @@ -425,11 +425,11 @@ contains call read_data(prectype%descr,psb_inp_unit) ! verbose description of the prec call read_data(prectype%prec,psb_inp_unit) ! overall prectype call read_data(prectype%csize,psb_inp_unit) ! coarse size - call read_data(prectype%mnaggratio,psb_inp_unit) ! Minimum aggregation ratio + call read_data(prectype%mncrratio,psb_inp_unit) ! Minimum aggregation ratio call read_data(prectype%athres,psb_inp_unit) ! smoother aggr thresh call read_data(prectype%maxlevs,psb_inp_unit) ! Maximum number of levels - call read_data(prectype%aggrkind,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin - call read_data(prectype%aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation + call read_data(prectype%aggrprol,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin + call read_data(prectype%par_aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation call read_data(prectype%aggr_ord,psb_inp_unit) ! aggregation ordering: natural, node degree call read_data(prectype%aggr_filter,psb_inp_unit) ! aggregation filtering: filter, no_filter call read_data(prectype%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec @@ -465,11 +465,11 @@ contains call psb_bcast(ictxt,prectype%descr) ! verbose description of the prec call psb_bcast(ictxt,prectype%prec) ! overall prectype call psb_bcast(ictxt,prectype%csize) ! coarse size - call psb_bcast(ictxt,prectype%mnaggratio) ! Minimum aggregation ratio + call psb_bcast(ictxt,prectype%mncrratio) ! Minimum aggregation ratio call psb_bcast(ictxt,prectype%athres) ! smoother aggr thresh call psb_bcast(ictxt,prectype%maxlevs) ! Maximum number of levels - call psb_bcast(ictxt,prectype%aggrkind) ! smoothed/nonsmoothed/minenergy aggregatin - call psb_bcast(ictxt,prectype%aggr_alg) ! decoupled or sym. decoupled aggregation + call psb_bcast(ictxt,prectype%aggrprol) ! smoothed/nonsmoothed/minenergy aggregatin + call psb_bcast(ictxt,prectype%par_aggr_alg) ! decoupled or sym. decoupled aggregation call psb_bcast(ictxt,prectype%aggr_ord) ! aggregation ordering: natural, node degree call psb_bcast(ictxt,prectype%aggr_filter) ! aggregation filtering: filter, no_filter call psb_bcast(ictxt,prectype%mltype) ! additive or multiplicative 2nd level prec diff --git a/tests/pdegen/mld_s_pde3d.f90 b/tests/pdegen/mld_s_pde3d.f90 index 9b86fdf5..a55343d8 100644 --- a/tests/pdegen/mld_s_pde3d.f90 +++ b/tests/pdegen/mld_s_pde3d.f90 @@ -168,8 +168,8 @@ program mld_s_pde3d real(psb_spk_) :: thr1 ! Threshold for fact. 1 ILU(T) character(len=16) :: smther ! Smoother integer(psb_ipk_) :: maxlevs ! Maximum number of levels in multilevel prec. - character(len=16) :: aggrkind ! smoothed/raw aggregatin - character(len=16) :: aggr_alg ! local or global aggregation + character(len=16) :: aggrprol ! smoothed/raw aggregatin + character(len=16) :: par_aggr_alg ! decoupled aggregation character(len=16) :: aggr_ord ! Ordering for aggregation character(len=16) :: aggr_filter ! Use filtering? character(len=16) :: mltype ! additive or multiplicative 2nd level prec @@ -182,7 +182,7 @@ program mld_s_pde3d real(psb_spk_) :: cthres ! Threshold for fact. 1 ILU(T) integer(psb_ipk_) :: cjswp ! Jacobi sweeps real(psb_spk_) :: athres ! smoother aggregation threshold - real(psb_spk_) :: mnaggratio ! Minimum aggregation ratio + real(psb_spk_) :: mncrratio ! Minimum aggregation ratio end type precdata type(precdata) :: prectype type(psb_s_coo_sparse_mat) :: acoo @@ -248,15 +248,15 @@ program mld_s_pde3d call mld_precinit(prec,prectype%prec, info) if (prectype%csize>0)& - & call mld_precset(prec,'coarse_aggr_size', prectype%csize, info) + & call mld_precset(prec,'min_coarse_size', prectype%csize, info) if (prectype%maxlevs>0)& - & call mld_precset(prec,'max_prec_levs', prectype%maxlevs, info) - if (prectype%mnaggratio>0)& - & call mld_precset(prec,'min_aggr_ratio', prectype%mnaggratio, info) + & call mld_precset(prec,'max_levs', prectype%maxlevs, info) + if (prectype%mncrratio>0)& + & call mld_precset(prec,'min_cr_ratio', prectype%mncrratio, info) if (prectype%athres >= szero) & & 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_prol', prectype%aggrprol,info) + call mld_precset(prec,'par_aggr_alg', prectype%par_aggr_alg,info) call mld_precset(prec,'aggr_ord', prectype%aggr_ord,info) call mld_precset(prec,'aggr_filter', prectype%aggr_filter, info) @@ -438,11 +438,11 @@ contains call read_data(prectype%descr,psb_inp_unit) ! verbose description of the prec call read_data(prectype%prec,psb_inp_unit) ! overall prectype call read_data(prectype%csize,psb_inp_unit) ! coarse size - call read_data(prectype%mnaggratio,psb_inp_unit) ! Minimum aggregation ratio + call read_data(prectype%mncrratio,psb_inp_unit) ! Minimum aggregation ratio call read_data(prectype%athres,psb_inp_unit) ! smoother aggr thresh call read_data(prectype%maxlevs,psb_inp_unit) ! Maximum number of levels - call read_data(prectype%aggrkind,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin - call read_data(prectype%aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation + call read_data(prectype%aggrprol,psb_inp_unit) ! smoothed/nonsmoothed/minenergy aggregatin + call read_data(prectype%par_aggr_alg,psb_inp_unit) ! decoupled or sym. decoupled aggregation call read_data(prectype%aggr_ord,psb_inp_unit) ! aggregation ordering: natural, node degree call read_data(prectype%aggr_filter,psb_inp_unit) ! aggregation filtering: filter, no_filter call read_data(prectype%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec @@ -478,11 +478,11 @@ contains call psb_bcast(ictxt,prectype%descr) ! verbose description of the prec call psb_bcast(ictxt,prectype%prec) ! overall prectype call psb_bcast(ictxt,prectype%csize) ! coarse size - call psb_bcast(ictxt,prectype%mnaggratio) ! Minimum aggregation ratio + call psb_bcast(ictxt,prectype%mncrratio) ! Minimum aggregation ratio call psb_bcast(ictxt,prectype%athres) ! smoother aggr thresh call psb_bcast(ictxt,prectype%maxlevs) ! Maximum number of levels - call psb_bcast(ictxt,prectype%aggrkind) ! smoothed/nonsmoothed/minenergy aggregatin - call psb_bcast(ictxt,prectype%aggr_alg) ! decoupled or sym. decoupled aggregation + call psb_bcast(ictxt,prectype%aggrprol) ! smoothed/nonsmoothed/minenergy aggregatin + call psb_bcast(ictxt,prectype%par_aggr_alg) ! decoupled or sym. decoupled aggregation call psb_bcast(ictxt,prectype%aggr_ord) ! aggregation ordering: natural, node degree call psb_bcast(ictxt,prectype%aggr_filter) ! aggregation filtering: filter, no_filter call psb_bcast(ictxt,prectype%mltype) ! additive or multiplicative 2nd level prec