mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
mld2p4-2:
configure.ac configure docs/html/node12.html docs/html/node14.html docs/html/node15.html docs/html/node18.html docs/html/node26.html docs/html/node7.html docs/mld2p4-2.0-guide.pdf docs/src/building.tex mlprec/impl/mld_dcprecset.F90 mlprec/impl/mld_dprecset.F90 mlprec/impl/mld_dslu_interface.c mlprec/impl/mld_dslud_interface.c mlprec/mld_d_slu_solver.F90 mlprec/mld_d_sludist_solver.F90 Fixes for slu. SuperLU_Dist does not work yet. Must fix configure.
This commit is contained in:
@@ -722,8 +722,6 @@ with_umfpackdir
|
||||
enable_serial
|
||||
with_superlu
|
||||
with_superludir
|
||||
with_superludist
|
||||
with_superludistdir
|
||||
'
|
||||
ac_precious_vars='build_alias
|
||||
host_alias
|
||||
@@ -1381,13 +1379,6 @@ Optional Packages:
|
||||
Default: "-lsuperlu"
|
||||
--with-superludir=DIR Specify the directory for SUPERLU library and
|
||||
includes.
|
||||
--with-superludist=LIBNAME
|
||||
Specify the libname for SUPERLUDIST library.
|
||||
Requires you also specify SuperLU. Default:
|
||||
"-lsuperlu_dist"
|
||||
--with-superludistdir=DIR
|
||||
Specify the directory for SUPERLUDIST library and
|
||||
includes.
|
||||
|
||||
Some influential environment variables:
|
||||
FC Fortran compiler command
|
||||
@@ -6426,456 +6417,13 @@ else
|
||||
SLU_FLAGS=""
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-superludist was given.
|
||||
if test "${with_superludist+set}" = set; then
|
||||
withval=$with_superludist; mld2p4_cv_superludist=$withval
|
||||
else
|
||||
mld2p4_cv_superludist='-lsuperlu_dist'
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-superludistdir was given.
|
||||
if test "${with_superludistdir+set}" = set; then
|
||||
withval=$with_superludistdir; mld2p4_cv_superludistdir=$withval
|
||||
else
|
||||
mld2p4_cv_superludistdir=''
|
||||
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
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
save_CC="$CC"
|
||||
CC=${MPICC}
|
||||
if test "x$mld2p4_cv_superludistdir" != "x"; then
|
||||
SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir"
|
||||
SLUDIST_LIBS="-L$mld2p4_cv_superludistdir"
|
||||
fi
|
||||
LIBS="$SLUDIST_LIBS $LIBS"
|
||||
CPPFLAGS="$SLUDIST_INCLUDES $CPPFLAGS"
|
||||
{ $as_echo "$as_me:$LINENO: sludist dir $mld2p4_cv_superludistdir" >&5
|
||||
$as_echo "$as_me: sludist dir $mld2p4_cv_superludistdir" >&6;}
|
||||
if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then
|
||||
{ $as_echo "$as_me:$LINENO: checking for superlu_ddefs.h" >&5
|
||||
$as_echo_n "checking for superlu_ddefs.h... " >&6; }
|
||||
if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_superlu_ddefs_h" >&5
|
||||
$as_echo "$ac_cv_header_superlu_ddefs_h" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
{ $as_echo "$as_me:$LINENO: checking superlu_ddefs.h usability" >&5
|
||||
$as_echo_n "checking superlu_ddefs.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 <superlu_ddefs.h>
|
||||
_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 superlu_ddefs.h presence" >&5
|
||||
$as_echo_n "checking superlu_ddefs.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 <superlu_ddefs.h>
|
||||
_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: superlu_ddefs.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: present but cannot be compiled" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: present but cannot be compiled" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: check for missing prerequisite headers?" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: check for missing prerequisite headers?" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: see the Autoconf documentation" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: see the Autoconf documentation" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: section \"Present But Cannot Be Compiled\"" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: proceeding with the preprocessor's result" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: proceeding with the preprocessor's result" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: in the future, the compiler will take precedence" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.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 superlu_ddefs.h" >&5
|
||||
$as_echo_n "checking for superlu_ddefs.h... " >&6; }
|
||||
if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_header_superlu_ddefs_h=$ac_header_preproc
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_superlu_ddefs_h" >&5
|
||||
$as_echo "$ac_cv_header_superlu_ddefs_h" >&6; }
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_header_superlu_ddefs_h" = x""yes; then
|
||||
pac_sludist_header_ok=yes
|
||||
else
|
||||
pac_sludist_header_ok=no; SLUDIST_INCLUDES=""
|
||||
fi
|
||||
|
||||
|
||||
if test "x$pac_sludist_header_ok" == "xno" ; then
|
||||
unset ac_cv_header_superlu_ddefs_h
|
||||
SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir/include -I$mld2p4_cv_superludistdir/Include "
|
||||
CPPFLAGS="$SLUDIST_INCLUDES $SAVE_CPPFLAGS"
|
||||
|
||||
if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then
|
||||
{ $as_echo "$as_me:$LINENO: checking for superlu_ddefs.h" >&5
|
||||
$as_echo_n "checking for superlu_ddefs.h... " >&6; }
|
||||
if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_superlu_ddefs_h" >&5
|
||||
$as_echo "$ac_cv_header_superlu_ddefs_h" >&6; }
|
||||
else
|
||||
# Is the header compilable?
|
||||
{ $as_echo "$as_me:$LINENO: checking superlu_ddefs.h usability" >&5
|
||||
$as_echo_n "checking superlu_ddefs.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 <superlu_ddefs.h>
|
||||
_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 superlu_ddefs.h presence" >&5
|
||||
$as_echo_n "checking superlu_ddefs.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 <superlu_ddefs.h>
|
||||
_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: superlu_ddefs.h: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: proceeding with the compiler's result" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: present but cannot be compiled" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: present but cannot be compiled" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: check for missing prerequisite headers?" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: check for missing prerequisite headers?" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: see the Autoconf documentation" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: see the Autoconf documentation" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: section \"Present But Cannot Be Compiled\"" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: proceeding with the preprocessor's result" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.h: proceeding with the preprocessor's result" >&2;}
|
||||
{ $as_echo "$as_me:$LINENO: WARNING: superlu_ddefs.h: in the future, the compiler will take precedence" >&5
|
||||
$as_echo "$as_me: WARNING: superlu_ddefs.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 superlu_ddefs.h" >&5
|
||||
$as_echo_n "checking for superlu_ddefs.h... " >&6; }
|
||||
if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_header_superlu_ddefs_h=$ac_header_preproc
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_superlu_ddefs_h" >&5
|
||||
$as_echo "$ac_cv_header_superlu_ddefs_h" >&6; }
|
||||
|
||||
fi
|
||||
if test "x$ac_cv_header_superlu_ddefs_h" = x""yes; then
|
||||
pac_sludist_header_ok=yes
|
||||
else
|
||||
pac_sludist_header_ok=no; SLUDIST_INCLUDES=""
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "x$pac_sludist_header_ok" == "xyes" ; then
|
||||
SLUDIST_LIBS="$mld2p4_cv_superludist $SLUDIST_LIBS"
|
||||
LIBS="$SLUDIST_LIBS -lm $LIBS";
|
||||
{ $as_echo "$as_me:$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
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char superlu_malloc_dist ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
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
|
||||
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;
|
||||
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
|
||||
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
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char superlu_malloc_dist ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
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
|
||||
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;
|
||||
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
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: $pac_sludist_lib_ok" >&5
|
||||
$as_echo "$pac_sludist_lib_ok" >&6; }
|
||||
fi
|
||||
LIBS="$save_LIBS";
|
||||
CPPFLAGS="$save_CPPFLAGS";
|
||||
CC="$save_CC";
|
||||
|
||||
#PAC_CHECK_SUPERLUDIST
|
||||
if test "x$mld2p4_cv_have_superludist" == "xyes" ; then
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ $SLUDIST_INCLUDES"
|
||||
FDEFINES="$mld_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
{ $as_echo "$as_me:$LINENO: SuperLU_Dist interface currently broken." >&5
|
||||
$as_echo "$as_me: SuperLU_Dist interface currently broken." >&6;};
|
||||
SLUDIST_FLAGS=""
|
||||
# SLUDIST_FLAGS="-DHave_SLUDist_ $SLUDIST_INCLUDES"
|
||||
# FDEFINES="$mld_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
else
|
||||
SLUDIST_FLAGS=""
|
||||
fi
|
||||
|
||||
+5
-3
@@ -226,10 +226,12 @@ else
|
||||
SLU_FLAGS=""
|
||||
fi
|
||||
|
||||
PAC_CHECK_SUPERLUDIST
|
||||
#PAC_CHECK_SUPERLUDIST
|
||||
if test "x$mld2p4_cv_have_superludist" == "xyes" ; then
|
||||
SLUDIST_FLAGS="-DHave_SLUDist_ $SLUDIST_INCLUDES"
|
||||
FDEFINES="$mld_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
AC_MSG_NOTICE([SuperLU_Dist interface currently broken.]);
|
||||
SLUDIST_FLAGS=""
|
||||
# SLUDIST_FLAGS="-DHave_SLUDist_ $SLUDIST_INCLUDES"
|
||||
# FDEFINES="$mld_cv_define_prepend-DHAVE_SLUDIST_ $FDEFINES"
|
||||
else
|
||||
SLUDIST_FLAGS=""
|
||||
fi
|
||||
|
||||
@@ -685,7 +685,7 @@ denoted by <IMG
|
||||
SRC="img67.png"
|
||||
ALT="$R_l$">.
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:mlhpost_alg"></A><A NAME="511"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:mlhpost_alg"></A><A NAME="508"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG>
|
||||
Application of the multi-level hybrid post-smoothed preconditioner.</CAPTION>
|
||||
|
||||
@@ -131,7 +131,7 @@ for the coarsest-level solvers available in MLD2P4).
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="926"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="923"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 1:</STRONG>
|
||||
Preconditioner types, corresponding strings and default choices.
|
||||
|
||||
@@ -86,7 +86,7 @@ the corresponding Fortran 95 codes are available in <code>examples/fileread/</co
|
||||
|
||||
<P>
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_default"></A><A NAME="929"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_default"></A><A NAME="926"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG>
|
||||
Setup and application of the default multi-level Schwarz preconditioner.
|
||||
@@ -193,7 +193,7 @@ boundary conditions are also available in the directory <code>examples/pdegen</c
|
||||
|
||||
<P>
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_3lh"></A><A NAME="931"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_3lh"></A><A NAME="928"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 3:</STRONG>
|
||||
Setup of a hybrid three-level Schwarz preconditioner.</CAPTION>
|
||||
@@ -225,7 +225,7 @@ Setup of a hybrid three-level Schwarz preconditioner.</CAPTION>
|
||||
|
||||
<P>
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_3la"></A><A NAME="933"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_3la"></A><A NAME="930"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 4:</STRONG>
|
||||
Setup of an additive three-level Schwarz preconditioner.</CAPTION>
|
||||
@@ -257,7 +257,7 @@ Setup of an additive three-level Schwarz preconditioner.</CAPTION>
|
||||
|
||||
<P>
|
||||
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_1l"></A><A NAME="935"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="fig:ex_1l"></A><A NAME="932"></A>
|
||||
<TABLE>
|
||||
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 5:</STRONG>
|
||||
Setup of a one-level Schwarz preconditioner.</CAPTION>
|
||||
|
||||
@@ -193,7 +193,7 @@ according to their needs.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1268"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1265"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 2:</STRONG>
|
||||
Parameters defining the type of multi-level preconditioner.
|
||||
@@ -238,7 +238,7 @@ Parameters defining the type of multi-level preconditioner.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1270"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1267"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 3:</STRONG>
|
||||
Parameters defining the one-level preconditioner used as smoother.
|
||||
@@ -339,7 +339,7 @@ Parameters defining the one-level preconditioner used as smoother.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1272"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1269"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 4:</STRONG>
|
||||
Parameters defining the aggregation algorithm.
|
||||
@@ -454,7 +454,7 @@ Parameters defining the aggregation algorithm.
|
||||
|
||||
<P>
|
||||
<BR><P></P>
|
||||
<DIV ALIGN="CENTER"><A NAME="1275"></A>
|
||||
<DIV ALIGN="CENTER"><A NAME="1272"></A>
|
||||
<TABLE>
|
||||
<CAPTION><STRONG>Table 5:</STRONG>
|
||||
Parameters defining the coarse-space correction at the coarsest
|
||||
|
||||
@@ -63,7 +63,7 @@ Mathematics Department, Macquarie University, Sydney.
|
||||
The command line arguments were: <BR>
|
||||
<STRONG>latex2html</STRONG> <TT>-local_icons -noaddress -dir ../../html userhtml.tex</TT>
|
||||
<P>
|
||||
The translation was initiated by Salvatore Filippone on 2013-06-10
|
||||
The translation was initiated by Salvatore Filippone on 2013-06-21
|
||||
<BR><HR>
|
||||
|
||||
</BODY>
|
||||
|
||||
+2
-12
@@ -69,7 +69,7 @@ for multilevel preconditioners may change to reflect their presence.
|
||||
<BR> <code>http://www.cise.ufl.edu/research/sparse/umfpack/</code>;
|
||||
provides serial factorization and triangular system solution for double
|
||||
precision real and complex data. We have tested
|
||||
versions 4.4 and 5.1.
|
||||
versions 5.4.
|
||||
</DD>
|
||||
<DT><STRONG>SuperLU</STRONG></DT>
|
||||
<DD>[<A
|
||||
@@ -77,19 +77,9 @@ for multilevel preconditioners may change to reflect their presence.
|
||||
A sparse direct factorization package available from
|
||||
<BR> <code>http://crd.lbl.gov/~xiaoye/SuperLU/</code>; provides serial
|
||||
factorization and triangular system solution for single and double precision,
|
||||
real and complex data. We have tested versions 3.0 and 3.1.
|
||||
</DD>
|
||||
<DT><STRONG>SuperLU_Dist</STRONG></DT>
|
||||
<DD>[<A
|
||||
HREF="node25.html#SUPERLUDIST">20</A>]
|
||||
A sparse direct factorization package available
|
||||
from the same site as SuperLU; provides parallel factorization and
|
||||
triangular system solution for double precision real and complex data.
|
||||
We have tested version 2.1.
|
||||
real and complex data. We have tested version 4.3.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR><HR>
|
||||
|
||||
</BODY>
|
||||
|
||||
+1196
-1219
File diff suppressed because it is too large
Load Diff
@@ -58,19 +58,18 @@ for multilevel preconditioners may change to reflect their presence.
|
||||
\verb|http://www.cise.ufl.edu/research/sparse/umfpack/|;
|
||||
provides serial factorization and triangular system solution for double
|
||||
precision real and complex data. We have tested
|
||||
versions 4.4 and 5.1.
|
||||
versions 5.4.
|
||||
\item[SuperLU] \cite{SUPERLU}
|
||||
A sparse direct factorization package available from \\
|
||||
\verb|http://crd.lbl.gov/~xiaoye/SuperLU/|; provides serial
|
||||
factorization and triangular system solution for single and double precision,
|
||||
real and complex data. We have tested versions 3.0 and 3.1.
|
||||
\item[SuperLU\_Dist] \cite{SUPERLUDIST}
|
||||
A sparse direct factorization package available
|
||||
from the same site as SuperLU; provides parallel factorization and
|
||||
triangular system solution for double precision real and complex data.
|
||||
We have tested version 2.1.
|
||||
real and complex data. We have tested version 4.3.
|
||||
% \item[SuperLU\_Dist] \cite{SUPERLUDIST}
|
||||
% A sparse direct factorization package available
|
||||
% from the same site as SuperLU; provides parallel factorization and
|
||||
% triangular system solution for double precision real and complex data.
|
||||
% We have tested version 2.5 and 3.3.
|
||||
\end{description}
|
||||
|
||||
\subsection{Configuration options}
|
||||
|
||||
To build MLD2P4 the first step is to use the \verb|configure| script
|
||||
|
||||
@@ -91,6 +91,9 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
|
||||
#if defined(HAVE_SLU_)
|
||||
use mld_d_slu_solver
|
||||
#endif
|
||||
#if defined(HAVE_SLUDIST_)
|
||||
use mld_d_sludist_solver
|
||||
#endif
|
||||
|
||||
implicit none
|
||||
|
||||
@@ -551,6 +554,26 @@ contains
|
||||
if (allocated(level%sm%sv)) &
|
||||
& call level%sm%sv%default()
|
||||
end if
|
||||
#endif
|
||||
#ifdef HAVE_SLUDIST_
|
||||
case (mld_sludist_)
|
||||
if (allocated(level%sm%sv)) then
|
||||
select type (sv => level%sm%sv)
|
||||
class is (mld_d_sludist_solver_type)
|
||||
! do nothing
|
||||
class default
|
||||
call level%sm%sv%free(info)
|
||||
if (info == 0) deallocate(level%sm%sv)
|
||||
if (info == 0) allocate(mld_d_sludist_solver_type ::&
|
||||
& level%sm%sv, stat=info)
|
||||
end select
|
||||
else
|
||||
allocate(mld_d_sludist_solver_type :: level%sm%sv, stat=info)
|
||||
endif
|
||||
if (allocated(level%sm)) then
|
||||
if (allocated(level%sm%sv)) &
|
||||
& call level%sm%sv%default()
|
||||
end if
|
||||
#endif
|
||||
case default
|
||||
!
|
||||
|
||||
@@ -91,6 +91,9 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
|
||||
#if defined(HAVE_SLU_)
|
||||
use mld_d_slu_solver
|
||||
#endif
|
||||
#if defined(HAVE_SLUDIST_)
|
||||
use mld_d_sludist_solver
|
||||
#endif
|
||||
|
||||
implicit none
|
||||
|
||||
@@ -551,6 +554,26 @@ contains
|
||||
if (allocated(level%sm%sv)) &
|
||||
& call level%sm%sv%default()
|
||||
end if
|
||||
#endif
|
||||
#ifdef HAVE_SLUDIST_
|
||||
case (mld_sludist_)
|
||||
if (allocated(level%sm%sv)) then
|
||||
select type (sv => level%sm%sv)
|
||||
class is (mld_d_sludist_solver_type)
|
||||
! do nothing
|
||||
class default
|
||||
call level%sm%sv%free(info)
|
||||
if (info == 0) deallocate(level%sm%sv)
|
||||
if (info == 0) allocate(mld_d_sludist_solver_type ::&
|
||||
& level%sm%sv, stat=info)
|
||||
end select
|
||||
else
|
||||
allocate(mld_d_sludist_solver_type :: level%sm%sv, stat=info)
|
||||
endif
|
||||
if (allocated(level%sm)) then
|
||||
if (allocated(level%sm%sv)) &
|
||||
& call level%sm%sv%default()
|
||||
end if
|
||||
#endif
|
||||
case default
|
||||
!
|
||||
|
||||
@@ -252,8 +252,8 @@ int mld_dslu_solve(int itrans, int n, int nrhs, double *b, int ldb,
|
||||
|
||||
/* Extract the LU factors in the factors handle */
|
||||
LUfactors = (factors_t*) f_factors;
|
||||
L = LUfactors->L;
|
||||
U = LUfactors->U;
|
||||
L = LUfactors->L;
|
||||
U = LUfactors->U;
|
||||
perm_c = LUfactors->perm_c;
|
||||
perm_r = LUfactors->perm_r;
|
||||
|
||||
|
||||
@@ -115,11 +115,9 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
mld_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
int mld_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
double *values, int *rowptr, int *colind,
|
||||
void **f_factors, int nprow, int npcol)
|
||||
|
||||
{
|
||||
/*
|
||||
* This routine can be called from Fortran.
|
||||
@@ -156,7 +154,7 @@ mld_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
superlu_gridinit(MPI_COMM_WORLD, nprow, npcol, grid);
|
||||
/* Initialize the statistics variables. */
|
||||
PStatInit(&stat);
|
||||
fst_row = (ffstr) -1;
|
||||
fst_row = (ffstr);
|
||||
|
||||
A = (SuperMatrix *) malloc(sizeof(SuperMatrix));
|
||||
dCreate_CompRowLoc_Matrix_dist(A, n, n, nnzl, nl, fst_row,
|
||||
@@ -211,16 +209,8 @@ mld_dsludist_fact(int n, int nl, int nnzl, int ffstr,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mld_dsludist_solve_(int *itrans, int *n, int *nrhs,
|
||||
double *b, int *ldb,
|
||||
#ifdef Have_SLUDist_
|
||||
fptr *f_factors, /* a handle containing the address
|
||||
pointing to the factored matrices */
|
||||
#else
|
||||
void *f_factors,
|
||||
#endif
|
||||
int *info)
|
||||
int mld_dsludist_solve(int itrans, int n, int nrhs,
|
||||
double *b, int *ldb, void *f_factors)
|
||||
|
||||
{
|
||||
/*
|
||||
@@ -234,7 +224,7 @@ mld_dsludist_solve_(int *itrans, int *n, int *nrhs,
|
||||
LUstruct_t *LUstruct;
|
||||
SOLVEstruct_t SOLVEstruct;
|
||||
gridinfo_t *grid;
|
||||
int i, panel_size, permc_spec, relax;
|
||||
int i, panel_size, permc_spec, relax, info;
|
||||
trans_t trans;
|
||||
double drop_tol = 0.0;
|
||||
double *berr;
|
||||
@@ -243,7 +233,7 @@ mld_dsludist_solve_(int *itrans, int *n, int *nrhs,
|
||||
SuperLUStat_t stat;
|
||||
factors_t *LUfactors;
|
||||
|
||||
LUfactors = (factors_t *) *f_factors ;
|
||||
LUfactors = (factors_t *) f_factors ;
|
||||
A = LUfactors->A ;
|
||||
LUstruct = LUfactors->LUstruct ;
|
||||
grid = LUfactors->grid ;
|
||||
@@ -255,18 +245,18 @@ mld_dsludist_solve_(int *itrans, int *n, int *nrhs,
|
||||
/* fprintf(stderr,"slud solve: LUstruct %p %p\n",LUstruct,LUfactors->LUstruct); */
|
||||
|
||||
|
||||
if (*itrans == 0) {
|
||||
if (itrans == 0) {
|
||||
trans = NOTRANS;
|
||||
} else if (*itrans ==1) {
|
||||
} else if (itrans ==1) {
|
||||
trans = TRANS;
|
||||
} else if (*itrans ==2) {
|
||||
} else if (itrans ==2) {
|
||||
trans = CONJ;
|
||||
} else {
|
||||
trans = NOTRANS;
|
||||
}
|
||||
|
||||
/* fprintf(stderr,"Entry to sludist_solve\n"); */
|
||||
berr = (double *) malloc((*nrhs) *sizeof(double));
|
||||
berr = (double *) malloc((nrhs) *sizeof(double));
|
||||
|
||||
/* Initialize the statistics variables. */
|
||||
PStatInit(&stat);
|
||||
@@ -277,8 +267,8 @@ mld_dsludist_solve_(int *itrans, int *n, int *nrhs,
|
||||
options.Fact = FACTORED;
|
||||
options.PrintStat = NO;
|
||||
|
||||
pdgssvx(&options, A, ScalePermstruct, b, *ldb, *nrhs,
|
||||
grid, LUstruct, &SOLVEstruct, berr, &stat, info);
|
||||
pdgssvx(&options, A, ScalePermstruct, b, ldb, nrhs,
|
||||
grid, LUstruct, &SOLVEstruct, berr, &stat, &info);
|
||||
|
||||
/* fprintf(stderr,"Double check: after solve %d %lf\n",*info,berr[0]); */
|
||||
if (options.SolveInitialized) {
|
||||
@@ -286,23 +276,17 @@ mld_dsludist_solve_(int *itrans, int *n, int *nrhs,
|
||||
}
|
||||
PStatFree(&stat);
|
||||
free(berr);
|
||||
return(info);
|
||||
#else
|
||||
fprintf(stderr," SLUDist Not Configured, fix make.inc and recompile\n");
|
||||
*info=-1;
|
||||
return(-1);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mld_dsludist_free_(
|
||||
#ifdef Have_SLUDist_
|
||||
fptr *f_factors, /* a handle containing the address
|
||||
pointing to the factored matrices */
|
||||
#else
|
||||
void *f_factors,
|
||||
#endif
|
||||
int *info)
|
||||
int mld_dsludist_free(void *f_factors)
|
||||
|
||||
|
||||
{
|
||||
/*
|
||||
@@ -326,7 +310,10 @@ mld_dsludist_free_(
|
||||
SuperLUStat_t stat;
|
||||
factors_t *LUfactors;
|
||||
|
||||
LUfactors = (factors_t *) *f_factors ;
|
||||
|
||||
if (f_factors == NULL)
|
||||
return(0);
|
||||
LUfactors = (factors_t *) f_factors ;
|
||||
A = LUfactors->A ;
|
||||
LUstruct = LUfactors->LUstruct ;
|
||||
grid = LUfactors->grid ;
|
||||
@@ -340,10 +327,11 @@ mld_dsludist_free_(
|
||||
free(grid);
|
||||
free(LUstruct);
|
||||
free(LUfactors);
|
||||
return(0);
|
||||
|
||||
#else
|
||||
fprintf(stderr," SLUDist Not Configured, fix make.inc and recompile\n");
|
||||
*info=-1;
|
||||
return(-1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -301,9 +301,9 @@ contains
|
||||
call atmp%free()
|
||||
else
|
||||
! ?
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
|
||||
end if
|
||||
|
||||
|
||||
@@ -79,26 +79,25 @@ module mld_d_sludist_solver
|
||||
|
||||
|
||||
interface
|
||||
function mld_dsludist_fact(n,nnz,values,rowptr,colind,&
|
||||
& lufactors)&
|
||||
function mld_dsludist_fact(n,nl,nnz,ifrst, &
|
||||
& values,rowptr,colind,lufactors,npr,npc) &
|
||||
& bind(c,name='mld_dsludist_fact') result(info)
|
||||
use iso_c_binding
|
||||
integer(c_int), value :: n,nnz
|
||||
integer(c_int), value :: n,nl,nnz,ifrst,npr,npc
|
||||
integer(c_int) :: info
|
||||
!integer(c_long_long) :: ssize, nsize
|
||||
integer(c_int) :: rowptr(*),colind(*)
|
||||
real(c_double) :: values(*)
|
||||
real(c_double) :: values(*)
|
||||
type(c_ptr) :: lufactors
|
||||
end function mld_dsludist_fact
|
||||
end interface
|
||||
|
||||
interface
|
||||
function mld_dsludist_solve(itrans,n,x, b, ldb, lufactors)&
|
||||
function mld_dsludist_solve(itrans,n,nrhs,b,ldb,lufactors)&
|
||||
& bind(c,name='mld_dsludist_solve') result(info)
|
||||
use iso_c_binding
|
||||
integer(c_int) :: info
|
||||
integer(c_int), value :: itrans,n,ldb
|
||||
real(c_double) :: x(*), b(ldb,*)
|
||||
real(c_double) :: b(ldb,*)
|
||||
type(c_ptr), value :: lufactors
|
||||
end function mld_dsludist_solve
|
||||
end interface
|
||||
@@ -159,24 +158,27 @@ contains
|
||||
goto 9999
|
||||
end if
|
||||
endif
|
||||
|
||||
ww(1:n_row)=x(1:n_row)
|
||||
select case(trans_)
|
||||
case('N')
|
||||
info = mld_dsludist_solve(0,n_row,ww,x,n_row,sv%lufactors)
|
||||
info = mld_dsludist_solve(0,n_row,1,ww,n_row,sv%lufactors)
|
||||
case('T')
|
||||
info = mld_dsludist_solve(1,n_row,ww,x,n_row,sv%lufactors)
|
||||
info = mld_dsludist_solve(1,n_row,1,ww,n_row,sv%lufactors)
|
||||
case('C')
|
||||
info = mld_dsludist_solve(2,n_row,ww,x,n_row,sv%lufactors)
|
||||
info = mld_dsludist_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 ILU subsolve')
|
||||
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_)&
|
||||
& 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')
|
||||
call psb_errpush(psb_err_internal_error_,&
|
||||
& name,a_err='Error in subsolve')
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
@@ -216,6 +218,10 @@ contains
|
||||
|
||||
info = psb_success_
|
||||
|
||||
write(0,*) 'SLUDIST INTERFACE IS CURRENTLY BROKEN. TO BE FIXED'
|
||||
info=psb_err_internal_error_
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
call x%v%sync()
|
||||
call y%v%sync()
|
||||
call sv%apply(alpha,x%v%v,beta,y%v%v,desc_data,trans,work,info)
|
||||
@@ -253,7 +259,8 @@ contains
|
||||
! Local variables
|
||||
type(psb_dspmat_type) :: atmp
|
||||
type(psb_d_csr_sparse_mat) :: acsr
|
||||
integer :: n_row,n_col, nrow_a, nztota
|
||||
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='d_sludist_solver_bld', ch_err
|
||||
|
||||
@@ -263,6 +270,8 @@ contains
|
||||
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'
|
||||
|
||||
@@ -271,11 +280,12 @@ contains
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
|
||||
n_row = desc_a%get_local_rows()
|
||||
n_col = desc_a%get_local_cols()
|
||||
|
||||
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_)
|
||||
@@ -283,10 +293,15 @@ contains
|
||||
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
|
||||
info = mld_dsludist_fact(nrow_a,nztota,acsr%val,&
|
||||
& acsr%irp,acsr%ja,sv%lufactors)
|
||||
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_
|
||||
@@ -393,7 +408,7 @@ contains
|
||||
iout_ = 6
|
||||
endif
|
||||
|
||||
write(iout_,*) ' SuperLU Sparse Factorization Solver. '
|
||||
write(iout_,*) ' SuperLU_Dist Sparse Factorization Solver. '
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user