Merge mumps into trunk

stopcriterion
Ambra Abdullahi 9 years ago
parent c3d57d91db
commit d096f682dd

@ -16,6 +16,7 @@ INSTALL_LIBDIR=@INSTALL_LIBDIR@
INSTALL_INCLUDEDIR=@INSTALL_INCLUDEDIR@
INSTALL_DOCSDIR=@INSTALL_DOCSDIR@
##########################################################
# #
# Additional defines and libraries for multilevel #

@ -1,5 +1,6 @@
include Make.inc
all: library
library: libdir mlp
@ -9,6 +10,7 @@ libdir:
(if test ! -d include ; then mkdir include; fi)
($(INSTALL_DATA) Make.inc include/Make.inc.mld2p4)
mlp:
cd mlprec && $(MAKE) all

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -22,7 +22,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html13"
HREF="node1.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -37,15 +38,15 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html12"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<FONT SIZE="+2"><B>MLD2P4
<BIG CLASS="XXLARGE"><B>MLD2P4
<BR>
<BR>
User's and Reference Guide</B></FONT>
<BR><I><FONT SIZE="+1">A guide for the Multi-Level Domain Decomposition
User's and Reference Guide</B></BIG>
<BR><SPAN CLASS="textit"><BIG CLASS="LARGE">A guide for the Multi-Level Domain Decomposition
Parallel Preconditioners Package
based on PSBLAS</FONT></I>
based on PSBLAS</BIG></SPAN>
<BR>
<BR>
<BR>
@ -76,7 +77,7 @@ Oct. 12, 2015
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"></A>
<UL>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html15"
HREF="node1.html">Abstract</A>
<LI><A NAME="tex2html16"

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html51"
HREF="node2.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html50"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00010000000000000000">
@ -74,7 +75,7 @@ for the ``best'' preconditioner for the problem at hand.
<P>
The package employs object-oriented design techniques in
Fortran&nbsp;2003, with interfaces to additional third party libraries
such as UMFPACK, SuperLU and SuperLU_Dist, that
such as UMFPACK, SuperLU, SuperLU_Dist and MUMPS, that
can be exploited in building multi-level preconditioners. The parallel
implementation is based on a Single Program Multiple Data (SPMD)
paradigm for distributed-memory architectures; the inter-process data
@ -86,7 +87,8 @@ the user interface of MLD2P4.
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html51"
HREF="node2.html">
@ -108,7 +110,7 @@ the user interface of MLD2P4.
<B> Previous:</B> <A NAME="tex2html42"
HREF="userhtml.html">userhtml</A>
&nbsp; <B> <A NAME="tex2html50"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -24,7 +24,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html183"
HREF="node11.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -47,7 +48,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html182"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00055000000000000000"></A><A NAME="sec:ex_and_test"></A>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html195"
HREF="node12.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html194"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00060000000000000000"></A><A NAME="sec:background"></A>
@ -57,7 +58,7 @@ Multi-level Domain Decomposition Background
</H1>
<P>
<I>Domain Decomposition</I> (DD) preconditioners, coupled with Krylov iterative
<SPAN CLASS="textit">Domain Decomposition</SPAN> (DD) preconditioners, coupled with Krylov iterative
solvers, are widely used in the parallel solution of large and sparse linear systems.
These preconditioners are based on the divide and conquer technique: the matrix
to be preconditioned is divided into submatrices, a ``local'' linear system
@ -73,7 +74,7 @@ solution of the original problem from the local solutions
HREF="node25.html#dd2_96">22</A>].
<P>
<I>Additive Schwarz</I> preconditioners are DD preconditioners using overlapping
<SPAN CLASS="textit">Additive Schwarz</SPAN> preconditioners are DD preconditioners using overlapping
submatrices, i.e. with some common rows, to couple the local information
related to the submatrices (see, e.g., [<A
HREF="node25.html#dd2_96">22</A>]).
@ -89,7 +90,7 @@ in a coarse space, which globally couples the information related to the single
submatrices.
<P>
<I>Two-level Schwarz</I> preconditioners are obtained
<SPAN CLASS="textit">Two-level Schwarz</SPAN> preconditioners are obtained
by combining basic (one-level) Schwarz preconditioners with a coarse-level
correction. In this context, the one-level preconditioner is often
called `smoother'. Different two-level preconditioners are obtained by varying the
@ -97,7 +98,7 @@ choice of the smoother and of the coarse-level correction, and the
way they are combined [<A
HREF="node25.html#dd2_96">22</A>]. The same reasoning can be applied starting
from the coarse-level system, i.e. a coarse-space correction can be built
from this system, thus obtaining <I>multi-level</I> preconditioners.
from this system, thus obtaining <SPAN CLASS="textit">multi-level</SPAN> preconditioners.
<P>
It is worth noting that optimal preconditioners do not necessarily correspond
@ -123,8 +124,8 @@ interpolation [<A
<P>
MLD2P4 uses a pure algebraic approach for building the sequence of coarse matrices
starting from the original matrix. The algebraic approach is based on the <I>smoothed
aggregation</I> algorithm [<A
starting from the original matrix. The algebraic approach is based on the <SPAN CLASS="textit">smoothed
aggregation</SPAN> algorithm [<A
HREF="node25.html#BREZINA_VANEK">1</A>,<A
HREF="node25.html#VANEK_MANDEL_BREZINA">26</A>]. A decoupled version
of this algorithm is implemented, where the smoothed aggregation is applied locally
@ -144,14 +145,15 @@ is referred to [<A
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html197"
HREF="node12.html">Multi-level Schwarz Preconditioners</A>
<LI><A NAME="tex2html198"
HREF="node13.html">Smoothed Aggregation</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html195"
HREF="node12.html">
@ -173,7 +175,7 @@ is referred to [<A
<B> Previous:</B> <A NAME="tex2html186"
HREF="node10.html">Example and test programs</A>
&nbsp; <B> <A NAME="tex2html194"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -24,7 +24,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html242"
HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -47,7 +48,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html241"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00071000000000000000"></A><A NAME="sec:examples"></A>
@ -86,7 +87,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="927"></A>
<DIV ALIGN="CENTER"><A NAME="fig:ex_default"></A><A NAME="930"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG>
Setup and application of the default multi-level Schwarz preconditioner.
@ -194,7 +195,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="929"></A>
<DIV ALIGN="CENTER"><A NAME="fig:ex_3lh"></A><A NAME="932"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 3:</STRONG>
Setup of a hybrid three-level Schwarz preconditioner.</CAPTION>
@ -227,7 +228,7 @@ Setup of a hybrid three-level Schwarz preconditioner.</CAPTION>
<P>
<DIV ALIGN="CENTER"><A NAME="fig:ex_3la"></A><A NAME="931"></A>
<DIV ALIGN="CENTER"><A NAME="fig:ex_3la"></A><A NAME="934"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 4:</STRONG>
Setup of an additive three-level Schwarz preconditioner.</CAPTION>
@ -259,7 +260,7 @@ Setup of an additive three-level Schwarz preconditioner.</CAPTION>
<P>
<DIV ALIGN="CENTER"><A NAME="fig:ex_1l"></A><A NAME="933"></A>
<DIV ALIGN="CENTER"><A NAME="fig:ex_1l"></A><A NAME="936"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 5:</STRONG>
Setup of a one-level Schwarz preconditioner.</CAPTION>
@ -283,7 +284,8 @@ Setup of a one-level Schwarz preconditioner.</CAPTION>
</DIV>
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html242"
HREF="node16.html">
@ -305,7 +307,7 @@ Setup of a one-level Schwarz preconditioner.</CAPTION>
<B> Previous:</B> <A NAME="tex2html235"
HREF="node14.html">Getting Started</A>
&nbsp; <B> <A NAME="tex2html241"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html254"
HREF="node17.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html253"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00080000000000000000"></A><A NAME="sec:userinterface"></A>
@ -72,28 +73,28 @@ i.e.
<UL>
<LI>the sparse matrix data structure, containing the matrix to be
preconditioned, must be of type <code>psb_</code><I>x</I><code>spmat_type</code>
with <I>x</I> = <code>s</code> for real single precision, <I>x</I> = <code>d</code>
for real double precision, <I>x</I> = <code>c</code> for complex single precision,
<I>x</I> = <code>z</code> for complex double precision;
preconditioned, must be of type <code>psb_</code><SPAN CLASS="textit">x</SPAN><code>spmat_type</code>
with <SPAN CLASS="textit">x</SPAN> = <code>s</code> for real single precision, <SPAN CLASS="textit">x</SPAN> = <code>d</code>
for real double precision, <SPAN CLASS="textit">x</SPAN> = <code>c</code> for complex single precision,
<SPAN CLASS="textit">x</SPAN> = <code>z</code> for complex double precision;
</LI>
<LI>the preconditioner data structure must be of type
<code>mld_</code><I>x</I><code>prec_type</code>, with <I>x</I> =
<code>mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type</code>, with <SPAN CLASS="textit">x</SPAN> =
<code>s</code>, <code>d</code>, <code>c</code>, <code>z</code>, according to the sparse
matrix data structure;
</LI>
<LI>the arrays containing the vectors <IMG
<LI>the arrays containing the vectors <SPAN CLASS="MATH"><IMG
WIDTH="14" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img22.png"
ALT="$v$"> and <IMG
ALT="$v$"></SPAN> and <SPAN CLASS="MATH"><IMG
WIDTH="17" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img89.png"
ALT="$w$"> involved in
the preconditioner application <IMG
ALT="$w$"></SPAN> involved in
the preconditioner application <SPAN CLASS="MATH"><IMG
WIDTH="86" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
SRC="img61.png"
ALT="$w=M^{-1}v$"> must be of type
<code>psb_</code><I>x</I><code>vect_type</code> with <I>x</I> =
ALT="$w=M^{-1}v$"></SPAN> must be of type
<code>psb_</code><SPAN CLASS="textit">x</SPAN><code>vect_type</code> with <SPAN CLASS="textit">x</SPAN> =
<code>s</code>, <code>d</code>, <code>c</code>, <code>z</code>, in a manner completely
analogous to the sparse matrix type;
</LI>
@ -111,7 +112,7 @@ A description of each routine is given in the remainder of this section.
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html256"
HREF="node17.html">Subroutine mld_precinit</A>
<LI><A NAME="tex2html257"
@ -126,7 +127,8 @@ A description of each routine is given in the remainder of this section.
HREF="node22.html">Subroutine mld_precdescr</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html254"
HREF="node17.html">
@ -148,7 +150,7 @@ A description of each routine is given in the remainder of this section.
<B> Previous:</B> <A NAME="tex2html245"
HREF="node15.html">Examples</A>
&nbsp; <B> <A NAME="tex2html253"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html272"
HREF="node18.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html271"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00081000000000000000"></A><A NAME="sec:precinit"></A>
@ -68,15 +69,15 @@ This routine allocates and initializes the preconditioner data structure,
according to the preconditioner type chosen by the user.
<P>
<FONT SIZE="+1"><B>Arguments</B></FONT>
<BIG CLASS="LARGE"><B>Arguments</B></BIG>
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>p</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><I>x</I><code>prec_type), intent(inout)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type), intent(inout)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <I>x</I>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <SPAN CLASS="textit">x</SPAN>
must be chosen according to the real/complex, single/double
precision version of MLD2P4 under use.</TD>
</TR>
@ -109,7 +110,8 @@ according to the preconditioner type chosen by the user.
<P>
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html272"
HREF="node18.html">
@ -131,7 +133,7 @@ according to the preconditioner type chosen by the user.
<B> Previous:</B> <A NAME="tex2html263"
HREF="node16.html">User Interface</A>
&nbsp; <B> <A NAME="tex2html271"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html284"
HREF="node19.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html283"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00082000000000000000"></A><A NAME="sec:precset"></A>
@ -88,25 +89,25 @@ the new smoother/solver variable to the setup routine as follows:
<BR><code>call p%set(solver,info [,ilev])</code>
</DIV>
In this way, the variable will act as a <I>mold</I> to which the
In this way, the variable will act as a <SPAN CLASS="textit">mold</SPAN> to which the
preconditioner will conform, even though the MLD2P4 library is not
modified, and thus has no direct knowledge about the new type.
<P>
<FONT SIZE="+1"><B>Arguments</B></FONT>
<BIG CLASS="LARGE"><B>Arguments</B></BIG>
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>p</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><I>x</I><code>prec_type), intent(inout)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type), intent(inout)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <I>x</I> must
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <SPAN CLASS="textit">x</SPAN> must
be chosen according to the real/complex, single/double precision
version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>what</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>integer, intent(in)</code> <I>or</I> <code>character(len=*)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>integer, intent(in)</code> <SPAN CLASS="textit">or</SPAN> <code>character(len=*)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The parameter to be set. It can be specified by
@ -115,8 +116,8 @@ modified, and thus has no direct knowledge about the new type.
Tables&nbsp;<A HREF="#tab:p_type">2</A>-<A HREF="#tab:p_coarse">5</A>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>val </code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>integer</code> <I>or</I> <code>character(len=*)</code> <I>or</I>
<code>real(psb_spk_)</code> <I>or</I> <code>real(psb_dpk_)</code>,
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>integer</code> <SPAN CLASS="textit">or</SPAN> <code>character(len=*)</code> <SPAN CLASS="textit">or</SPAN>
<code>real(psb_spk_)</code> <SPAN CLASS="textit">or</SPAN> <code>real(psb_dpk_)</code>,
<code>intent(in)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
@ -179,7 +180,7 @@ object is specified its defaults are also set, overriding in both
cases any previous settings even if explicitly specified. Therefore if
the user sets a new smoother, and wishes to use a solver
different from the default one, the call to set the solver must come
<I>after</I> the call to set the smoother.
<SPAN CLASS="textit">after</SPAN> the call to set the smoother.
<P>
The combination of a Jacobi smoother with a Diagonal Scaling local
solver is equivalent to the strategy called Point Jacobi in the
@ -262,10 +263,10 @@ Parameters defining the one-level preconditioner used as smoother.
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_sub_ovr_</code> <BR><code>SUB_OVR</code></TD>
<TD ALIGN="LEFT"><code>integer</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>any&nbsp;int.&nbsp;num.&nbsp;<IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>any&nbsp;int.&nbsp;num.&nbsp;<SPAN CLASS="MATH"><IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img90.png"
ALT="$\ge 0$"></TD>
ALT="$\ge 0$"></SPAN></TD>
<TD ALIGN="LEFT">1</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Number of overlap layers.</TD>
</TR>
@ -310,30 +311,30 @@ Parameters defining the one-level preconditioner used as smoother.
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_sub_fillin_</code> <BR><code>SUB_FILLIN</code></TD>
<TD ALIGN="LEFT"><code>integer</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<SPAN CLASS="MATH"><IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img90.png"
ALT="$\ge 0$"></TD>
ALT="$\ge 0$"></SPAN></TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Fill-in level <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Fill-in level <SPAN CLASS="MATH"><IMG
WIDTH="13" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img35.png"
ALT="$p$"> of the incomplete LU factorizations.</TD>
ALT="$p$"></SPAN> of the incomplete LU factorizations.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_sub_iluthrs_</code> <BR><code>SUB_ILUTHRS</code></TD>
<TD ALIGN="LEFT"><code>real(</code><I>kind_parameter</I><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;real&nbsp;num.&nbsp;<IMG
<TD ALIGN="LEFT"><code>real(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;real&nbsp;num.&nbsp;<SPAN CLASS="MATH"><IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img90.png"
ALT="$\ge 0$"></TD>
ALT="$\ge 0$"></SPAN></TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Drop tolerance <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Drop tolerance <SPAN CLASS="MATH"><IMG
WIDTH="11" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img91.png"
ALT="$t$"> in the ILU(<IMG
ALT="$t$"></SPAN> in the ILU(<SPAN CLASS="MATH"><IMG
WIDTH="27" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img36.png"
ALT="$p,t$">) factorization.</TD>
ALT="$p,t$"></SPAN>) factorization.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_sub_ren_</code> <BR><code>SUB_REN</code></TD>
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
@ -403,16 +404,16 @@ Parameters defining the aggregation algorithm.
(i.e. using the tentative prolongator).</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142><code>mld_aggr_thresh_</code> <BR><code>AGGR_THRESH</code></TD>
<TD ALIGN="LEFT"><code>real(</code><I>kind_parameter</I><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>Any&nbsp;real&nbsp;num. <IMG
<TD ALIGN="LEFT"><code>real(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>Any&nbsp;real&nbsp;num. <SPAN CLASS="MATH"><IMG
WIDTH="56" HEIGHT="36" ALIGN="MIDDLE" BORDER="0"
SRC="img93.png"
ALT="$\in [0, 1]$"></TD>
ALT="$\in [0, 1]$"></SPAN></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>0.05</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>Threshold <IMG
WIDTH="13" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
SRC="img94.png"
ALT="$\theta$"> in the aggregation algorithm.</TD>
ALT="$\theta$"></SPAN> in the aggregation algorithm.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142><code>mld_aggr_scale_</code> <BR><code>AGGR_SCALE</code></TD>
<TD ALIGN="LEFT"><code>real(</code><I>kind_parameter</I><code>)</code></TD>
@ -434,55 +435,55 @@ Parameters defining the aggregation algorithm.
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68><TT>'EIG_EST'</TT> <TT>'USER_CHOICE'</TT></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68><TT>'EIG_EST'</TT></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>How the damping parameter <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>How the damping parameter <SPAN CLASS="MATH"><IMG
WIDTH="16" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img86.png"
ALT="$\omega$"> in the
ALT="$\omega$"></SPAN> in the
smoothed aggregation should be computed:
either via an estimate of the spectral radius of
<IMG
<SPAN CLASS="MATH"><IMG
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
SRC="img87.png"
ALT="$D^{-1}A$">, or explicily
ALT="$D^{-1}A$"></SPAN>, or explicily
specified by the user.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142><code>mld_aggr_eig_</code> <BR><code>AGGR_EIG</code></TD>
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68><TT>'A_NORMI'</TT></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68><TT>'A_NORMI'</TT></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>How to estimate the spectral radius of <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>How to estimate the spectral radius of <SPAN CLASS="MATH"><IMG
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
SRC="img87.png"
ALT="$D^{-1}A$">.
ALT="$D^{-1}A$"></SPAN>.
Currently only the infinity norm estimate
is available.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142><code>mld_aggr_omega_val_</code> <BR><code>AGGR_OMEGA_VAL</code></TD>
<TD ALIGN="LEFT"><code>real(</code><I>kind_parameter</I><code>)</code></TD>
<TD ALIGN="LEFT"><code>real(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>Any&nbsp;nonnegative&nbsp;real&nbsp;num.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68><!-- MATH
$4/(3\rho(D^{-1}A))$
-->
<IMG
<SPAN CLASS="MATH"><IMG
WIDTH="113" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img97.png"
ALT="$4/(3\rho(D^{-1}A))$"></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>Damping parameter <IMG
ALT="$4/(3\rho(D^{-1}A))$"></SPAN></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>Damping parameter <SPAN CLASS="MATH"><IMG
WIDTH="16" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img86.png"
ALT="$\omega$"> in the smoothed aggregation algorithm.
ALT="$\omega$"></SPAN> in the smoothed aggregation algorithm.
It must be set by the user if
<code>USER_CHOICE</code> was specified for
<code>mld_aggr_omega_alg_</code>,
otherwise it is computed by the library, using the
selected estimate of the spectral radius <IMG
selected estimate of the spectral radius <SPAN CLASS="MATH"><IMG
WIDTH="73" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img98.png"
ALT="$\rho(D^{-1}A)$"> of
<IMG
ALT="$\rho(D^{-1}A)$"></SPAN> of
<SPAN CLASS="MATH"><IMG
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
SRC="img87.png"
ALT="$D^{-1}A$">.</TD>
ALT="$D^{-1}A$"></SPAN>.</TD>
</TR>
</TABLE>
</DIV>
@ -534,63 +535,63 @@ level.</CAPTION>
<TD ALIGN="LEFT">See note</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Solver for the diagonal blocks of the coarse matrix,
in case the block Jacobi solver
is chosen as coarsest-level solver: ILU(<IMG
is chosen as coarsest-level solver: ILU(<SPAN CLASS="MATH"><IMG
WIDTH="13" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img35.png"
ALT="$p$">), MILU(<IMG
ALT="$p$"></SPAN>), MILU(<SPAN CLASS="MATH"><IMG
WIDTH="13" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img35.png"
ALT="$p$">),
ILU(<IMG
ALT="$p$"></SPAN>),
ILU(<SPAN CLASS="MATH"><IMG
WIDTH="27" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img36.png"
ALT="$p,t$">), LU from UMFPACK,
ALT="$p,t$"></SPAN>), LU from UMFPACK,
LU from SuperLU, plus triangular solve.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_coarse_sweeps_</code> <BR><code>COARSE_SWEEPS</code></TD>
<TD ALIGN="LEFT"><code>integer</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<SPAN CLASS="MATH"><IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img99.png"
ALT="$&gt; 0$"></TD>
ALT="$&gt; 0$"></SPAN></TD>
<TD ALIGN="LEFT">4</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Number of Block-Jacobi sweeps when 'BJAC' is used as
coarsest-level solver.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_coarse_fillin_</code> <BR><code>COARSE_FILLIN</code></TD>
<TD ALIGN="LEFT"><code>integer</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<SPAN CLASS="MATH"><IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img90.png"
ALT="$\ge 0$"></TD>
ALT="$\ge 0$"></SPAN></TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Fill-in level <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Fill-in level <SPAN CLASS="MATH"><IMG
WIDTH="13" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img35.png"
ALT="$p$"> of the incomplete LU factorizations.</TD>
ALT="$p$"></SPAN> of the incomplete LU factorizations.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=99><code>mld_coarse_iluthrs_</code> <BR><code>COARSE_ILUTHRS</code></TD>
<TD ALIGN="LEFT"><code>real(</code><I>kind_parameter</I><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;real.&nbsp;num.&nbsp;<IMG
<TD ALIGN="LEFT"><code>real(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;real.&nbsp;num.&nbsp;<SPAN CLASS="MATH"><IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img90.png"
ALT="$\ge 0$"></TD>
ALT="$\ge 0$"></SPAN></TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Drop tolerance <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Drop tolerance <SPAN CLASS="MATH"><IMG
WIDTH="11" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img91.png"
ALT="$t$"> in the ILU(<IMG
ALT="$t$"></SPAN> in the ILU(<SPAN CLASS="MATH"><IMG
WIDTH="27" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img36.png"
ALT="$p,t$">) factorization.</TD>
ALT="$p,t$"></SPAN>) factorization.</TD>
</TR>
<TR><TD ALIGN="LEFT" COLSPAN=5><B>Note:</B> defaults for
<TT>m</TT>ld_coarse_subsolve_ are chosen as</TD>
<TR><TD ALIGN="LEFT" COLSPAN=5><SPAN><B>Note:</B> defaults for
<TT>m</TT>ld_coarse_subsolve_ are chosen as </SPAN></TD>
</TR>
<TR><TD ALIGN="LEFT" COLSPAN=5>single precision version: 'SLU' if installed, 'ILU' otherwise</TD>
<TR><TD ALIGN="LEFT" COLSPAN=5><SPAN>single precision version: 'SLU' if installed, 'ILU' otherwise</SPAN></TD>
</TR>
<TR><TD ALIGN="LEFT" COLSPAN=5>double precision version: 'UMF' if installed,
else 'SLU' if installed, 'ILU' otherwise</TD>
<TR><TD ALIGN="LEFT" COLSPAN=5><SPAN>double precision version: 'UMF' if installed,
else 'SLU' if installed, 'ILU' otherwise</SPAN></TD>
</TR>
</TABLE>
</DIV>
@ -602,7 +603,8 @@ level.</CAPTION>
<P>
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html284"
HREF="node19.html">
@ -624,7 +626,7 @@ level.</CAPTION>
<B> Previous:</B> <A NAME="tex2html275"
HREF="node17.html">Subroutine mld_precinit</A>
&nbsp; <B> <A NAME="tex2html283"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html296"
HREF="node20.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html295"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00083000000000000000"></A><A NAME="sec:precbld"></A>
@ -67,16 +68,16 @@ This routine builds the preconditioner according to the requirements made by
the user through the routines <code>mld_precinit</code> and <code>mld_precset</code>.
<P>
<FONT SIZE="+1"><B>Arguments</B></FONT>
<BIG CLASS="LARGE"><B>Arguments</B></BIG>
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>a</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(psb_</code><I>x</I><code>spmat_type), intent(in)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(psb_</code><SPAN CLASS="textit">x</SPAN><code>spmat_type), intent(in)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The sparse matrix structure containing the local part of the
matrix to be preconditioned. Note that <I>x</I> must be chosen according
matrix to be preconditioned. Note that <SPAN CLASS="textit">x</SPAN> must be chosen according
to the real/complex,
single/double precision version of MLD2P4 under use.
See the PSBLAS User's Guide for details [<A
@ -91,10 +92,10 @@ single/double precision version of MLD2P4 under use.
HREF="node25.html#PSBLASGUIDE">15</A>].</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>p</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><I>x</I><code>prec_type), intent(inout)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type), intent(inout)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <I>x</I> must be chosen according
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <SPAN CLASS="textit">x</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>info</code></TD>
@ -107,7 +108,7 @@ single/double precision version of MLD2P4 under use.
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html296"
HREF="node20.html">
@ -129,7 +130,7 @@ single/double precision version of MLD2P4 under use.
<B> Previous:</B> <A NAME="tex2html287"
HREF="node18.html">Subroutine mld_precset</A>
&nbsp; <B> <A NAME="tex2html295"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html61"
HREF="node3.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -43,7 +44,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
<B> Previous:</B> <A NAME="tex2html54"
HREF="node1.html">Abstract</A>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<BR>
@ -52,7 +53,7 @@ Contents</A>
</H2>
<!--Table of Contents-->
<UL>
<UL CLASS="TofC">
<LI><A NAME="tex2html63"
HREF="node3.html">General Overview</A>
<LI><A NAME="tex2html64"

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html308"
HREF="node21.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html307"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00084000000000000000"></A><A NAME="sec:precaply"></A>
@ -67,17 +68,17 @@ Subroutine mld_precaply
This routine computes <!-- MATH
$y = op(M^{-1})\, x$
-->
<IMG
<SPAN CLASS="MATH"><IMG
WIDTH="117" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img100.png"
ALT="$y = op(M^{-1}) x$">, where <IMG
ALT="$y = op(M^{-1}) x$"></SPAN>, where <SPAN CLASS="MATH"><IMG
WIDTH="23" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img60.png"
ALT="$M$"> is a previously built
preconditioner, stored into <code>p</code>, and <IMG
ALT="$M$"></SPAN> is a previously built
preconditioner, stored into <code>p</code>, and <SPAN CLASS="MATH"><IMG
WIDTH="22" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img101.png"
ALT="$op$">
ALT="$op$"></SPAN>
denotes the preconditioner itself or its transpose, according to
the value of <code>trans</code>.
Note that, when MLD2P4 is used with a Krylov solver from PSBLAS,
@ -85,41 +86,41 @@ Note that, when MLD2P4 is used with a Krylov solver from PSBLAS,
and hence it is completely transparent to the user.
<P>
<FONT SIZE="+1"><B>Arguments</B></FONT>
<BIG CLASS="LARGE"><B>Arguments</B></BIG>
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>p</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><I>x</I><code>prec_type), intent(inout)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type), intent(inout)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure, containing the local part of <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure, containing the local part of <SPAN CLASS="MATH"><IMG
WIDTH="23" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img60.png"
ALT="$M$">.
Note that <I>x</I> must be chosen according
ALT="$M$"></SPAN>.
Note that <SPAN CLASS="textit">x</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>x</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><I>type</I><code>(</code><I>kind_parameter</I><code>), dimension(:), intent(in)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><SPAN CLASS="textit">type</SPAN><code>(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>), dimension(:), intent(in)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The local part of the vector <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The local part of the vector <SPAN CLASS="MATH"><IMG
WIDTH="14" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img102.png"
ALT="$x$">. Note that <I>type</I> and
<I>kind_parameter</I> must be chosen according
ALT="$x$"></SPAN>. Note that <SPAN CLASS="textit">type</SPAN> and
<SPAN CLASS="textit">kind_parameter</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>y</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><I>type</I><code>(</code><I>kind_parameter</I><code>), dimension(:), intent(out)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><SPAN CLASS="textit">type</SPAN><code>(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>), dimension(:), intent(out)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The local part of the vector <IMG
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The local part of the vector <SPAN CLASS="MATH"><IMG
WIDTH="14" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img103.png"
ALT="$y$">. Note that <I>type</I> and
<I>kind_parameter</I> must be chosen according
ALT="$y$"></SPAN>. Note that <SPAN CLASS="textit">type</SPAN> and
<SPAN CLASS="textit">kind_parameter</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>desc_a</code></TD>
@ -142,39 +143,39 @@ and hence it is completely transparent to the user.
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>If <code>trans</code> = <code>'N','n'</code> then <!-- MATH
$op(M^{-1}) = M^{-1}$
-->
<IMG
<SPAN CLASS="MATH"><IMG
WIDTH="132" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img104.png"
ALT="$op(M^{-1}) = M^{-1}$">;
ALT="$op(M^{-1}) = M^{-1}$"></SPAN>;
if <code>trans</code> = <code>'T','t'</code> then <!-- MATH
$op(M^{-1}) = M^{-T}$
-->
<IMG
<SPAN CLASS="MATH"><IMG
WIDTH="135" HEIGHT="40" ALIGN="MIDDLE" BORDER="0"
SRC="img105.png"
ALT="$op(M^{-1}) = M^{-T}$">
(transpose of <IMG
ALT="$op(M^{-1}) = M^{-T}$"></SPAN>
(transpose of <SPAN CLASS="MATH"><IMG
WIDTH="48" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img106.png"
ALT="$M^{-1})$">; if <code>trans</code> = <code>'C','c'</code> then <!-- MATH
ALT="$M^{-1})$"></SPAN>; if <code>trans</code> = <code>'C','c'</code> then <!-- MATH
$op(M^{-1}) = M^{-C}$
-->
<IMG
<SPAN CLASS="MATH"><IMG
WIDTH="136" HEIGHT="40" ALIGN="MIDDLE" BORDER="0"
SRC="img107.png"
ALT="$op(M^{-1}) = M^{-C}$">
(conjugate transpose of <IMG
ALT="$op(M^{-1}) = M^{-C}$"></SPAN>
(conjugate transpose of <SPAN CLASS="MATH"><IMG
WIDTH="48" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img106.png"
ALT="$M^{-1})$">.</TD>
ALT="$M^{-1})$"></SPAN>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>work</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><I>type</I><code>(</code><I>kind_parameter</I><code>), dimension(:), optional, target</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><SPAN CLASS="textit">type</SPAN><code>(</code><SPAN CLASS="textit">kind_parameter</SPAN><code>), dimension(:), optional, target</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>Workspace. Its size should be at
least <code>4 * psb_cd_get_local_</code> <code>cols(desc_a)</code> (see the PSBLAS User's Guide).
Note that <I>type</I> and <I>kind_parameter</I> must be chosen according
Note that <SPAN CLASS="textit">type</SPAN> and <SPAN CLASS="textit">kind_parameter</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
</TABLE>
@ -182,7 +183,8 @@ and hence it is completely transparent to the user.
<P>
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html308"
HREF="node21.html">
@ -204,7 +206,7 @@ and hence it is completely transparent to the user.
<B> Previous:</B> <A NAME="tex2html299"
HREF="node19.html">Subroutine mld_precbld</A>
&nbsp; <B> <A NAME="tex2html307"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html320"
HREF="node22.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html319"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00085000000000000000"></A><A NAME="sec:precfree"></A>
@ -66,15 +67,15 @@ Subroutine mld_precfree
This routine deallocates the preconditioner data structure.
<P>
<FONT SIZE="+1"><B>Arguments</B></FONT>
<BIG CLASS="LARGE"><B>Arguments</B></BIG>
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>p</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=298><code>type(mld_</code><I>x</I><code>prec_type), intent(inout)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=298><code>type(mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type), intent(inout)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=298>The preconditioner data structure. Note that <I>x</I> must be chosen according
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=298>The preconditioner data structure. Note that <SPAN CLASS="textit">x</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>info</code></TD>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -24,7 +24,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html330"
HREF="node23.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -47,7 +48,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html329"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00086000000000000000"></A><A NAME="sec:precdescr"></A>
@ -67,15 +68,15 @@ This routine prints a description of the preconditioner to the standard output o
to a file. It must be called after <code>mld_precbld</code> has been called.
<P>
<FONT SIZE="+1"><B>Arguments</B></FONT>
<BIG CLASS="LARGE"><B>Arguments</B></BIG>
<P>
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>p</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><I>x</I><code>prec_type), intent(in)</code>.</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340><code>type(mld_</code><SPAN CLASS="textit">x</SPAN><code>prec_type), intent(in)</code>.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <I>x</I> must be chosen according
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The preconditioner data structure. Note that <SPAN CLASS="textit">x</SPAN> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>info</code></TD>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html342"
HREF="node24.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html341"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00090000000000000000"></A><A NAME="sec:errors"></A>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html354"
HREF="node25.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html353"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION000100000000000000000"></A><A NAME="sec:license"></A>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html96"
HREF="node4.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html95"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00030000000000000000"></A><A NAME="sec:overview"></A>
@ -58,17 +59,18 @@ General Overview
<P>
The M<SMALL>ULTI-</SMALL>L<SMALL>EVEL </SMALL>D<SMALL>OMAIN </SMALL>D<SMALL>ECOMPOSITION </SMALL>P<SMALL>ARALLEL </SMALL>P<SMALL>RECONDITIONERS </SMALL>P<SMALL>ACKAGE BASED ON
</SMALL>PSBLAS (MLD2P4) provides <I>multi-level Schwarz preconditioners</I>&nbsp;[<A
</SMALL>PSBLAS (MLD2P4) provides <SPAN CLASS="textit">multi-level Schwarz preconditioners</SPAN>&nbsp;[<A
HREF="node25.html#dd2_96">22</A>],
to be used in the iterative solutions of sparse linear systems:
<BR>
<DIV ALIGN="RIGHT">
<DIV ALIGN="RIGHT" CLASS="mathdisplay">
<!-- MATH
\begin{equation}
Ax=b,
\end{equation}
-->
<A NAME="system1"></A>
<TABLE WIDTH="100%" ALIGN="CENTER">
<TR VALIGN="MIDDLE"><TD ALIGN="CENTER" NOWRAP><A NAME="system1"></A><IMG
WIDTH="58" HEIGHT="30" BORDER="0"
@ -76,26 +78,26 @@ Ax=b,
ALT="\begin{displaymath}
Ax=b,
\end{displaymath}"></TD>
<TD WIDTH=10 ALIGN="RIGHT">
(1)</TD></TR>
<TD CLASS="eqno" WIDTH=10 ALIGN="RIGHT">
(<SPAN CLASS="arabic">1</SPAN>)</TD></TR>
</TABLE>
<BR CLEAR="ALL"></DIV><P></P>
where <IMG
where <SPAN CLASS="MATH"><IMG
WIDTH="18" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img2.png"
ALT="$A$"> is a square, real or complex, sparse matrix with a symmetric
ALT="$A$"></SPAN> is a square, real or complex, sparse matrix with a symmetric
sparsity pattern. These preconditioners have the following general features:
<UL>
<LI>both <I>additive and hybrid multilevel</I> variants are implemented,
<LI>both <SPAN CLASS="textit">additive and hybrid multilevel</SPAN> variants are implemented,
i.e. variants that are additive among the levels and inside each level, and variants
that are multiplicative among the levels and additive inside each level;
the basic Additive Schwarz (AS) preconditioners are obtained by considering only one level;
</LI>
<LI>a <I>purely algebraic</I> approach is used to
<LI>a <SPAN CLASS="textit">purely algebraic</SPAN> approach is used to
generate a sequence of coarse-level corrections to a basic AS preconditioner, without
explicitly using any information on the geometry of the original problem (e.g. the
discretization of a PDE). The <I>smoothed aggregation</I> technique is applied
discretization of a PDE). The <SPAN CLASS="textit">smoothed aggregation</SPAN> technique is applied
as algebraic coarsening strategy&nbsp;[<A
HREF="node25.html#BREZINA_VANEK">1</A>,<A
HREF="node25.html#VANEK_MANDEL_BREZINA">26</A>].
@ -103,8 +105,8 @@ as algebraic coarsening strategy&nbsp;[<A
</UL>
<P>
Version 2.0 of the package is written in <I>Fortran&nbsp;2003</I>, following an
<I>object-oriented design</I> through the exploitation of features
Version 2.0 of the package is written in <SPAN CLASS="textit">Fortran&nbsp;2003</SPAN>, following an
<SPAN CLASS="textit">object-oriented design</SPAN> through the exploitation of features
such as abstract data type creation, functional overloading and
dynamic memory management. The parallel implementation is based on a Single Program Multiple Data
(SPMD) paradigm for distributed-memory architectures. Single and
@ -114,8 +116,8 @@ interface.
<P>
MLD2P4 has been designed to implement scalable and easy-to-use
multilevel preconditioners in the context of the <I>PSBLAS
(Parallel Sparse BLAS) computational framework</I>&nbsp;[<A
multilevel preconditioners in the context of the <SPAN CLASS="textit">PSBLAS
(Parallel Sparse BLAS) computational framework</SPAN>&nbsp;[<A
HREF="node25.html#psblas_00">17</A>,<A
HREF="node25.html#PSBLAS3">16</A>].
PSBLAS is a library originally developed to address the parallel implementation of
@ -170,7 +172,8 @@ in Section&nbsp;<A HREF="node23.html#sec:errors">7</A>. The copyright terms conc
of MLD2P4 are reported in Appendix&nbsp;<A HREF="node24.html#sec:license">A</A>.
<P>
<HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html96"
HREF="node4.html">
@ -192,7 +195,7 @@ of MLD2P4 are reported in Appendix&nbsp;<A HREF="node24.html#sec:license">A</A>.
<B> Previous:</B> <A NAME="tex2html87"
HREF="node2.html">Contents</A>
&nbsp; <B> <A NAME="tex2html95"
HREF="node2.html">Contents</A></B>
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html108"
HREF="node5.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html107"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00040000000000000000"></A><A NAME="sec:distribution"></A>
@ -75,7 +76,7 @@ account when treating derived works.
The library defines a version string with the
constant
<BR><P></P>
<DIV ALIGN="CENTER">
<DIV ALIGN="CENTER" CLASS="mathdisplay">
<!-- MATH
\begin{displaymath}
\verb|mld_version_string_|

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html120"
HREF="node6.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html119"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00050000000000000000"></A><A NAME="sec:building"></A>
@ -79,7 +80,7 @@ real and complex data, in both single and double precision.
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html122"
HREF="node6.html">Prerequisites</A>
<LI><A NAME="tex2html123"

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html137"
HREF="node7.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html136"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00051000000000000000">
@ -98,7 +99,31 @@ usually this means that they should all be built with the same
compiler as MLD2P4.
<P>
<BR><HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html137"
HREF="node7.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html133"
HREF="node5.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html127"
HREF="node5.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html135"
HREF="node2.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html138"
HREF="node7.html">Optional third party libraries</A>
<B> Up:</B> <A NAME="tex2html134"
HREF="node5.html">Configuring and Building MLD2P4</A>
<B> Previous:</B> <A NAME="tex2html128"
HREF="node5.html">Configuring and Building MLD2P4</A>
&nbsp; <B> <A NAME="tex2html136"
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html149"
HREF="node8.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html148"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00052000000000000000">
@ -88,8 +89,42 @@ for multilevel preconditioners may change to reflect their presence.
triangular system solution for double precision real and complex data.
We have tested version 3.3 and 4.2.
</DD>
<DT><STRONG>MUMPS</STRONG></DT>
<DD>[]
MUMPS (“Multifrontal Massively Parallel Solver”) is a sparse, direct factorization
package available from
<BR> <code>http://mumps.enseeiht.fr/</code>.
It implements a direct method based on a multifrontal approach which performs
a Gaussian factorization.
We have tested versions 4.10.0 and version 5.0.1.
<P>
</DD>
</DL>
<BR><HR>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html149"
HREF="node8.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html145"
HREF="node5.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html139"
HREF="node6.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html147"
HREF="node2.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html150"
HREF="node8.html">Configuration options</A>
<B> Up:</B> <A NAME="tex2html146"
HREF="node5.html">Configuring and Building MLD2P4</A>
<B> Previous:</B> <A NAME="tex2html140"
HREF="node6.html">Prerequisites</A>
&nbsp; <B> <A NAME="tex2html148"
HREF="node2.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html161"
HREF="node9.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html160"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00053000000000000000">

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -25,7 +25,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html173"
HREF="node10.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -48,7 +49,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html172"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00054000000000000000">

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
@ -22,7 +22,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
</HEAD>
<BODY >
<!--Navigation Panel-->
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html13"
HREF="node1.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
@ -37,15 +38,15 @@ original version by: Nikos Drakos, CBLU, University of Leeds
&nbsp; <B> <A NAME="tex2html12"
HREF="node2.html">Contents</A></B>
<BR>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<FONT SIZE="+2"><B>MLD2P4
<BIG CLASS="XXLARGE"><B>MLD2P4
<BR>
<BR>
User's and Reference Guide</B></FONT>
<BR><I><FONT SIZE="+1">A guide for the Multi-Level Domain Decomposition
User's and Reference Guide</B></BIG>
<BR><SPAN CLASS="textit"><BIG CLASS="LARGE">A guide for the Multi-Level Domain Decomposition
Parallel Preconditioners Package
based on PSBLAS</FONT></I>
based on PSBLAS</BIG></SPAN>
<BR>
<BR>
<BR>
@ -76,7 +77,7 @@ Oct. 12, 2015
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"></A>
<UL>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html15"
HREF="node1.html">Abstract</A>
<LI><A NAME="tex2html16"

@ -17,7 +17,7 @@ for the ``best'' preconditioner for the problem at hand.
The package employs object-oriented design techniques in
Fortran~2003, with interfaces to additional third party libraries
such as UMFPACK, SuperLU and SuperLU\_Dist, that
such as UMFPACK, SuperLU, SuperLU\_Dist and MUMPS, that
can be exploited in building multi-level preconditioners. The parallel
implementation is based on a Single Program Multiple Data (SPMD)
paradigm for distributed-memory architectures; the inter-process data

@ -84,6 +84,14 @@ Method with a Column Pre-ordering Strategy},
ACM Transactions on Mathematical Software, 30, 2004, 196--199.
(See also {\tt http://www.cise.ufl.edu/~davis/})
%
\bibitem{MUMPS}
P.R.~Amestoy, C.~Ashcraft, O.~Boiteau, A.~Buttari, J.~L'Excellent, C.~Weisbecker
{\em Improving multifrontal methods by means of block low-rank representations},
SIAM SISC, volume 37, number 3, pages A1452-A1474.
(See also {\tt http://mumps.enseeiht.fr})
%
\bibitem{SUPERLU}
J.W.~Demmel, S.C.~Eisenstat, J.R.~Gilbert, X.S.~Li and J.W.H.~Liu,
A supernodal approach to sparse partial pivoting,

@ -69,6 +69,14 @@ for multilevel preconditioners may change to reflect their presence.
from the same site as SuperLU; provides parallel factorization and
triangular system solution for double precision real and complex data.
We have tested version 3.3 and 4.2.
\item[MUMPS] \cite{MUMPS}
MUMPS (“MUltifrontal Massively Parallel Solver”) is a sparse, direct factorization
package available from \\
\verb|http://mumps.enseeiht.fr/|.
It implements a direct method based on a multifrontal approach which performs
a Gaussian factorization.
We have tested versions 4.10.0 and version 5.0.1.
\end{description}
\subsection{Configuration options}
@ -222,6 +230,9 @@ generated the file \verb|Make.inc| which will then be used by all
Makefiles in the directory tree; this file will be copied in the
install directory under the name \verb|Make.inc.MLD2P4|.
In order to use the MUMPS solver based on multifrontal factorization, the user has to add MUMPS flags, include directories and libraries in the Make.inc file.
The necessary MUMPS libraries are \verb|-ldmumps, -lsmumps -lzmumps -lzmumps -mumps_common -lpord|. The flag \verb|-DHAVE_MUMPS_| is mandatory too. Since MUMPS uses openmp and ScaLAPACK, \verb|LINKOPT=-fonemp| must be added as well, along with the ScaLAPACK flags, include directories and library (which can be set using the configure script).
To build the library the user will now enter
\begin{verbatim}
make

@ -203,6 +203,9 @@ Figure~\ref{fig:ex_3lh} shows how to set a three-level hybrid Schwarz
preconditioner, which uses block Jacobi with ILU(0) on the
local blocks as post-smoother, has a coarsest matrix replicated on the processors,
and solves the coarsest-level system with the LU factorization from UMFPACK~\cite{UMFPACK}.
Figure~\ref{fig:ex_3lhm} shows how to set a three-level preconditioner similar to the one of ~\ref{fig:ex_3lh}, but the coarsest-level systems is solved with the multifrontal factorization from MUMPS~\cite{UMFPACK}.
Note that MUMPS can be used on both replicated and distributed coarsest level matrices,
as a global and local solver respectively.
The number of levels is specified by using \verb|mld_precinit|; the other
preconditioner parameters are set by calling \verb|mld_precset|. Note that
the type of multilevel framework (i.e.\ multiplicative among the levels
@ -218,7 +221,7 @@ solver. Again, \verb|mld_precset| is used only to set
non-default values of the parameters (see Tables~\ref{tab:p_type}-\ref{tab:p_coarse}).
In both cases, the construction and the application of the preconditioner
are carried out as for the default multi-level preconditioner.
The code fragments shown in in Figures~\ref{fig:ex_3lh}-\ref{fig:ex_3la} are
The code fragments shown in in Figures~\ref{fig:ex_3lh}~\ref{fig:ex_3lhm}-\ref{fig:ex_3la} are
included in the example program file \verb|mld_dexample_ml.f90| too.
Finally, Figure~\ref{fig:ex_1l} shows the setup of a one-level
@ -263,6 +266,32 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
\end{center}
\end{figure}
\begin{figure}[tbh]
\begin{center}
\begin{minipage}{.90\textwidth}
{\small
\begin{verbatim}
... ...
! set a three-level hybrid Schwarz preconditioner, which uses
! block Jacobi (with ILU(0) on the blocks) as post-smoother,
! a coarsest matrix replicated on the processors, and the
! multifrontal solver in MUMPS as coarse-level solver
call mld_precinit(P,'ML',info,nlev=3)
call mld_precset(P,mld_smoother_type_,'BJAC',info)
call mld_precset(P,mld_coarse_mat_,'REPL',info)
call mld_precset(P,mld_coarse_solve_,'MUMPS',info)
... ...
\end{verbatim}
}
\end{minipage}
\caption{Setup of a hybrid three-level Schwarz preconditioner.\label{fig:ex_3lhm}}
\end{center}
\end{figure}
\begin{figure}[tbh]
\begin{center}
\begin{minipage}{.90\textwidth}

@ -51,7 +51,7 @@ program mld_dexample_ml
use psb_krylov_mod
use psb_util_mod
use data_input
use mld_d_mumps_solver
implicit none
! input parameters
@ -77,6 +77,7 @@ program mld_dexample_ml
real(psb_dpk_) :: tol, err
integer :: itmax, iter, istop
integer :: nlev
type(mld_d_mumps_solver_type) :: mumps_sv
! parallel environment parameters
integer :: ictxt, iam, np
@ -88,6 +89,7 @@ program mld_dexample_ml
real(psb_dpk_) :: t1, t2, tprec, resmx, resmxp
character(len=20) :: name
integer, parameter :: iunit=12
type(psb_d_vect_type) :: x_col, r_col
! initialize the parallel environment
@ -197,10 +199,16 @@ program mld_dexample_ml
write(*,'(" ")')
end if
! set RAS with overlap 2 and ILU(0) on the local blocks
call mld_precinit(P,'AS',info)
call mld_precset(P,mld_sub_ovr_,2,info)
! START SETTING PARAMETER
! set JAC
call mld_precinit(P,'JAC',info)
! set MUMPS ad solver
call P%set(mumps_sv,info)
! build the preconditioner

@ -236,6 +236,18 @@ program mld_dexample_ml
call mld_precset(P,mld_smoother_pos_,'TWOSIDE',info)
call mld_precset(P,mld_coarse_sweeps_,5,info)
case(4)
! set a three-level hybrid Schwarz preconditioner, which uses
! block Jacobi (with ILU(0) on the blocks) as post-smoother,
! a coarsest matrix replicated on the processors, and the
! multifrontal solver in MUMPS as coarse-level solver
call mld_precinit(P,'ML',info,nlev=3)
call mld_precset(P,mld_smoother_type_,'BJAC',info)
call mld_precset(P,mld_coarse_mat_,'REPL',info)
call mld_precset(P,mld_coarse_solve_,'MUMPS',info)
end select
! build the preconditioner

@ -1,6 +1,6 @@
sherman3.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
fidapm07.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
NONE ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
MM ! File format: MM (Matrix Market) HB (Harwell-Boeing).
1 ! Preconditioner choice
01000 ! ITMAX
0100 ! ITMAX
1.d-5 ! EPS

@ -17,6 +17,7 @@ EXEDIR=./runs
all: mld_sexample_ml mld_sexample_1lev mld_dexample_ml mld_dexample_1lev
mld_dexample_ml: $(DMOBJS)
$(F90LINK) $(LINKOPT) $(DMOBJS) -o mld_dexample_ml \
$(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)

@ -245,6 +245,18 @@ program mld_dexample_ml
call mld_precset(P,mld_smoother_pos_,'TWOSIDE',info)
call mld_precset(P,mld_coarse_sweeps_,5,info)
case(4)
! set a three-level hybrid Schwarz preconditioner, which uses
! block Jacobi (with ILU(0) on the blocks) as post-smoother,
! a coarsest matrix replicated on the processors, and the
! multifrontal solver in MUMPS as coarse-level solver
call mld_precinit(P,'ML',info,nlev=3)
call mld_precset(P,mld_smoother_type_,'BJAC',info)
call mld_precset(P,mld_coarse_mat_,'REPL',info)
call mld_precset(P,mld_coarse_solve_,'MUMPS',info)
end select
! build the preconditioner

@ -132,6 +132,7 @@ program mld_sexample_1lev
use psb_util_mod
use data_input
use spde_mod
use mld_s_mumps_solver
implicit none
@ -150,6 +151,7 @@ program mld_sexample_1lev
! solver parameters
real(psb_spk_) :: tol, err
integer :: itmax, iter, itrace, istop
type(mld_s_mumps_solver_type) :: sv
! parallel environment parameters
integer :: ictxt, iam, np
@ -206,10 +208,17 @@ program mld_sexample_1lev
if (iam == psb_root_) write(*,'("Overall matrix creation time : ",es12.5)')t2
if (iam == psb_root_) write(*,'(" ")')
! set RAS with overlap 2 and ILU(0) on the local blocks
! set MUMPS as solver
call mld_precinit(P,'AS',info)
call mld_precset(P,mld_sub_ovr_,2,info)
call sv%default
call P%set(sv,info)
call mld_precset(P,mld_mumps_print_err_,10,info)
! build the preconditioner

@ -245,6 +245,18 @@ program mld_sexample_ml
call mld_precset(P,mld_smoother_pos_,'TWOSIDE',info)
call mld_precset(P,mld_coarse_sweeps_,5,info)
case(4)
! set a three-level hybrid Schwarz preconditioner, which uses
! block Jacobi (with ILU(0) on the blocks) as post-smoother,
! a coarsest matrix replicated on the processors, and the
! multifrontal solver from MUMPS as global coarse-level solver
call mld_precinit(P,'ML',info,nlev=3)
call mld_precset(P,mld_smoother_type_,'BJAC',info)
call mld_precset(P,mld_coarse_mat_,'DIST',info)
call mld_precset(P,mld_coarse_solve_,'MUMPS',info)
end select
! build the preconditioner

@ -1,3 +1,3 @@
40 ! IDIM; domain size is idim**3
0100 ! ITMAX
15 ! IDIM; domain size is idim**3
10 ! ITMAX
1.d-6 ! EPS

@ -1,4 +1,4 @@
1 ! Preconditioner choice
40 ! IDIM; domain size is idim**3
0100 ! ITMAX
2 ! Preconditioner choice
10 ! IDIM; domain size is idim**3
500 ! ITMAX
1.d-6 ! EPS

@ -0,0 +1,8 @@
#!/bin/bash
#PBS -l nodes=1:ppn=4,walltime=10:00:00
#PBS -A ambra
#PBS -o pbs2.output
#PBS -e pbs2.error
cd $PBS_O_WORKDIR
mpirun -np 4 ./mld_dexample_ml<ml.inp

@ -0,0 +1,9 @@
#!/bin/bash
#PBS -l nodes=1:ppn=4,walltime=0:40:00
#PBS -A ambra
#PBS -o pbs.output
#PBS -e pbs.error
cd $PBS_O_WORKDIR
mpirun -np 4 ./mld_dexample_1lev<1lev.inp

@ -10,23 +10,23 @@ FINCLUDES=$(FMFLAG). $(FMFLAG)$(LIBDIR) $(FMFLAG)$(PSBINCDIR) $(FMFLAG)$(PSBLIBD
DMODOBJS=mld_d_prec_type.o mld_d_ilu_fact_mod.o \
mld_d_inner_mod.o mld_d_ilu_solver.o mld_d_diag_solver.o mld_d_jac_smoother.o mld_d_as_smoother.o \
mld_d_umf_solver.o mld_d_slu_solver.o mld_d_sludist_solver.o mld_d_id_solver.o\
mld_d_base_solver_mod.o mld_d_base_smoother_mod.o mld_d_onelev_mod.o mld_d_gs_solver.o
mld_d_umf_solver.o mld_d_slu_solver.o mld_d_sludist_solver.o mld_d_id_solver.o mld_d_mumps_solver.o\
mld_d_base_solver_mod.o mld_d_base_smoother_mod.o mld_d_onelev_mod.o mld_d_mumps_solver.o mld_d_gs_solver.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_base_solver_mod.o mld_s_base_smoother_mod.o mld_s_onelev_mod.o mld_s_gs_solver.o
mld_s_slu_solver.o mld_s_sludist_solver.o mld_s_id_solver.o mld_s_mumps_solver.o\
mld_s_base_solver_mod.o mld_s_base_smoother_mod.o mld_s_onelev_mod.o mld_s_mumps_solver.o mld_s_gs_solver.o
ZMODOBJS=mld_z_prec_type.o mld_z_ilu_fact_mod.o \
mld_z_inner_mod.o mld_z_ilu_solver.o mld_z_diag_solver.o mld_z_jac_smoother.o mld_z_as_smoother.o \
mld_z_umf_solver.o mld_z_slu_solver.o mld_z_sludist_solver.o mld_z_id_solver.o\
mld_z_base_solver_mod.o mld_z_base_smoother_mod.o mld_z_onelev_mod.o mld_z_gs_solver.o
mld_z_base_solver_mod.o mld_z_base_smoother_mod.o mld_z_onelev_mod.o mld_z_mumps_solver.o mld_z_gs_solver.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_base_solver_mod.o mld_c_base_smoother_mod.o mld_c_onelev_mod.o mld_c_gs_solver.o
mld_c_slu_solver.o mld_c_sludist_solver.o mld_c_id_solver.o mld_c_mumps_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_gs_solver.o
@ -53,7 +53,6 @@ lib: $(OBJS) impld
$(MODOBJS): $(PSBINCDIR)/$(BASEMODNAME)$(.mod)
mld_base_prec_type.o: mld_const.h
mld_s_prec_type.o mld_d_prec_type.o mld_c_prec_type.o mld_z_prec_type.o : mld_base_prec_type.o
mld_prec_type.o: mld_s_prec_type.o mld_d_prec_type.o mld_c_prec_type.o mld_z_prec_type.o
@ -95,6 +94,7 @@ mld_s_base_solver_mod.o mld_d_base_solver_mod.o mld_c_base_solver_mod.o mld_z_ba
mld_d_gs_solver.o mld_d_id_solver.o mld_d_sludist_solver.o mld_d_slu_solver.o \
mld_d_umf_solver.o mld_d_diag_solver.o mld_d_ilu_solver.o: mld_d_base_solver_mod.o mld_d_prec_type.o
mld_d_mumps_solver.o: mld_d_base_solver_mod.o mld_d_prec_type.o
mld_d_ilu_fact_mod.o: mld_base_prec_type.o mld_d_base_solver_mod.o
mld_d_ilu_solver.o mld_d_iluk_fact.o: mld_d_ilu_fact_mod.o
@ -102,36 +102,39 @@ mld_d_as_smoother.o mld_d_jac_smoother.o: mld_d_base_smoother_mod.o
mld_d_jac_smoother.o: mld_d_diag_solver.o
mld_dprecinit.o mld_dprecset.o: mld_d_diag_solver.o mld_d_ilu_solver.o \
mld_d_umf_solver.o mld_d_as_smoother.o mld_d_jac_smoother.o \
mld_d_id_solver.o mld_d_slu_solver.o mld_d_sludist_solver.o
mld_d_id_solver.o mld_d_slu_solver.o mld_d_sludist_solver.o mld_d_mumps_solver.o
mld_s_gs_solver.o mld_s_id_solver.o mld_s_sludist_solver.o mld_s_slu_solver.o \
mld_s_diag_solver.o mld_s_ilu_solver.o: mld_s_base_solver_mod.o mld_s_prec_type.o
mld_s_mumps_solver.o: mld_s_base_solver_mod.o mld_s_prec_type.o
mld_s_ilu_fact_mod.o: mld_base_prec_type.o mld_s_base_solver_mod.o
mld_s_ilu_solver.o mld_s_iluk_fact.o: mld_s_ilu_fact_mod.o
mld_s_as_smoother.o mld_s_jac_smoother.o: mld_s_base_smoother_mod.o
mld_s_jac_smoother.o: mld_s_diag_solver.o
mld_sprecinit.o mld_sprecset.o: mld_s_diag_solver.o mld_s_ilu_solver.o \
mld_s_as_smoother.o mld_s_jac_smoother.o \
mld_s_id_solver.o mld_s_slu_solver.o mld_s_sludist_solver.o
mld_s_id_solver.o mld_s_slu_solver.o mld_s_sludist_solver.o mld_s_mumps_solver.o
mld_z_gs_solver.o mld_z_id_solver.o mld_z_sludist_solver.o mld_z_slu_solver.o \
mld_z_umf_solver.o mld_z_diag_solver.o mld_z_ilu_solver.o: mld_z_base_solver_mod.o mld_z_prec_type.o
mld_z_mumps_solver.o: mld_z_base_solver_mod.o mld_z_prec_type.o
mld_z_ilu_fact_mod.o: mld_base_prec_type.o mld_z_base_solver_mod.o
mld_z_ilu_solver.o mld_z_iluk_fact.o: mld_z_ilu_fact_mod.o
mld_z_as_smoother.o mld_z_jac_smoother.o: mld_z_base_smoother_mod.o
mld_z_jac_smoother.o: mld_z_diag_solver.o
mld_zprecinit.o mld_zprecset.o: mld_z_diag_solver.o mld_z_ilu_solver.o \
mld_z_umf_solver.o mld_z_as_smoother.o mld_z_jac_smoother.o \
mld_z_id_solver.o mld_z_slu_solver.o mld_z_sludist_solver.o
mld_z_id_solver.o mld_z_slu_solver.o mld_z_sludist_solver.o mld_z_mumps_solver.o
mld_c_gs_solver.o mld_c_id_solver.o mld_c_sludist_solver.o mld_c_slu_solver.o \
mld_c_diag_solver.o mld_c_ilu_solver.o: mld_c_base_solver_mod.o mld_c_prec_type.o
mld_c_mumps_solver.o: mld_c_base_solver_mod.o mld_c_prec_type.o
mld_c_ilu_fact_mod.o: mld_base_prec_type.o mld_c_base_solver_mod.o
mld_c_ilu_solver.o mld_c_iluk_fact.o: mld_c_ilu_fact_mod.o
mld_c_as_smoother.o mld_c_jac_smoother.o: mld_c_base_smoother_mod.o
mld_c_jac_smoother.o: mld_c_diag_solver.o
mld_cprecinit.o mld_cprecset.o: mld_c_diag_solver.o mld_c_ilu_solver.o \
mld_c_as_smoother.o mld_c_jac_smoother.o \
mld_c_as_smoother.o mld_c_jac_smoother.o mld_c_mumps_solver.o\
mld_c_id_solver.o mld_c_slu_solver.o mld_c_sludist_solver.o

@ -89,6 +89,9 @@ subroutine mld_ccprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_c_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_c_mumps_solver
#endif
implicit none
@ -194,6 +197,8 @@ subroutine mld_ccprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),val,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -206,6 +211,10 @@ subroutine mld_ccprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -293,6 +302,9 @@ subroutine mld_ccprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -305,6 +317,11 @@ subroutine mld_ccprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -568,6 +585,27 @@ contains
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_c_mumps_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_c_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_c_mumps_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
!
! Do nothing and hope for the best :)

@ -2,9 +2,9 @@
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.3)
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008, 2010, 2012, 2015
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
@ -61,7 +61,7 @@
!
! 'ML' - Multilevel hybrid preconditioner (additive on the
! same level and multiplicative through the levels),
! with 2 levels, pre and post-smoothing, RAS with
! with 2 levels and post-smoothing only. RAS with
! overlap 1 and ILU(0) on the local blocks is
! applied as post-smoother at each level, but the
! coarsest one; four sweeps of the block-Jacobi solver,
@ -97,6 +97,9 @@ subroutine mld_cprecinit(p,ptype,info,nlev)
use mld_c_id_solver
use mld_c_diag_solver
use mld_c_ilu_solver
#if defined(HAVE_UMF_) && 0
use mld_c_umf_solver
#endif
#if defined(HAVE_SLU_)
use mld_c_slu_solver
#endif
@ -112,7 +115,7 @@ subroutine mld_cprecinit(p,ptype,info,nlev)
! 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_
@ -188,7 +191,9 @@ subroutine mld_cprecinit(p,ptype,info,nlev)
ilev_ = nlev_
allocate(mld_c_jac_smoother_type :: p%precv(ilev_)%sm, stat=info)
if (info /= psb_success_) return
#if defined(HAVE_SLU_)
#if defined(HAVE_UMF_) && 0
allocate(mld_c_umf_solver_type :: p%precv(ilev_)%sm%sv, stat=info)
#elif defined(HAVE_SLU_)
allocate(mld_c_slu_solver_type :: p%precv(ilev_)%sm%sv, stat=info)
#else
allocate(mld_c_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info)
@ -200,11 +205,10 @@ subroutine mld_cprecinit(p,ptype,info,nlev)
call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info)
call p%precv(ilev_)%set(mld_sub_ovr_,izero,info)
thr = 0.05
scale = 1.0
thr = 0.16d0
do ilev_=1,nlev_
call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info)
call p%precv(ilev_)%set(mld_aggr_scale_,scale,info)
thr = thr/2
end do
case default

@ -89,7 +89,9 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_c_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_c_mumps_solver
#endif
implicit none
! Arguments
@ -195,6 +197,8 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),val,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -203,7 +207,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info)
case(mld_sludist_)
case(mld_sludist_, mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
@ -294,6 +298,8 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -306,6 +312,10 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -568,6 +578,28 @@ contains
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_c_mumps_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_c_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_c_mumps_solver_type :: level%sm%sv, stat=info)
endif
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) then
call level%sm%sv%default()
end if
end if
#endif
case default
!
! Do nothing and hope for the best :)

@ -95,6 +95,9 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_d_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_d_mumps_solver
#endif
implicit none
@ -110,7 +113,6 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
character(len=*), parameter :: name='mld_precseti'
info = psb_success_
if (.not.allocated(p%precv)) then
info = 3111
write(psb_err_unit,*) name,&
@ -202,6 +204,8 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -214,6 +218,10 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -303,6 +311,8 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -315,6 +325,10 @@ subroutine mld_dcprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -628,6 +642,27 @@ contains
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_d_mumps_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_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_d_mumps_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
!
! Do nothing and hope for the best :)

@ -2,9 +2,9 @@
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.3)
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008, 2010, 2012, 2015
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
@ -61,7 +61,7 @@
!
! 'ML' - Multilevel hybrid preconditioner (additive on the
! same level and multiplicative through the levels),
! with 2 levels, pre and post-smoothing, RAS with
! with 2 levels and post-smoothing only. RAS with
! overlap 1 and ILU(0) on the local blocks is
! applied as post-smoother at each level, but the
! coarsest one; four sweeps of the block-Jacobi solver,
@ -104,7 +104,6 @@ subroutine mld_dprecinit(p,ptype,info,nlev)
use mld_d_slu_solver
#endif
implicit none
! Arguments
@ -115,7 +114,7 @@ subroutine mld_dprecinit(p,ptype,info,nlev)
! 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_
@ -205,11 +204,10 @@ subroutine mld_dprecinit(p,ptype,info,nlev)
call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info)
call p%precv(ilev_)%set(mld_sub_ovr_,izero,info)
thr = 0.05
scale = 1.0
thr = 0.16d0
do ilev_=1,nlev_
call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info)
call p%precv(ilev_)%set(mld_aggr_scale_,scale,info)
thr = thr/2
end do
case default

@ -95,6 +95,9 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_d_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_d_mumps_solver
#endif
implicit none
@ -203,6 +206,8 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -211,7 +216,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info)
case(mld_sludist_)
case(mld_sludist_,mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
@ -304,6 +309,8 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -316,6 +323,10 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -627,6 +638,27 @@ contains
write(0,*) 'Calling set_solver without a smoother?'
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_d_mumps_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_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_d_mumps_solver_type :: level%sm%sv, stat=info)
endif
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) then
call level%sm%sv%default()
end if
end if
#endif
case default
!
@ -751,13 +783,26 @@ subroutine mld_dprecsetsv(p,val,info,ilev)
do ilev_ = ilmin, ilmax
if (allocated(p%precv(ilev_)%sm)) then
if (allocated(p%precv(ilev_)%sm%sv)) &
& deallocate(p%precv(ilev_)%sm%sv)
if (allocated(p%precv(ilev_)%sm%sv)) then
if (.not.same_type_as(p%precv(ilev_)%sm%sv,val)) then
deallocate(p%precv(ilev_)%sm%sv,stat=info)
if (info /= 0) then
info = 3111
return
end if
end if
if (.not.allocated(p%precv(ilev_)%sm%sv)) then
#ifdef HAVE_MOLD
allocate(p%precv(ilev_)%sm%sv,mold=val)
allocate(p%precv(ilev_)%sm%sv,mold=val,stat=info)
#else
allocate(p%precv(ilev_)%sm%sv,source=val)
allocate(p%precv(ilev_)%sm%sv,source=val,stat=info)
#endif
if (info /= 0) then
info = 3111
return
end if
end if
end if
call p%precv(ilev_)%sm%sv%default()
else
info = 3111
@ -957,7 +1002,6 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
case(mld_coarse_iluthrs_)
ilev_=nlev_
call p%precv(ilev_)%set(mld_sub_iluthrs_,val,info)
case(mld_aggr_thresh_)
thr = val
do ilev_ = 2, nlev_

@ -89,6 +89,9 @@ subroutine mld_scprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_s_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_s_mumps_solver
#endif
implicit none
@ -194,6 +197,8 @@ subroutine mld_scprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),val,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -206,6 +211,10 @@ subroutine mld_scprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -293,6 +302,8 @@ subroutine mld_scprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -305,6 +316,10 @@ subroutine mld_scprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -568,6 +583,28 @@ contains
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_s_mumps_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_s_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_s_mumps_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
!
! Do nothing and hope for the best :)

@ -2,9 +2,9 @@
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.3)
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008, 2010, 2012, 2015
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
@ -61,7 +61,7 @@
!
! 'ML' - Multilevel hybrid preconditioner (additive on the
! same level and multiplicative through the levels),
! with 2 levels, pre and post-smoothing, RAS with
! with 2 levels and post-smoothing only. RAS with
! overlap 1 and ILU(0) on the local blocks is
! applied as post-smoother at each level, but the
! coarsest one; four sweeps of the block-Jacobi solver,
@ -97,6 +97,9 @@ subroutine mld_sprecinit(p,ptype,info,nlev)
use mld_s_id_solver
use mld_s_diag_solver
use mld_s_ilu_solver
#if defined(HAVE_UMF_) && 0
use mld_s_umf_solver
#endif
#if defined(HAVE_SLU_)
use mld_s_slu_solver
#endif
@ -112,7 +115,7 @@ subroutine mld_sprecinit(p,ptype,info,nlev)
! 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_
@ -188,7 +191,9 @@ subroutine mld_sprecinit(p,ptype,info,nlev)
ilev_ = nlev_
allocate(mld_s_jac_smoother_type :: p%precv(ilev_)%sm, stat=info)
if (info /= psb_success_) return
#if defined(HAVE_SLU_)
#if defined(HAVE_UMF_) && 0
allocate(mld_s_umf_solver_type :: p%precv(ilev_)%sm%sv, stat=info)
#elif defined(HAVE_SLU_)
allocate(mld_s_slu_solver_type :: p%precv(ilev_)%sm%sv, stat=info)
#else
allocate(mld_s_ilu_solver_type :: p%precv(ilev_)%sm%sv, stat=info)
@ -200,11 +205,10 @@ subroutine mld_sprecinit(p,ptype,info,nlev)
call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info)
call p%precv(ilev_)%set(mld_sub_ovr_,izero,info)
thr = 0.05
scale = 1.0
thr = 0.16d0
do ilev_=1,nlev_
call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info)
call p%precv(ilev_)%set(mld_aggr_scale_,scale,info)
thr = thr/2
end do
case default

@ -89,6 +89,9 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_s_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_s_mumps_solver
#endif
implicit none
@ -195,6 +198,8 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),val,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -203,7 +208,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info)
case(mld_sludist_)
case(mld_sludist_,mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
@ -294,6 +299,8 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
#if defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -306,6 +313,10 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -568,6 +579,30 @@ contains
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_s_mumps_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_s_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_s_mumps_solver_type :: level%sm%sv, stat=info)
endif
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) then
call level%sm%sv%default()
end if
end if
#endif
case default
!
! Do nothing and hope for the best :)

@ -95,6 +95,9 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_z_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_z_mumps_solver
#endif
implicit none
@ -202,6 +205,8 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -214,6 +219,10 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -303,6 +312,8 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -315,6 +326,11 @@ subroutine mld_zcprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -628,6 +644,28 @@ contains
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_z_mumps_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_z_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_z_mumps_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
!
! Do nothing and hope for the best :)

@ -2,9 +2,9 @@
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.3)
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008, 2010, 2012, 2015
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
@ -61,7 +61,7 @@
!
! 'ML' - Multilevel hybrid preconditioner (additive on the
! same level and multiplicative through the levels),
! with 2 levels, pre and post-smoothing, RAS with
! with 2 levels and post-smoothing only. RAS with
! overlap 1 and ILU(0) on the local blocks is
! applied as post-smoother at each level, but the
! coarsest one; four sweeps of the block-Jacobi solver,
@ -115,7 +115,7 @@ subroutine mld_zprecinit(p,ptype,info,nlev)
! 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_
@ -205,11 +205,10 @@ subroutine mld_zprecinit(p,ptype,info,nlev)
call p%precv(ilev_)%set(mld_sub_prol_,psb_none_,info)
call p%precv(ilev_)%set(mld_sub_ovr_,izero,info)
thr = 0.05
scale = 1.0
thr = 0.16d0
do ilev_=1,nlev_
call p%precv(ilev_)%set(mld_aggr_thresh_,thr,info)
call p%precv(ilev_)%set(mld_aggr_scale_,scale,info)
thr = thr/2
end do
case default

@ -95,7 +95,9 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
#if defined(HAVE_SLU_)
use mld_z_slu_solver
#endif
#if defined(HAVE_MUMPS_)
use mld_z_mumps_solver
#endif
implicit none
! Arguments
@ -203,6 +205,8 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -211,7 +215,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_repl_mat_,info)
case(mld_sludist_)
case(mld_sludist_, mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
@ -304,6 +308,8 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
call onelev_set_solver(p%precv(nlev_),mld_umf_,info)
#elif defined(HAVE_SLU_)
call onelev_set_solver(p%precv(nlev_),mld_slu_,info)
#elif defined(HAVE_MUMPS_)
call onelev_set_solver(p%precv(nlev_),mld_mumps_,info)
#else
call onelev_set_solver(p%precv(nlev_),mld_ilu_n_,info)
#endif
@ -316,6 +322,10 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_mumps_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),val,info)
call p%precv(nlev_)%set(mld_coarse_mat_,mld_distr_mat_,info)
case(mld_jac_)
call onelev_set_smoother(p%precv(nlev_),mld_bjac_,info)
call onelev_set_solver(p%precv(nlev_),mld_diag_scale_,info)
@ -627,6 +637,27 @@ contains
write(0,*) 'Calling set_solver without a smoother?'
info = -5
end if
#endif
#ifdef HAVE_MUMPS_
case (mld_mumps_)
if (allocated(level%sm%sv)) then
select type (sv => level%sm%sv)
class is (mld_z_mumps_solver_type)
! do nothing
class default
call level%sm%sv%free(info)
if (info == 0) deallocate(level%sm%sv)
if (info == 0) allocate(mld_z_mumps_solver_type ::&
& level%sm%sv, stat=info)
end select
else
allocate(mld_z_mumps_solver_type :: level%sm%sv, stat=info)
endif
if (allocated(level%sm)) then
if (allocated(level%sm%sv)) then
call level%sm%sv%default()
end if
end if
#endif
case default
!

@ -142,14 +142,12 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,upd,info,amold,vmold,imold)
& blck%get_nrows(), blck%get_nzeros()
End if
if (info == psb_success_) &
& call sm%sv%build(a,sm%desc_data,upd,info,&
if (info == psb_success_) call sm%sv%build(a,sm%desc_data,upd,info,&
& blck,amold=amold,vmold=vmold)
nrow_a = a%get_nrows()
n_row = sm%desc_data%get_local_rows()
n_col = sm%desc_data%get_local_cols()
if (info == psb_success_) call a%csclip(sm%nd,info,&
& jmin=nrow_a+1,rscale=.false.,cscale=.false.)
if (info == psb_success_) call blck%csclip(atmp,info,&

@ -43,6 +43,9 @@ mld_c_ilu_solver_bld.o \
mld_c_ilu_solver_clone.o \
mld_c_ilu_solver_cnv.o \
mld_c_ilu_solver_dmp.o \
mld_c_mumps_solver_apply.o \
mld_c_mumps_solver_apply_vect.o \
mld_c_mumps_solver_bld.o \
mld_d_base_solver_apply.o \
mld_d_base_solver_apply_vect.o \
mld_d_base_solver_bld.o \
@ -78,6 +81,9 @@ mld_d_ilu_solver_bld.o \
mld_d_ilu_solver_clone.o \
mld_d_ilu_solver_cnv.o \
mld_d_ilu_solver_dmp.o \
mld_d_mumps_solver_apply.o \
mld_d_mumps_solver_apply_vect.o \
mld_d_mumps_solver_bld.o \
mld_s_base_solver_apply.o \
mld_s_base_solver_apply_vect.o \
mld_s_base_solver_bld.o \
@ -113,6 +119,9 @@ mld_s_ilu_solver_bld.o \
mld_s_ilu_solver_clone.o \
mld_s_ilu_solver_cnv.o \
mld_s_ilu_solver_dmp.o \
mld_s_mumps_solver_apply.o \
mld_s_mumps_solver_apply_vect.o \
mld_s_mumps_solver_bld.o \
mld_z_base_solver_apply.o \
mld_z_base_solver_apply_vect.o \
mld_z_base_solver_bld.o \
@ -147,7 +156,11 @@ mld_z_ilu_solver_apply_vect.o \
mld_z_ilu_solver_bld.o \
mld_z_ilu_solver_clone.o \
mld_z_ilu_solver_cnv.o \
mld_z_ilu_solver_dmp.o
mld_z_ilu_solver_dmp.o \
mld_z_mumps_solver_apply.o \
mld_z_mumps_solver_apply_vect.o \
mld_z_mumps_solver_bld.o \
LIBNAME=libmld_prec.a

@ -0,0 +1,147 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine c_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_c_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_c_mumps_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(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: n_row, n_col, nglob
complex(psb_spk_), allocatable :: ww(:)
complex(psb_spk_), allocatable, target :: gx(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='c_mumps_solver_apply'
call psb_erractionsave(err_act)
#if defined(HAVE_MUMPS_)
info = psb_success_
trans_ = psb_toupper(trans)
select case(trans_)
case('N')
case('T')
case default
call psb_errpush(psb_err_iarg_invalid_i_,name)
goto 9999
end select
nglob = desc_data%get_global_rows()
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
end if
allocate(gx(nglob),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
call psb_errpush(info,name,i_err=(/nglob,0,0,0,0/),&
& a_err='complex(psb_spk_)')
goto 9999
end if
call psb_gather(gx, x, desc_data, info, root=0)
select case(trans_)
case('N')
sv%id%icntl(9) = 1
case('T')
sv%id%icntl(9) = 2
case default
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Invalid TRANS in subsolve')
goto 9999
end select
sv%id%rhs => gx
sv%id%nrhs = 1
sv%id%icntl(1)=-1
sv%id%icntl(2)=-1
sv%id%icntl(3)=-1
sv%id%icntl(4)=-1
sv%id%job = 3
call cmumps(sv%id)
call psb_scatter(gx, ww, desc_data, info, root=0)
if (info == psb_success_) then
call psb_geaxpby(alpha,ww,beta,y,desc_data,info)
end if
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Error in subsolve')
goto 9999
endif
if (nglob > size(work)) then
deallocate(ww)
endif
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine c_mumps_solver_apply

@ -0,0 +1,84 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine c_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_c_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_c_mumps_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(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='c_mumps_solver_apply_vect'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine c_mumps_solver_apply_vect

@ -0,0 +1,189 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine c_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use psb_base_mod
use mpi
use mld_c_mumps_solver
Implicit None
! Arguments
type(psb_cspmat_type) :: c
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
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_coo_sparse_mat), target :: acoo
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota, nglob, nglobrec, nzt, npr, npc
integer(psb_ipk_) :: ifrst, ibcheck
integer(psb_ipk_) :: ictxt, ictxt1, icomm, np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='c_mumps_solver_bld', ch_err
#if defined(HAVE_MUMPS_)
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()
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,mpi_comm_world
call psb_info(ictxt1, me, np)
npr = np
else
call psb_get_mpicomm(ictxt,icomm)
write(*,*)'mumps_bld: +++++>',icomm,ictxt,mpi_comm_world
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)
! 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
nullify(sv%id%irn)
nullify(sv%id%jcn)
nullify(sv%id%a)
call acoo%free()
sv%built=.true.
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine c_mumps_solver_bld

@ -0,0 +1,148 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine d_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_d_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_d_mumps_solver_type), intent(inout) :: sv
real(psb_dpk_),intent(inout) :: x(:)
real(psb_dpk_),intent(inout) :: y(:)
real(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
real(psb_dpk_),target, intent(inout) :: work(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: n_row, n_col, nglob
real(psb_dpk_), allocatable :: ww(:)
real(psb_dpk_), allocatable, target :: gx(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='d_mumps_solver_apply'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
trans_ = psb_toupper(trans)
select case(trans_)
case('N')
case('T')
case default
call psb_errpush(psb_err_iarg_invalid_i_,name)
goto 9999
end select
nglob = desc_data%get_global_rows()
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_dpk_)')
goto 9999
end if
end if
allocate(gx(nglob),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
call psb_errpush(info,name,i_err=(/nglob,0,0,0,0/),&
& a_err='real(psb_dpk_)')
goto 9999
end if
call psb_gather(gx, x, desc_data, info, root=0)
select case(trans_)
case('N')
sv%id%icntl(9) = 1
case('T')
sv%id%icntl(9) = 2
case default
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Invalid TRANS in subsolve')
goto 9999
end select
sv%id%rhs => gx
sv%id%nrhs = 1
sv%id%icntl(1)=-1
sv%id%icntl(2)=-1
sv%id%icntl(3)=-1
sv%id%icntl(4)=-1
sv%id%job = 3
call dmumps(sv%id)
call psb_scatter(gx, ww, desc_data, info, root=0)
if (info == psb_success_) then
call psb_geaxpby(alpha,ww,beta,y,desc_data,info)
end if
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Error in subsolve')
goto 9999
endif
if (nglob > size(work)) then
deallocate(ww)
endif
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine d_mumps_solver_apply

@ -0,0 +1,83 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine d_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_d_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_d_mumps_solver_type), intent(inout) :: sv
type(psb_d_vect_type),intent(inout) :: x
type(psb_d_vect_type),intent(inout) :: y
real(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
real(psb_dpk_),target, intent(inout) :: work(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='d_mumps_solver_apply_vect'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine d_mumps_solver_apply_vect

@ -0,0 +1,191 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine d_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use psb_base_mod
use mpi
use mld_d_mumps_solver
Implicit None
! Arguments
type(psb_dspmat_type) :: c
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
class(psb_d_base_vect_type), intent(in), optional :: vmold
class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables
type(psb_dspmat_type) :: atmp
type(psb_d_coo_sparse_mat), target :: acoo
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota, nglob, nglobrec, nzt, npr, npc
integer(psb_ipk_) :: ifrst, ibcheck
integer(psb_ipk_) :: ictxt, ictxt1, icomm, np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='d_mumps_solver_bld', ch_err
#if defined(HAVE_MUMPS_)
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()
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,mpi_comm_world
call psb_info(ictxt1, me, np)
npr = np
else
call psb_get_mpicomm(ictxt,icomm)
write(*,*)'mumps_bld: +++++>',icomm,ictxt,mpi_comm_world
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)
! 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%mv_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
nullify(sv%id%irn)
nullify(sv%id%jcn)
nullify(sv%id%a)
call acoo%free()
sv%built=.true.
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine d_mumps_solver_bld

@ -0,0 +1,148 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine s_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_s_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_s_mumps_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
integer :: n_row, n_col, nglob
real(psb_spk_), allocatable :: ww(:)
real(psb_spk_), allocatable, target :: gx(:)
integer :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='s_mumps_solver_apply'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
trans_ = psb_toupper(trans)
select case(trans_)
case('N')
case('T')
case default
call psb_errpush(psb_err_iarg_invalid_i_,name)
goto 9999
end select
nglob = desc_data%get_global_rows()
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
end if
allocate(gx(nglob),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
call psb_errpush(info,name,i_err=(/nglob,0,0,0,0/),&
& a_err='complex(psb_spk_)')
goto 9999
end if
call psb_gather(gx, x, desc_data, info, root=0)
select case(trans_)
case('N')
sv%id%icntl(9) = 1
case('T')
sv%id%icntl(9) = 2
case default
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Invalid TRANS in subsolve')
goto 9999
end select
sv%id%rhs => gx
sv%id%nrhs = 1
sv%id%icntl(1)=-1
sv%id%icntl(2)=-1
sv%id%icntl(3)=-1
sv%id%icntl(4)=-1
sv%id%job = 3
call smumps(sv%id)
call psb_scatter(gx, ww, desc_data, info, root=0)
if (info == psb_success_) then
call psb_geaxpby(alpha,ww,beta,y,desc_data,info)
end if
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Error in subsolve')
goto 9999
endif
if (nglob > size(work)) then
deallocate(ww)
endif
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine s_mumps_solver_apply

@ -0,0 +1,82 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine s_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_s_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_s_mumps_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
integer :: err_act
character(len=20) :: name='s_mumps_solver_apply_vect'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine s_mumps_solver_apply_vect

@ -0,0 +1,190 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine s_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use psb_base_mod
use mpi
use mld_s_mumps_solver
Implicit None
! Arguments
type(psb_sspmat_type) :: c
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, 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_coo_sparse_mat), target :: acoo
integer :: n_row,n_col, nrow_a, nztota, nglob, nglobrec, nzt, npr, npc
integer :: ifrst, ibcheck
integer :: ictxt, ictxt1, icomm, np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='s_mumps_solver_bld', ch_err
#if defined(HAVE_MUMPS_)
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()
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,mpi_comm_world
call psb_info(ictxt1, me, np)
npr = np
else
call psb_get_mpicomm(ictxt,icomm)
write(*,*)'mumps_bld: +++++>',icomm,ictxt,mpi_comm_world
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)
! 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_mumps_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 mumps 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_mumps_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.
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine s_mumps_solver_bld

@ -0,0 +1,149 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine z_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_z_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_z_mumps_solver_type), intent(inout) :: sv
complex(psb_dpk_),intent(inout) :: x(:)
complex(psb_dpk_),intent(inout) :: y(:)
complex(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
complex(psb_dpk_),target, intent(inout) :: work(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: n_row, n_col, nglob
complex(psb_dpk_), allocatable :: ww(:)
complex(psb_dpk_), allocatable, target :: gx(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='z_mumps_solver_apply'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
trans_ = psb_toupper(trans)
select case(trans_)
case('N')
case('T')
case default
call psb_errpush(psb_err_iarg_invalid_i_,name)
goto 9999
end select
nglob = desc_data%get_global_rows()
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
end if
allocate(gx(nglob),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_request_
call psb_errpush(info,name,i_err=(/nglob,0,0,0,0/),&
& a_err='complex(psb_spk_)')
goto 9999
end if
call psb_gather(gx, x, desc_data, info, root=0)
select case(trans_)
case('N')
sv%id%icntl(9) = 1
case('T')
sv%id%icntl(9) = 2
case default
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Invalid TRANS in subsolve')
goto 9999
end select
sv%id%rhs => gx
sv%id%nrhs = 1
sv%id%icntl(1)=-1
sv%id%icntl(2)=-1
sv%id%icntl(3)=-1
sv%id%icntl(4)=-1
sv%id%job = 3
call zmumps(sv%id)
call psb_scatter(gx, ww, desc_data, info, root=0)
if (info == psb_success_) then
call psb_geaxpby(alpha,ww,beta,y,desc_data,info)
end if
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,&
& name,a_err='Error in subsolve')
goto 9999
endif
if (nglob > size(work)) then
deallocate(ww)
endif
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine z_mumps_solver_apply

@ -0,0 +1,83 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine z_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
use psb_base_mod
use mld_z_mumps_solver
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_z_mumps_solver_type), intent(inout) :: sv
type(psb_z_vect_type),intent(inout) :: x
type(psb_z_vect_type),intent(inout) :: y
complex(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
complex(psb_dpk_),target, intent(inout) :: work(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_apply_vect'
#if defined(HAVE_MUMPS_)
call psb_erractionsave(err_act)
info = psb_success_
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine z_mumps_solver_apply_vect

@ -0,0 +1,190 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
subroutine z_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use psb_base_mod
use mpi
use mld_z_mumps_solver
Implicit None
! Arguments
type(psb_zspmat_type) :: c
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
class(psb_z_base_vect_type), intent(in), optional :: vmold
class(psb_i_base_vect_type), intent(in), optional :: imold
! Local variables
type(psb_zspmat_type) :: atmp
type(psb_z_coo_sparse_mat), target :: acoo
integer(psb_ipk_) :: n_row,n_col, nrow_a, nztota, nglob, nglobrec, nzt, npr, npc
integer(psb_ipk_) :: ifrst, ibcheck
integer(psb_ipk_) :: ictxt, ictxt1, icomm, np, me, i, err_act, debug_unit, debug_level
character(len=20) :: name='z_mumps_solver_bld', ch_err
#if defined(HAVE_MUMPS_)
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()
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,mpi_comm_world
call psb_info(ictxt1, me, np)
npr = np
else
call psb_get_mpicomm(ictxt,icomm)
write(*,*)'mumps_bld: +++++>',icomm,ictxt,mpi_comm_world
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)
! 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
nullify(sv%id%irn)
nullify(sv%id%jcn)
nullify(sv%id%a)
call acoo%free()
sv%built=.true.
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 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#else
write(psb_err_unit,*) "MUMPS Not Configured, fix make.inc and recompile "
#endif
end subroutine z_mumps_solver_bld

@ -188,6 +188,7 @@ module mld_base_prec_type
integer(psb_ipk_), parameter :: mld_slu_ = mld_slv_delta_+6
integer(psb_ipk_), parameter :: mld_umf_ = mld_slv_delta_+7
integer(psb_ipk_), parameter :: mld_sludist_ = mld_slv_delta_+8
integer(psb_ipk_), parameter :: mld_mumps_ = mld_slv_delta_+9
integer(psb_ipk_), parameter :: mld_max_sub_solve_= mld_slv_delta_+8
integer(psb_ipk_), parameter :: mld_min_sub_solve_= mld_diag_scale_
!
@ -281,6 +282,12 @@ module mld_base_prec_type
integer(psb_ipk_), parameter :: mld_rfpsz_ = 8
!
!Entries for dmumps
!
!parameter controling the sequential/parallel building of MUMPS
integer(psb_ipk_), parameter :: mld_as_sequential_ =40
!parameter regulating the error printing of MUMPS
integer(psb_ipk_), parameter :: mld_mumps_print_err_ = 41
! Fields for sparse matrices ensembles stored in av()
!
integer(psb_ipk_), parameter :: mld_l_pr_=1
@ -317,13 +324,14 @@ module mld_base_prec_type
& ml_names(0:3)=(/'none ','additive ','multiplicative',&
& 'new ML '/)
character(len=15), parameter, private :: &
& fact_names(0:mld_slv_delta_+7)=(/&
& fact_names(0:mld_slv_delta_+8)=(/&
& 'none ','none ',&
& 'none ','none ',&
& 'none ','Point Jacobi ','ILU(n) ',&
& 'MILU(n) ','ILU(t,n) ',&
& 'SuperLU ','UMFPACK LU ',&
& 'SuperLU_Dist '/)
& 'SuperLU_Dist ','MUMPS '/)
interface mld_check_def
module procedure mld_icheck_def, mld_scheck_def, mld_dcheck_def
@ -353,8 +361,16 @@ contains
character(len=*), intent(in) :: string
integer(psb_ipk_) :: val
character(len=*), parameter :: name='mld_stringval'
select case(psb_toupper(trim(string)))
! Local variable
integer :: index_tab
character(len=15) ::string2
index_tab=index(string,char(9))
if (index_tab.NE.0) then
string2=string(1:index_tab-1)
else
string2=string
endif
select case(psb_toupper(trim(string2)))
case('NONE')
val = 0
case('HALO')
@ -373,6 +389,8 @@ contains
val = mld_milu_n_
case('ILUT')
val = mld_ilu_t_
case('MUMPS')
val = mld_mumps_
case('UMF')
val = mld_umf_
case('SLU')

@ -0,0 +1,477 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
!
!
!
!
!
!
module mld_c_mumps_solver
#if defined(HAVE_MUMPS_)
use cmumps_struc_def
#endif
use mld_c_base_solver_mod
#if defined(LONG_INTEGERS)
type, extends(mld_c_base_solver_type) :: mld_c_mumps_solver_type
end type mld_c_mumps_solver_type
#else
type, extends(mld_c_base_solver_type) :: mld_c_mumps_solver_type
#if defined(HAVE_MUMPS_)
type(cmumps_struc), allocatable :: id
#else
integer, allocatable :: id
#endif
integer(psb_ipk_),dimension(2) :: ipar
logical :: built=.false.
contains
procedure, pass(sv) :: build => c_mumps_solver_bld
procedure, pass(sv) :: apply_a => c_mumps_solver_apply
procedure, pass(sv) :: apply_v => c_mumps_solver_apply_vect
procedure, pass(sv) :: free => c_mumps_solver_free
procedure, pass(sv) :: descr => c_mumps_solver_descr
procedure, pass(sv) :: sizeof => c_mumps_solver_sizeof
procedure, pass(sv) :: seti => c_mumps_solver_seti
procedure, pass(sv) :: setr => c_mumps_solver_setr
procedure, pass(sv) :: cseti =>c_mumps_solver_cseti
procedure, pass(sv) :: csetr => c_mumps_solver_csetr
procedure, pass(sv) :: default => c_mumps_solver_default
#if defined(HAVE_FINAL)
final :: c_mumps_solver_finalize
#endif
end type mld_c_mumps_solver_type
private :: c_mumps_solver_bld, c_mumps_solver_apply, &
& c_mumps_solver_free, c_mumps_solver_descr, &
& 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
#if defined(HAVE_FINAL)
private :: c_mumps_solver_finalize
#endif
interface
subroutine c_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
import :: psb_desc_type, mld_c_mumps_solver_type, psb_c_vect_type, psb_dpk_, psb_spk_, &
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_c_mumps_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
integer(psb_ipk_) :: err_act
character(len=20) :: name='c_mumps_solver_apply_vect'
end subroutine c_mumps_solver_apply_vect
end interface
interface
subroutine c_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
import :: psb_desc_type, mld_c_mumps_solver_type, psb_c_vect_type, psb_dpk_, psb_spk_, &
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_c_mumps_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(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: n_row, n_col, nglob
complex(psb_spk_), pointer :: ww(:)
complex(psb_spk_), allocatable, target :: gx(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='c_mumps_solver_apply'
end subroutine c_mumps_solver_apply
end interface
interface
subroutine c_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use mpi
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,&
& psb_ipk_, psb_i_base_vect_type
Implicit None
! Arguments
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
class(psb_c_base_vect_type), intent(in), optional :: vmold
class(psb_i_base_vect_type), intent(in), optional :: imold
end subroutine c_mumps_solver_bld
end interface
contains
subroutine c_mumps_solver_free(sv,info)
Implicit None
! Arguments
class(mld_c_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
Integer(psb_ipk_) :: err_act
character(len=20) :: name='c_mumps_solver_free'
call psb_erractionsave(err_act)
#if defined(HAVE_MUMPS_)
if (allocated(sv%id)) then
if (sv%built) then
sv%id%job = -2
call cmumps(sv%id)
info = sv%id%infog(1)
if (info /= psb_success_) goto 9999
end if
deallocate(sv%id)
sv%built=.false.
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#endif
end subroutine c_mumps_solver_free
#if defined(HAVE_FINAL)
subroutine c_mumps_solver_finalize(sv)
Implicit None
! Arguments
type(mld_c_mumps_solver_type), intent(inout) :: sv
integer :: info
Integer :: err_act
character(len=20) :: name='c_mumps_solver_finalize'
call sv%free(info)
return
end subroutine c_mumps_solver_finalize
#endif
subroutine c_mumps_solver_descr(sv,info,iout,coarse)
Implicit None
! Arguments
class(mld_c_mumps_solver_type), intent(in) :: sv
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout
logical, intent(in), optional :: coarse
! Local variables
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ictxt, me, np
character(len=20), parameter :: name='mld_z_mumps_solver_descr'
integer(psb_ipk_) :: iout_
call psb_erractionsave(err_act)
info = psb_success_
if (present(iout)) then
iout_ = iout
else
iout_ = 6
endif
write(iout_,*) ' MUMPS Solver. '
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine c_mumps_solver_descr
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!$ WARNING: OTHERS PARAMETERS OF MUMPS COULD BE ADDED. FOR THIS, ADD AN !!$
!!$ INTEGER IN MLD_BASE_PREC_TYPE.F90 AND MODIFY SUBROUTINE SET !!$
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine c_mumps_solver_seti(sv,what,val,info)
Implicit None
! Arguments
class(mld_c_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_seti'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case(mld_as_sequential_)
sv%ipar(1)=val
case(mld_mumps_print_err_)
sv%ipar(2)=val
!case(mld_print_stat_)
! sv%id%icntl(2)=val
! sv%ipar(2)=val
!case(mld_print_glob_)
! sv%id%icntl(3)=val
! sv%ipar(3)=val
case default
call sv%mld_c_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine c_mumps_solver_seti
subroutine c_mumps_solver_setr(sv,what,val,info)
Implicit None
! Arguments
class(mld_c_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
real(psb_spk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_setr'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case default
call sv%mld_c_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine c_mumps_solver_setr
subroutine c_mumps_solver_cseti(sv,what,val,info)
Implicit None
! Arguments
class(mld_c_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='c_mumps_solver_cseti'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case('SET_AS_SEQUENTIAL')
iwhat=mld_as_sequential_
case('SET_MUMPS_PRINT_ERR')
iwhat=mld_mumps_print_err_
case default
iwhat=-1
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_c_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine c_mumps_solver_cseti
subroutine c_mumps_solver_csetr(sv,what,val,info)
Implicit None
! Arguments
class(mld_c_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
real(psb_spk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='z_mumps_solver_csetr'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case default
call sv%mld_c_base_solver_type%set(what,val,info)
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_c_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine c_mumps_solver_csetr
!!NOTE: BY DEFAULT BLR is activated with a dropping parameter to 1d-4 !!
subroutine c_mumps_solver_default(sv)
Implicit none
!Argument
class(mld_c_mumps_solver_type),intent(inout) :: sv
integer(psb_ipk_) :: info
integer(psb_ipk_) :: err_act,ictx,icomm
character(len=20) :: name='c_mumps_default'
info = psb_success_
call psb_erractionsave(err_act)
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
sv%built=.false.
end if
!INSTANCIATION OF sv%id needed to set parmater but mpi communicator needed
! sv%id%job = -1
! sv%id%par=1
! call dmumps(sv%id)
sv%ipar(1)=2
!sv%ipar(10)=6
!sv%ipar(11)=0
!sv%ipar(12)=6
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine c_mumps_solver_default
function c_mumps_solver_sizeof(sv) result(val)
implicit none
! Arguments
class(mld_c_mumps_solver_type), intent(in) :: sv
integer(psb_long_int_k_) :: val
integer :: i
#if defined(HAVE_MUMPS_)
val = (sv%id%INFOG(22)+sv%id%INFOG(32))*1d+6
#else
val = 0
#endif
! val = 2*psb_sizeof_int + psb_sizeof_dp
! val = val + sv%symbsize
! val = val + sv%numsize
return
end function c_mumps_solver_sizeof
#endif
end module mld_c_mumps_solver

@ -360,7 +360,6 @@ contains
integer(psb_long_int_k_) :: val
integer(psb_ipk_) :: i
val = 0
return
end function d_base_solver_sizeof

@ -0,0 +1,477 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
!
!
!
!
!
!
module mld_d_mumps_solver
#if defined(HAVE_MUMPS_)
use dmumps_struc_def
#endif
use mld_d_base_solver_mod
#if defined(LONG_INTEGERS)
type, extends(mld_d_base_solver_type) :: mld_d_mumps_solver_type
end type mld_d_mumps_solver_type
#else
type, extends(mld_d_base_solver_type) :: mld_d_mumps_solver_type
#if defined(HAVE_MUMPS_)
type(dmumps_struc), allocatable :: id
#else
integer, allocatable :: id
#endif
integer(psb_ipk_),dimension(2) :: ipar
logical :: built=.false.
contains
procedure, pass(sv) :: build => d_mumps_solver_bld
procedure, pass(sv) :: apply_a => d_mumps_solver_apply
procedure, pass(sv) :: apply_v => d_mumps_solver_apply_vect
procedure, pass(sv) :: free => d_mumps_solver_free
procedure, pass(sv) :: descr => d_mumps_solver_descr
procedure, pass(sv) :: sizeof => d_mumps_solver_sizeof
procedure, pass(sv) :: seti => d_mumps_solver_seti
procedure, pass(sv) :: setr => d_mumps_solver_setr
procedure, pass(sv) :: cseti =>d_mumps_solver_cseti
procedure, pass(sv) :: csetr => d_mumps_solver_csetr
procedure, pass(sv) :: default => d_mumps_solver_default
#if defined(HAVE_FINAL)
final :: d_mumps_solver_finalize
#endif
end type mld_d_mumps_solver_type
private :: d_mumps_solver_bld, d_mumps_solver_apply, &
& d_mumps_solver_free, d_mumps_solver_descr, &
& 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
#if defined(HAVE_FINAL)
private :: d_mumps_solver_finalize
#endif
interface
subroutine d_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
import :: psb_desc_type, mld_d_mumps_solver_type, psb_d_vect_type, psb_dpk_, psb_spk_, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_d_mumps_solver_type), intent(inout) :: sv
type(psb_d_vect_type),intent(inout) :: x
type(psb_d_vect_type),intent(inout) :: y
real(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
real(psb_dpk_),target, intent(inout) :: work(:)
integer, intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='d_mumps_solver_apply_vect'
end subroutine d_mumps_solver_apply_vect
end interface
interface
subroutine d_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
import :: psb_desc_type, mld_d_mumps_solver_type, psb_d_vect_type, psb_dpk_, psb_spk_, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_d_mumps_solver_type), intent(inout) :: sv
real(psb_dpk_),intent(inout) :: x(:)
real(psb_dpk_),intent(inout) :: y(:)
real(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
real(psb_dpk_),target, intent(inout) :: work(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: n_row, n_col, nglob
real(psb_dpk_), pointer :: ww(:)
real(psb_dpk_), allocatable, target :: gx(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='d_mumps_solver_apply'
end subroutine d_mumps_solver_apply
end interface
interface
subroutine d_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use mpi
import :: psb_desc_type, mld_d_mumps_solver_type, psb_d_vect_type, psb_spk_, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
Implicit None
! Arguments
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
class(psb_d_base_vect_type), intent(in), optional :: vmold
class(psb_i_base_vect_type), intent(in), optional :: imold
end subroutine d_mumps_solver_bld
end interface
contains
subroutine d_mumps_solver_free(sv,info)
Implicit None
! Arguments
class(mld_d_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
Integer(psb_ipk_) :: err_act
character(len=20) :: name='d_mumps_solver_free'
call psb_erractionsave(err_act)
#if defined(HAVE_MUMPS_)
if (allocated(sv%id)) then
if (sv%built) then
sv%id%job = -2
call dmumps(sv%id)
info = sv%id%infog(1)
if (info /= psb_success_) goto 9999
end if
deallocate(sv%id)
sv%built=.false.
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#endif
end subroutine d_mumps_solver_free
#if defined(HAVE_FINAL)
subroutine d_mumps_solver_finalize(sv)
Implicit None
! Arguments
type(mld_d_mumps_solver_type), intent(inout) :: sv
integer :: info
Integer :: err_act
character(len=20) :: name='d_mumps_solver_finalize'
call sv%free(info)
return
end subroutine d_mumps_solver_finalize
#endif
subroutine d_mumps_solver_descr(sv,info,iout,coarse)
Implicit None
! Arguments
class(mld_d_mumps_solver_type), intent(in) :: sv
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout
logical, intent(in), optional :: coarse
! Local variables
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ictxt, me, np
character(len=20), parameter :: name='mld_z_mumps_solver_descr'
integer(psb_ipk_) :: iout_
call psb_erractionsave(err_act)
info = psb_success_
if (present(iout)) then
iout_ = iout
else
iout_ = 6
endif
write(iout_,*) ' MUMPS Solver. '
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine d_mumps_solver_descr
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!$ WARNING: OTHERS PARAMETERS OF MUMPS COULD BE ADDED. FOR THIS, ADD AN !!$
!!$ INTEGER IN MLD_BASE_PREC_TYPE.F90 AND MODIFY SUBROUTINE SET !!$
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine d_mumps_solver_seti(sv,what,val,info)
Implicit None
! Arguments
class(mld_d_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_seti'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case(mld_as_sequential_)
sv%ipar(1)=val
case(mld_mumps_print_err_)
sv%ipar(2)=val
!case(mld_print_stat_)
! sv%id%icntl(2)=val
! sv%ipar(2)=val
!case(mld_print_glob_)
! sv%id%icntl(3)=val
! sv%ipar(3)=val
case default
call sv%mld_d_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine d_mumps_solver_seti
subroutine d_mumps_solver_setr(sv,what,val,info)
Implicit None
! Arguments
class(mld_d_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
real(psb_dpk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_setr'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case default
call sv%mld_d_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine d_mumps_solver_setr
subroutine d_mumps_solver_cseti(sv,what,val,info)
Implicit None
! Arguments
class(mld_d_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='d_mumps_solver_cseti'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case('SET_AS_SEQUENTIAL')
iwhat=mld_as_sequential_
case('SET_MUMPS_PRINT_ERR')
iwhat=mld_mumps_print_err_
case default
iwhat=-1
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_d_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine d_mumps_solver_cseti
subroutine d_mumps_solver_csetr(sv,what,val,info)
Implicit None
! Arguments
class(mld_d_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
real(psb_dpk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='z_mumps_solver_csetr'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case default
call sv%mld_d_base_solver_type%set(what,val,info)
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_d_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine d_mumps_solver_csetr
!!NOTE: BY DEFAULT BLR is activated with a dropping parameter to 1d-4 !!
subroutine d_mumps_solver_default(sv)
Implicit none
!Argument
class(mld_d_mumps_solver_type),intent(inout) :: sv
integer(psb_ipk_) :: info
integer(psb_ipk_) :: err_act,ictx,icomm
character(len=20) :: name='d_mumps_default'
info = psb_success_
call psb_erractionsave(err_act)
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
sv%built=.false.
end if
!INSTANCIATION OF sv%id needed to set parmater but mpi communicator needed
! sv%id%job = -1
! sv%id%par=1
! call dmumps(sv%id)
sv%ipar(1)=2
!sv%ipar(10)=6
!sv%ipar(11)=0
!sv%ipar(12)=6
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine d_mumps_solver_default
function d_mumps_solver_sizeof(sv) result(val)
implicit none
! Arguments
class(mld_d_mumps_solver_type), intent(in) :: sv
integer(psb_long_int_k_) :: val
integer :: i
#if defined(HAVE_MUMPS_)
val = (sv%id%INFOG(22)+sv%id%INFOG(32))*1d+6
#else
val = 0
#endif
! val = 2*psb_sizeof_int + psb_sizeof_dp
! val = val + sv%symbsize
! val = val + sv%numsize
return
end function d_mumps_solver_sizeof
#endif
end module mld_d_mumps_solver

@ -338,7 +338,6 @@ contains
class(mld_d_onelev_type), intent(in) :: lv
integer(psb_long_int_k_) :: val
integer(psb_ipk_) :: i
val = 0
val = val + lv%desc_ac%sizeof()
val = val + lv%ac%sizeof()

@ -327,6 +327,7 @@ contains
class(mld_dprec_type), intent(in) :: prec
integer(psb_long_int_k_) :: val
integer(psb_ipk_) :: i
val = 0
val = val + psb_sizeof_int
if (allocated(prec%precv)) then
@ -529,7 +530,6 @@ contains
! Local variables
integer(psb_ipk_) :: me,err_act,i
character(len=20) :: name
if(psb_get_errstatus().ne.0) return
info=psb_success_
name = 'mld_dprecfree'

@ -133,7 +133,6 @@ contains
integer :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='d_umf_solver_apply'
call psb_erractionsave(err_act)
info = psb_success_
@ -217,6 +216,7 @@ contains
integer :: err_act
character(len=20) :: name='d_umf_solver_apply_vect'
call psb_erractionsave(err_act)
call psb_erractionsave(err_act)
info = psb_success_
@ -258,6 +258,8 @@ contains
integer :: ictxt,np,me,i, err_act, debug_unit, debug_level
character(len=20) :: name='d_umf_solver_bld', ch_err
call psb_erractionsave(err_act)
info=psb_success_
call psb_erractionsave(err_act)
debug_unit = psb_get_debug_unit()

@ -0,0 +1,477 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
!
!
!
!
!
!
module mld_s_mumps_solver
#if defined(HAVE_MUMPS_)
use smumps_struc_def
#endif
use mld_s_base_solver_mod
#if defined(LONG_INTEGERS)
type, extends(mld_s_base_solver_type) :: mld_s_mumps_solver_type
end type mld_s_mumps_solver_type
#else
type, extends(mld_s_base_solver_type) :: mld_s_mumps_solver_type
#if defined(HAVE_MUMPS_)
type(smumps_struc), allocatable :: id
#else
integer, allocatable :: id
#endif
integer(psb_ipk_),dimension(2) :: ipar
logical :: built=.false.
contains
procedure, pass(sv) :: build => s_mumps_solver_bld
procedure, pass(sv) :: apply_a => s_mumps_solver_apply
procedure, pass(sv) :: apply_v => s_mumps_solver_apply_vect
procedure, pass(sv) :: free => s_mumps_solver_free
procedure, pass(sv) :: descr => s_mumps_solver_descr
procedure, pass(sv) :: sizeof => s_mumps_solver_sizeof
procedure, pass(sv) :: seti => s_mumps_solver_seti
procedure, pass(sv) :: setr => s_mumps_solver_setr
procedure, pass(sv) :: cseti => s_mumps_solver_cseti
procedure, pass(sv) :: csetr => s_mumps_solver_csetr
procedure, pass(sv) :: default => s_mumps_solver_default
#if defined(HAVE_FINAL)
final :: s_mumps_solver_finalize
#endif
end type mld_s_mumps_solver_type
private :: s_mumps_solver_bld, s_mumps_solver_apply, &
& s_mumps_solver_free, s_mumps_solver_descr, &
& 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
#if defined(HAVE_FINAL)
private :: s_mumps_solver_finalize
#endif
interface
subroutine s_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
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, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_s_mumps_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
integer :: err_act
character(len=20) :: name='s_mumps_solver_apply_vect'
end subroutine s_mumps_solver_apply_vect
end interface
interface
subroutine s_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
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, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_s_mumps_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
integer :: n_row, n_col, nglob
real(psb_spk_), pointer :: ww(:)
real(psb_spk_), allocatable, target :: gx(:)
integer :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='s_mumps_solver_apply'
end subroutine s_mumps_solver_apply
end interface
interface
subroutine s_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use mpi
import :: psb_desc_type, mld_s_mumps_solver_type, psb_s_vect_type, psb_spk_, psb_dpk_, &
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
Implicit None
! Arguments
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, 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 s_mumps_solver_bld
end interface
contains
subroutine s_mumps_solver_free(sv,info)
Implicit None
! Arguments
class(mld_s_mumps_solver_type), intent(inout) :: sv
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='s_mumps_solver_free'
call psb_erractionsave(err_act)
#if defined(HAVE_MUMPS_)
if (allocated(sv%id)) then
if (sv%built) then
sv%id%job = -2
call smumps(sv%id)
info = sv%id%infog(1)
if (info /= psb_success_) goto 9999
end if
deallocate(sv%id)
sv%built=.false.
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#endif
end subroutine s_mumps_solver_free
#if defined(HAVE_FINAL)
subroutine s_mumps_solver_finalize(sv)
Implicit None
! Arguments
type(mld_s_mumps_solver_type), intent(inout) :: sv
integer :: info
Integer :: err_act
character(len=20) :: name='s_mumps_solver_finalize'
call sv%free(info)
return
end subroutine s_mumps_solver_finalize
#endif
subroutine s_mumps_solver_descr(sv,info,iout,coarse)
Implicit None
! Arguments
class(mld_s_mumps_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_mumps_solver_descr'
integer :: iout_
call psb_erractionsave(err_act)
info = psb_success_
if (present(iout)) then
iout_ = iout
else
iout_ = 6
endif
write(iout_,*) ' MUMPS Solver. '
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine s_mumps_solver_descr
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!$ WARNING: OTHERS PARAMETERS OF MUMPS COULD BE ADDED. FOR THIS, ADD AN !!$
!!$ INTEGER IN MLD_BASE_PREC_TYPE.F90 AND MODIFY SUBROUTINE SET !!$
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine s_mumps_solver_seti(sv,what,val,info)
Implicit None
! Arguments
class(mld_s_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='s_mumps_solver_seti'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case(mld_as_sequential_)
sv%ipar(1)=val
case(mld_mumps_print_err_)
sv%ipar(2)=val
!case(mld_print_stat_)
! sv%id%icntl(2)=val
! sv%ipar(2)=val
!case(mld_print_glob_)
! sv%id%icntl(3)=val
! sv%ipar(3)=val
case default
call sv%mld_s_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine s_mumps_solver_seti
subroutine s_mumps_solver_setr(sv,what,val,info)
Implicit None
! Arguments
class(mld_s_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
real(psb_spk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='s_mumps_solver_setr'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case default
call sv%mld_s_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine s_mumps_solver_setr
subroutine s_mumps_solver_cseti(sv,what,val,info)
Implicit None
! Arguments
class(mld_s_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='s_mumps_solver_cseti'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case('SET_AS_SEQUENTIAL')
iwhat=mld_as_sequential_
case('SET_MUMPS_PRINT_ERR')
iwhat=mld_mumps_print_err_
case default
iwhat=-1
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_s_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine s_mumps_solver_cseti
subroutine s_mumps_solver_csetr(sv,what,val,info)
Implicit None
! Arguments
class(mld_s_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
real(psb_spk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='s_mumps_solver_csetr'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case default
call sv%mld_s_base_solver_type%set(what,val,info)
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_s_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine s_mumps_solver_csetr
!!NOTE: BY DEFAULT BLR is activated with a dropping parameter to 1d-4 !!
subroutine s_mumps_solver_default(sv)
Implicit none
!Argument
class(mld_s_mumps_solver_type),intent(inout) :: sv
integer(psb_ipk_) :: info
integer(psb_ipk_) :: err_act,ictx,icomm
character(len=20) :: name='s_mumps_default'
info = psb_success_
call psb_erractionsave(err_act)
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
sv%built=.false.
end if
!INSTANCIATION OF sv%id needed to set parmater but mpi communicator needed
! sv%id%job = -1
! sv%id%par=1
! call dmumps(sv%id)
sv%ipar(1)=2
!sv%ipar(10)=6
!sv%ipar(11)=0
!sv%ipar(12)=6
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine s_mumps_solver_default
function s_mumps_solver_sizeof(sv) result(val)
implicit none
! Arguments
class(mld_s_mumps_solver_type), intent(in) :: sv
integer(psb_long_int_k_) :: val
integer :: i
#if defined(HAVE_MUMPS_)
val = (sv%id%INFOG(22)+sv%id%INFOG(32))*1d+6
#else
val = 0
#endif
! val = 2*psb_sizeof_int + psb_sizeof_dp
! val = val + sv%symbsize
! val = val + sv%numsize
return
end function s_mumps_solver_sizeof
#endif
end module mld_s_mumps_solver

@ -0,0 +1,477 @@
!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
!!$ based on PSBLAS (Parallel Sparse BLAS version 3.0)
!!$
!!$ (C) Copyright 2008,2009,2010,2012,2013
!!$
!!$ Salvatore Filippone University of Rome Tor Vergata
!!$ Alfredo Buttari CNRS-IRIT, Toulouse
!!$ Pasqua D'Ambra ICAR-CNR, Naples
!!$ Daniela di Serafino Second University of Naples
!!$
!!$ 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.
!!$
!!$
!
!
!
!
!
!
module mld_z_mumps_solver
#if defined(HAVE_MUMPS_)
use zmumps_struc_def
#endif
use mld_z_base_solver_mod
#if defined(LONG_INTEGERS)
type, extends(mld_z_base_solver_type) :: mld_z_mumps_solver_type
end type mld_z_mumps_solver_type
#else
type, extends(mld_z_base_solver_type) :: mld_z_mumps_solver_type
#if defined(HAVE_MUMPS_)
type(zmumps_struc), allocatable :: id
#else
integer, allocatable :: id
#endif
integer(psb_ipk_),dimension(2) :: ipar
logical :: built=.false.
contains
procedure, pass(sv) :: build => z_mumps_solver_bld
procedure, pass(sv) :: apply_a => z_mumps_solver_apply
procedure, pass(sv) :: apply_v => z_mumps_solver_apply_vect
procedure, pass(sv) :: free => z_mumps_solver_free
procedure, pass(sv) :: descr => z_mumps_solver_descr
procedure, pass(sv) :: sizeof => z_mumps_solver_sizeof
procedure, pass(sv) :: seti => z_mumps_solver_seti
procedure, pass(sv) :: setr => z_mumps_solver_setr
procedure, pass(sv) :: cseti =>z_mumps_solver_cseti
procedure, pass(sv) :: csetr => z_mumps_solver_csetr
procedure, pass(sv) :: default => z_mumps_solver_default
#if defined(HAVE_FINAL)
final :: z_mumps_solver_finalize
#endif
end type mld_z_mumps_solver_type
private :: z_mumps_solver_bld, z_mumps_solver_apply, &
& z_mumps_solver_free, z_mumps_solver_descr, &
& 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
#if defined(HAVE_FINAL)
private :: z_mumps_solver_finalize
#endif
interface
subroutine z_mumps_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,info)
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, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_z_mumps_solver_type), intent(inout) :: sv
type(psb_z_vect_type),intent(inout) :: x
type(psb_z_vect_type),intent(inout) :: y
complex(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
complex(psb_dpk_),target, intent(inout) :: work(:)
integer, intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_apply_vect'
end subroutine z_mumps_solver_apply_vect
end interface
interface
subroutine z_mumps_solver_apply(alpha,sv,x,beta,y,desc_data,trans,work,info)
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, psb_ipk_
implicit none
type(psb_desc_type), intent(in) :: desc_data
class(mld_z_mumps_solver_type), intent(inout) :: sv
complex(psb_dpk_),intent(inout) :: x(:)
complex(psb_dpk_),intent(inout) :: y(:)
complex(psb_dpk_),intent(in) :: alpha,beta
character(len=1),intent(in) :: trans
complex(psb_dpk_),target, intent(inout) :: work(:)
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: n_row, n_col, nglob
complex(psb_dpk_), pointer :: ww(:)
complex(psb_dpk_), allocatable, target :: gx(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act
character :: trans_
character(len=20) :: name='z_mumps_solver_apply'
end subroutine z_mumps_solver_apply
end interface
interface
subroutine z_mumps_solver_bld(a,desc_a,sv,upd,info,b,amold,vmold,imold)
use mpi
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,&
& psb_ipk_, psb_i_base_vect_type
Implicit None
! Arguments
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
class(psb_z_base_vect_type), intent(in), optional :: vmold
class(psb_i_base_vect_type), intent(in), optional :: imold
end subroutine z_mumps_solver_bld
end interface
contains
subroutine z_mumps_solver_free(sv,info)
Implicit None
! Arguments
class(mld_z_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
Integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_free'
call psb_erractionsave(err_act)
#if defined(HAVE_MUMPS_)
if (allocated(sv%id)) then
if (sv%built) then
sv%id%job = -2
call zmumps(sv%id)
info = sv%id%infog(1)
if (info /= psb_success_) goto 9999
end if
deallocate(sv%id)
sv%built=.false.
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
#endif
end subroutine z_mumps_solver_free
#if defined(HAVE_FINAL)
subroutine z_mumps_solver_finalize(sv)
Implicit None
! Arguments
type(mld_z_mumps_solver_type), intent(inout) :: sv
integer :: info
Integer :: err_act
character(len=20) :: name='z_mumps_solver_finalize'
call sv%free(info)
return
end subroutine z_mumps_solver_finalize
#endif
subroutine z_mumps_solver_descr(sv,info,iout,coarse)
Implicit None
! Arguments
class(mld_z_mumps_solver_type), intent(in) :: sv
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout
logical, intent(in), optional :: coarse
! Local variables
integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: ictxt, me, np
character(len=20), parameter :: name='mld_z_mumps_solver_descr'
integer(psb_ipk_) :: iout_
call psb_erractionsave(err_act)
info = psb_success_
if (present(iout)) then
iout_ = iout
else
iout_ = 6
endif
write(iout_,*) ' MUMPS Solver. '
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine z_mumps_solver_descr
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!$ WARNING: OTHERS PARAMETERS OF MUMPS COULD BE ADDED. FOR THIS, ADD AN !!$
!!$ INTEGER IN MLD_BASE_PREC_TYPE.F90 AND MODIFY SUBROUTINE SET !!$
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine z_mumps_solver_seti(sv,what,val,info)
Implicit None
! Arguments
class(mld_z_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_seti'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case(mld_as_sequential_)
sv%ipar(1)=val
case(mld_mumps_print_err_)
sv%ipar(2)=val
!case(mld_print_stat_)
! sv%id%icntl(2)=val
! sv%ipar(2)=val
!case(mld_print_glob_)
! sv%id%icntl(3)=val
! sv%ipar(3)=val
case default
call sv%mld_z_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine z_mumps_solver_seti
subroutine z_mumps_solver_setr(sv,what,val,info)
Implicit None
! Arguments
class(mld_z_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(in) :: what
real(psb_dpk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='z_mumps_solver_setr'
info = psb_success_
call psb_erractionsave(err_act)
select case(what)
case default
call sv%mld_z_base_solver_type%set(what,val,info)
end select
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine z_mumps_solver_setr
subroutine z_mumps_solver_cseti(sv,what,val,info)
Implicit None
! Arguments
class(mld_z_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
integer(psb_ipk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='z_mumps_solver_cseti'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case('SET_AS_SEQUENTIAL')
iwhat=mld_as_sequential_
case('SET_MUMPS_PRINT_ERR')
iwhat=mld_mumps_print_err_
case default
iwhat=-1
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_z_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine z_mumps_solver_cseti
subroutine z_mumps_solver_csetr(sv,what,val,info)
Implicit None
! Arguments
class(mld_z_mumps_solver_type), intent(inout) :: sv
character(len=*), intent(in) :: what
real(psb_dpk_), intent(in) :: val
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act, iwhat
character(len=20) :: name='z_mumps_solver_csetr'
info = psb_success_
call psb_erractionsave(err_act)
select case(psb_toupper(what))
case default
call sv%mld_z_base_solver_type%set(what,val,info)
end select
if (iwhat >=0 ) then
call sv%set(iwhat,val,info)
else
call sv%mld_z_base_solver_type%set(what,val,info)
end if
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine z_mumps_solver_csetr
!!NOTE: BY DEFAULT BLR is activated with a dropping parameter to 1d-4 !!
subroutine z_mumps_solver_default(sv)
Implicit none
!Argument
class(mld_z_mumps_solver_type),intent(inout) :: sv
integer(psb_ipk_) :: info
integer(psb_ipk_) :: err_act,ictx,icomm
character(len=20) :: name='z_mumps_default'
info = psb_success_
call psb_erractionsave(err_act)
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
sv%built=.false.
end if
!INSTANCIATION OF sv%id needed to set parmater but mpi communicator needed
! sv%id%job = -1
! sv%id%par=1
! call dmumps(sv%id)
sv%ipar(1)=2
!sv%ipar(10)=6
!sv%ipar(11)=0
!sv%ipar(12)=6
call psb_erractionrestore(err_act)
return
9999 continue
call psb_erractionrestore(err_act)
if (err_act == psb_act_abort_) then
call psb_error()
return
end if
return
end subroutine z_mumps_solver_default
function z_mumps_solver_sizeof(sv) result(val)
implicit none
! Arguments
class(mld_z_mumps_solver_type), intent(in) :: sv
integer(psb_long_int_k_) :: val
integer :: i
#if defined(HAVE_MUMPS_)
val = (sv%id%INFOG(22)+sv%id%INFOG(32))*1d+6
#else
val = 0
#endif
! val = 2*psb_sizeof_int + psb_sizeof_dp
! val = val + sv%symbsize
! val = val + sv%numsize
return
end function z_mumps_solver_sizeof
#endif
end module mld_z_mumps_solver

@ -7,7 +7,7 @@ MLDLIBDIR=$(MLDDIR)/lib
MLD_LIB=-L$(MLDLIBDIR) -lpsb_krylov -lmld_prec -lpsb_prec
PSBLAS_LIB= -L$(PSBLIBDIR) -lpsb_util -lpsb_base
FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDINCDIR) $(FMFLAG)$(PSBINCDIR) $(FIFLAG).
DFSAYAOBJS=df-sample_aya.o data_input.o
DFSAOBJS=df_sample_alya.o data_input.o
DFSOBJS=df_sample.o data_input.o
SFSOBJS=sf_sample.o data_input.o
@ -18,6 +18,10 @@ EXEDIR=./runs
all: sf_sample df_sample cf_sample zf_sample df_sample_alya
df-sample_aya: df-sample_aya.o
$(F90LINK) $(LINKOPT) $(DFSAYAOBJS) -o df-sample_aya \
$(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
/bin/mv df-sample_aya $(EXEDIR)
df_sample: $(DFSOBJS)
$(F90LINK) $(LINKOPT) $(DFSOBJS) -o df_sample \
$(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
@ -47,6 +51,7 @@ sf_sample.o: data_input.o
df_sample.o: data_input.o
cf_sample.o: data_input.o
zf_sample.o: data_input.o
df-sample_aya.o:data_input.o
df_sample_alya.o: data_input.o

@ -80,7 +80,6 @@ program df_sample
! preconditioner data
type(mld_dprec_type) :: prec
! dense matrices
real(psb_dpk_), allocatable, target :: aux_b(:,:), d(:)
real(psb_dpk_), allocatable , save :: x_col_glob(:), r_col_glob(:)
@ -282,6 +281,7 @@ program df_sample
if (psb_toupper(prec_choice%prec) == 'ML') then
nlv = prec_choice%nlev
call mld_precinit(prec,prec_choice%prec,info,nlev=nlv)
call mld_precset(prec,mld_smoother_type_, prec_choice%smther, info)
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
@ -297,11 +297,15 @@ program df_sample
call mld_precset(prec,mld_aggr_scale_, prec_choice%ascale, info)
call mld_precset(prec,mld_aggr_thresh_, prec_choice%athres, info)
call mld_precset(prec,mld_coarse_solve_, prec_choice%csolve, info)
call mld_precset(prec,mld_ml_type_,'MULT',info)
call mld_precset(prec,mld_smoother_pos_,'TWOSIDE',info)
call mld_precset(prec,mld_coarse_sweeps_,4,info)
call mld_precset(prec,mld_coarse_subsolve_, prec_choice%csbsolve,info)
call mld_precset(prec,mld_coarse_mat_, prec_choice%cmat, info)
call mld_precset(prec,mld_coarse_fillin_, prec_choice%cfill, info)
call mld_precset(prec,mld_coarse_iluthrs_, prec_choice%cthres, info)
call mld_precset(prec,mld_coarse_sweeps_, prec_choice%cjswp, info)
else
nlv = 1
call mld_precinit(prec,prec_choice%prec,info)
@ -315,7 +319,6 @@ program df_sample
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
end if
end if
! building the preconditioner
t1 = psb_wtime()
call mld_precbld(a,desc_a,prec,info)

@ -1,4 +1,4 @@
qc2534.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
/opt/matrici/qc2534.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
NONE ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
MM ! File format: MM (Matrix Market) HB (Harwell-Boeing).
BICGSTAB ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
@ -14,7 +14,7 @@ ML ! Preconditioner type: NONE DIAG BJAC AS ML
0 ! Number of overlap layers for AS preconditioner
HALO ! AS restriction operator: NONE HALO
NONE ! AS prolongation operator: NONE SUM AVG
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU MUMPS
1 ! Fill level P for ILU(P) and ILU(T,P)
1.d-4 ! Threshold T for ILU(T,P)
1 ! Jacobi sweeps
@ -25,8 +25,8 @@ DEC ! Type of aggregation: DEC
MULT ! Type of multilevel correction: ADD MULT
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
DIST ! Coarsest-level matrix distribution: DIST REPL
BJAC ! Coarsest-level solver: BJAC UMF SLU SLUDIST
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST
BJAC ! Coarsest-level solver: BJAC UMF SLU SLUDIST MUMPS
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST MUMPS
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver

@ -1,9 +1,9 @@
pressmat.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
pressrhs.mtx ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
MM !
BICGSTAB ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
RGMRES ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
CSR ! Storage format: CSR COO JAD
2 ! IPART (partition method): 0 (block) 2 (graph, with Metis)
0 ! IPART (partition method): 0 (block) 2 (graph, with Metis)
2 ! ISTOPC
01000 ! ITMAX
02 ! ITRACE
@ -14,7 +14,7 @@ ML ! Preconditioner type: NONE JACOBI BJAC AS ML
1 ! Number of overlap layers for AS preconditioner
HALO ! AS restriction operator: NONE HALO
NONE ! AS prolongation operator: NONE SUM AVG
ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU
ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU MUMPS
0 ! Fill level P for ILU(P) and ILU(T,P)
1.d-4 ! Threshold T for ILU(T,P)
1 ! Number of Jacobi sweeps for base smoother
@ -25,8 +25,8 @@ DEC ! Type of aggregation: DEC
MULT ! Type of multilevel correction: ADD MULT
TWOSIDE ! Side of correction PRE POST TWOSIDE (ignored for ADD)
DIST ! Coarsest-level matrix distribution: DIST REPL
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST (DSCALE for JACOBI)
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU MUMPS SLUDIST
ILU ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
2 ! Number of Jacobi sweeps for BJAC/PJAC coarsest-level solver

@ -14,7 +14,7 @@ ML ! Preconditioner type: NONE DIAG BJAC AS ML
0 ! Number of overlap layers for AS preconditioner
HALO ! AS restriction operator: NONE HALO
NONE ! AS prolongation operator: NONE SUM AVG
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU MUMPS
1 ! Fill level P for ILU(P) and ILU(T,P)
1.d-4 ! Threshold T for ILU(T,P)
1 ! Jacobi sweeps
@ -25,8 +25,8 @@ DEC ! Type of aggregation: DEC
MULT ! Type of multilevel correction: ADD MULT
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
DIST ! Coarsest-level matrix distribution: DIST REPL
BJAC ! Coarsest-level solver: BJAC UMF SLU SLUDIST
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST
BJAC ! Coarsest-level solver: BJAC UMF SLU SLUDIST MUMPS
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST MUMPS
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver

@ -14,7 +14,7 @@ ML ! Preconditioner type: NONE JACOBI BJAC AS ML
0 ! Number of overlap layers for AS preconditioner
HALO ! AS restriction operator: NONE HALO
NONE ! AS prolongation operator: NONE SUM AVG
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU MUMPS
1 ! Fill level P for ILU(P) and ILU(T,P)
1.d-4 ! Threshold T for ILU(T,P)
4 ! Number of Jacobi sweeps for base smoother
@ -25,8 +25,8 @@ DEC ! Type of aggregation: DEC
MULT ! Type of multilevel correction: ADD MULT
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
REPL ! Coarsest-level matrix distribution: DIST REPL
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST
UMF ! Coarsest-level subsolver: ILU UMF SLU SLUDIST (DSCALE for JACOBI)
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST MUMPS
UMF ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver

@ -23,7 +23,7 @@ spde3d: spde3d.o data_input.o
ppde2d: ppde2d.o data_input.o
$(F90LINK) ppde2d.o data_input.o -o ppde2d $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
$(F90LINK) -g ppde2d.o data_input.o -o ppde2d $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
/bin/mv ppde2d $(EXEDIR)
spde2d: spde2d.o data_input.o

@ -1,4 +1,4 @@
!!$
!!!$
!!$
!!$ MLD2P4 version 2.0
!!$ MultiLevel Domain Decomposition Parallel Preconditioners Package
@ -295,7 +295,6 @@ program ppde2d
t1 = psb_wtime()
call psb_krylov(kmethd,a,prec,b,x,eps,desc_a,info,&
& itmax=itmax,iter=iter,err=err,itrace=itrace,istop=istopc,irst=irst)
if(info /= psb_success_) then
info=psb_err_from_subroutine_
ch_err='solver routine'

@ -239,7 +239,6 @@ program ppde3d
!
! prepare the preconditioner.
!
if (psb_toupper(prectype%prec) == 'ML') then
nlv = prectype%nlev
call mld_precinit(prec,prectype%prec, info, nlev=nlv)

@ -1,32 +1,32 @@
BICGSTAB ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
RGMRES ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
CSR ! Storage format CSR COO JAD
040 ! IDIM; domain size is idim**3
0100 ! IDIM; domain size is idim**3
2 ! ISTOPC
2000 ! ITMAX
0100 ! ITMAX
1 ! ITRACE
30 ! IRST (restart for RGMRES and BiCGSTABL)
1.d-6 ! EPS
NL-MUL-RAS-BJAC4-ILU ! Descriptive name for preconditioner (up to 40 chars)
3L-MUL-RAS-BJAC4-ILU ! Descriptive name for preconditioner (up to 40 chars)
ML ! Preconditioner NONE JACOBI BJAC AS ML
1 ! Number of overlap layers for AS preconditioner at finest level
HALO ! Restriction operator NONE HALO
NONE ! Prolongation operator NONE SUM AVG
ILU ! Subdomain solver DSCALE ILU MILU ILUT UMF SLU
GS ! Subdomain solver DSCALE ILU MILU ILUT UMF SLU
1 ! sweeps for GS
0 ! Level-set N for ILU(N), and P for ILUT
1.d-4 ! Threshold T for ILU(T,P)
1 ! Smoother/Jacobi sweeps
AS ! Smoother type JACOBI BJAC AS; ignored for non-ML
BJAC ! Smoother type JACOBI BJAC AS; ignored for non-ML
2 ! Number of levels in a multilevel preconditioner
SMOOTHED ! Kind of aggregation: SMOOTHED, NONSMOOTHED, MINENERGY
DEC ! Type of aggregation DEC SYMDEC GLB
MULT ! Type of multilevel correction: ADD MULT
TWOSIDE ! Side of correction PRE POST TWOSIDE (ignored for ADD)
DIST ! Coarse level: matrix distribution DIST REPL
BJAC ! Coarse level: solver JACOBI BJAC UMF SLU SLUDIST
UMF ! Coarse level: subsolver DSCALE ILU UMF SLU SLUDIST
0 ! Coarse level: Level-set N for ILU(N)
REPL ! Coarse level: matrix distribution DIST REPL
BJAC ! Coarse level: solver JACOBI BJAC UMF SLU SLUDIST MUMPS
MUMPS ! Coarse level: subsolver DSCALE ILU UMF SLU SLUDIST MUMPS
1 ! Coarse level: Level-set N for ILU(N)
1.d-4 ! Coarse level: Threshold T for ILU(T,P)
4 ! Coarse level: Number of Jacobi sweeps
-0.10d0 ! Smoother Aggregation Threshold: >= 0.0 default if <0
-200 ! Coarse size limit to determine levels. If <0, then use NL
-10 ! Coarse size limit to determine levels. If <0, then use NL

Loading…
Cancel
Save