|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
|
|
|
|
|
|
<!--Converted with LaTeX2HTML 2012 (1.2)
|
|
|
|
original version by: Nikos Drakos, CBLU, University of Leeds
|
|
|
|
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
|
|
|
* with significant contributions from:
|
|
|
|
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>Getting Started</TITLE>
|
|
|
|
<META NAME="description" CONTENT="Getting Started">
|
|
|
|
<META NAME="keywords" CONTENT="userhtml">
|
|
|
|
<META NAME="resource-type" CONTENT="document">
|
|
|
|
<META NAME="distribution" CONTENT="global">
|
|
|
|
|
|
|
|
<META NAME="Generator" CONTENT="LaTeX2HTML v2012">
|
|
|
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
|
|
|
|
|
|
<LINK REL="STYLESHEET" HREF="userhtml.css">
|
|
|
|
|
|
|
|
<LINK REL="next" HREF="node16.html">
|
|
|
|
<LINK REL="previous" HREF="node11.html">
|
|
|
|
<LINK REL="up" HREF="userhtml.html">
|
|
|
|
<LINK REL="next" HREF="node15.html">
|
|
|
|
</HEAD>
|
|
|
|
|
|
|
|
<BODY >
|
|
|
|
<!--Navigation Panel-->
|
|
|
|
<A NAME="tex2html231"
|
|
|
|
HREF="node15.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
|
|
|
<A NAME="tex2html227"
|
|
|
|
HREF="userhtml.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
|
|
|
<A NAME="tex2html221"
|
|
|
|
HREF="node13.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
|
|
<A NAME="tex2html229"
|
|
|
|
HREF="node2.html">
|
|
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
|
|
|
|
<BR>
|
|
|
|
<B> Next:</B> <A NAME="tex2html232"
|
|
|
|
HREF="node15.html">Examples</A>
|
|
|
|
<B> Up:</B> <A NAME="tex2html228"
|
|
|
|
HREF="userhtml.html">userhtml</A>
|
|
|
|
<B> Previous:</B> <A NAME="tex2html222"
|
|
|
|
HREF="node13.html">Smoothed Aggregation</A>
|
|
|
|
<B> <A NAME="tex2html230"
|
|
|
|
HREF="node2.html">Contents</A></B>
|
|
|
|
<BR>
|
|
|
|
<BR>
|
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
|
|
|
|
<H1><A NAME="SECTION00070000000000000000"></A><A NAME="sec:started"></A>
|
|
|
|
<BR>
|
|
|
|
Getting Started
|
|
|
|
</H1>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
We describe the basics for building and applying MLD2P4 one-level and multi-level
|
|
|
|
Schwarz preconditioners with the Krylov solvers included in PSBLAS [<A
|
|
|
|
HREF="node25.html#PSBLASGUIDE">15</A>].
|
|
|
|
The following steps are required:
|
|
|
|
|
|
|
|
<OL>
|
|
|
|
<LI><I>Declare the preconditioner data structure</I>. It is a derived data type,
|
|
|
|
<code>mld_</code><I>x</I><code>prec_</code> <code>type</code>, where <I>x</I> may be <code>s</code>, <code>d</code>, <code>c</code>
|
|
|
|
or <code>z</code>, according to the basic data type of the sparse matrix
|
|
|
|
(<code>s</code> = real single precision; <code>d</code> = real double precision;
|
|
|
|
<code>c</code> = complex single precision; <code>z</code> = complex double precision).
|
|
|
|
This data structure is accessed by the user only through the MLD2P4 routines,
|
|
|
|
following an object-oriented approach.
|
|
|
|
</LI>
|
|
|
|
<LI><I>Allocate and initialize the preconditioner data structure, according to
|
|
|
|
a preconditioner type chosen by the user</I>. This is performed by the routine
|
|
|
|
<code>mld_precinit</code>, which also sets defaults for each preconditioner
|
|
|
|
type selected by the user. The defaults associated to each preconditioner
|
|
|
|
type are given in Table <A HREF="#tab:precinit">1</A>, where the strings used by
|
|
|
|
<code>mld_precinit</code> to identify the preconditioner types are also given.
|
|
|
|
Note that these strings are valid also if uppercase letters are substituted by
|
|
|
|
corresponding lowercase ones.
|
|
|
|
</LI>
|
|
|
|
<LI><I>Modify the selected preconditioner type, by properly setting
|
|
|
|
preconditioner parameters.</I> This is performed by the routine <code>mld_precset</code>.
|
|
|
|
This routine must be called only if the user wants to modify the default values
|
|
|
|
of the parameters associated to the selected preconditioner type, to obtain a variant
|
|
|
|
of the preconditioner. Examples of use of <code>mld_precset</code> are given in
|
|
|
|
Section <A HREF="node15.html#sec:examples">5.1</A>; a complete list of all the
|
|
|
|
preconditioner parameters and their allowed and default values is provided in
|
|
|
|
Section <A HREF="node16.html#sec:userinterface">6</A>, Tables <A HREF="#tab:p_type">2</A>-<A HREF="#tab:p_coarse">5</A>.
|
|
|
|
</LI>
|
|
|
|
<LI><I>Build the preconditioner for a given matrix.</I> This is performed by
|
|
|
|
the routine <code>mld_precbld</code>.
|
|
|
|
</LI>
|
|
|
|
<LI><I>Apply the preconditioner at each iteration of a Krylov solver.</I>
|
|
|
|
This is performed by the routine <code>mld_precaply</code>. When using the PSBLAS Krylov solvers,
|
|
|
|
this step is completely transparent to the user, since <code>mld_precaply</code> is called
|
|
|
|
by the PSBLAS routine implementing the Krylov solver (<code>psb_krylov</code>).
|
|
|
|
</LI>
|
|
|
|
<LI><I>Free the preconditioner data structure</I>. This is performed by
|
|
|
|
the routine <code>mld_</code> <code>precfree</code>. This step is complementary to step 1 and should
|
|
|
|
be performed when the preconditioner is no more used.
|
|
|
|
</LI>
|
|
|
|
</OL>
|
|
|
|
A detailed description of the above routines is given in Section <A HREF="node16.html#sec:userinterface">6</A>.
|
|
|
|
Examples showing the basic use of MLD2P4 are reported in Section <A HREF="node15.html#sec:examples">5.1</A>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Note that the Fortran 95 module <code>mld_prec_mod</code>, containing the definition of the
|
|
|
|
preconditioner data type and the interfaces to the routines of MLD2P4,
|
|
|
|
must be used in any program calling such routines.
|
|
|
|
The modules <code>psb_base_mod</code>, for the sparse matrix and communication descriptor
|
|
|
|
data types, and <code>psb_krylov_mod</code>, for interfacing with the
|
|
|
|
Krylov solvers, must be also used (see Section <A HREF="node15.html#sec:examples">5.1</A>).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<BR><B>Remark 1.</B> The coarsest-level solver used by the default two-level
|
|
|
|
preconditioner has been chosen by taking into account that, on parallel
|
|
|
|
machines, it often leads to the smallest execution time when applied to
|
|
|
|
linear systems coming from finite-difference discretizations of basic
|
|
|
|
elliptic PDE problems, considered as standard tests for multi-level Schwarz
|
|
|
|
preconditioners [<A
|
|
|
|
HREF="node25.html#aaecc_07">3</A>,<A
|
|
|
|
HREF="node25.html#apnum_07">4</A>]. However, this solver does
|
|
|
|
not necessarily correspond to the smallest number of iterations of the
|
|
|
|
preconditioned Krylov method, which is usually obtained by applying
|
|
|
|
a direct solver to the coarsest-level system, e.g. based on the LU
|
|
|
|
factorization (see Section <A HREF="node16.html#sec:userinterface">6</A>
|
|
|
|
for the coarsest-level solvers available in MLD2P4).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<BR><P></P>
|
|
|
|
<DIV ALIGN="CENTER"><A NAME="924"></A>
|
|
|
|
<TABLE>
|
|
|
|
<CAPTION><STRONG>Table 1:</STRONG>
|
|
|
|
Preconditioner types, corresponding strings and default choices.
|
|
|
|
</CAPTION>
|
|
|
|
<TR><TD>
|
|
|
|
<DIV ALIGN="CENTER">
|
|
|
|
<TABLE CELLPADDING=3 BORDER="1" ALIGN="CENTER">
|
|
|
|
<TR><TD ALIGN="LEFT"><SMALL>TYPE</SMALL></TD>
|
|
|
|
<TD ALIGN="LEFT"><SMALL>STRING</SMALL></TD>
|
|
|
|
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=221><SMALL>DEFAULT PRECONDITIONER</SMALL></TD>
|
|
|
|
</TR>
|
|
|
|
<TR><TD ALIGN="LEFT">No preconditioner</TD>
|
|
|
|
<TD ALIGN="LEFT"><code>'NOPREC'</code></TD>
|
|
|
|
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=221>Considered only to use the PSBLAS
|
|
|
|
Krylov solvers with no preconditioner.</TD>
|
|
|
|
</TR>
|
|
|
|
<TR><TD ALIGN="LEFT">Diagonal</TD>
|
|
|
|
<TD ALIGN="LEFT"><code>'DIAG'</code></TD>
|
|
|
|
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=221>--</TD>
|
|
|
|
</TR>
|
|
|
|
<TR><TD ALIGN="LEFT">Block Jacobi</TD>
|
|
|
|
<TD ALIGN="LEFT"><code>'BJAC'</code></TD>
|
|
|
|
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=221>Block Jacobi with ILU(0) on the local blocks.</TD>
|
|
|
|
</TR>
|
|
|
|
<TR><TD ALIGN="LEFT">Additive Schwarz</TD>
|
|
|
|
<TD ALIGN="LEFT"><code>'AS'</code></TD>
|
|
|
|
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=221>Restricted Additive Schwarz (RAS),
|
|
|
|
with overlap 1 and ILU(0) on the local blocks.</TD>
|
|
|
|
</TR>
|
|
|
|
<TR><TD ALIGN="LEFT">Multilevel</TD>
|
|
|
|
<TD ALIGN="LEFT"><code>'ML'</code></TD>
|
|
|
|
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=221>Multi-level hybrid preconditioner (additive on the
|
|
|
|
same level and multiplicative through the levels),
|
|
|
|
with pre- and post-smoothing.
|
|
|
|
Number of levels: 2.
|
|
|
|
Smoother: RAS with overlap 1 and ILU(0)
|
|
|
|
on the local blocks.
|
|
|
|
Aggregation: decoupled smoothed aggregation with
|
|
|
|
threshold <IMG
|
|
|
|
WIDTH="45" HEIGHT="16" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img88.png"
|
|
|
|
ALT="$\theta = 0$">.
|
|
|
|
Coarsest matrix: distributed among the processors.
|
|
|
|
Coarsest-level solver:
|
|
|
|
4 sweeps of the block-Jacobi solver,
|
|
|
|
with LU or ILU factorization of the blocks
|
|
|
|
(UMFPACK for the double precision versions and
|
|
|
|
SuperLU for the single precision ones, if the packages
|
|
|
|
have been installed; ILU(0), otherwise).</TD>
|
|
|
|
</TR>
|
|
|
|
</TABLE>
|
|
|
|
</DIV>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</TD></TR>
|
|
|
|
</TABLE>
|
|
|
|
</DIV><P></P>
|
|
|
|
<BR>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<BR><HR>
|
|
|
|
<!--Table of Child-Links-->
|
|
|
|
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI><A NAME="tex2html233"
|
|
|
|
HREF="node15.html">Examples</A>
|
|
|
|
</UL>
|
|
|
|
<!--End of Table of Child-Links-->
|
|
|
|
<HR>
|
|
|
|
<!--Navigation Panel-->
|
|
|
|
<A NAME="tex2html231"
|
|
|
|
HREF="node15.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
|
|
|
<A NAME="tex2html227"
|
|
|
|
HREF="userhtml.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
|
|
|
<A NAME="tex2html221"
|
|
|
|
HREF="node13.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
|
|
<A NAME="tex2html229"
|
|
|
|
HREF="node2.html">
|
|
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
|
|
|
|
<BR>
|
|
|
|
<B> Next:</B> <A NAME="tex2html232"
|
|
|
|
HREF="node15.html">Examples</A>
|
|
|
|
<B> Up:</B> <A NAME="tex2html228"
|
|
|
|
HREF="userhtml.html">userhtml</A>
|
|
|
|
<B> Previous:</B> <A NAME="tex2html222"
|
|
|
|
HREF="node13.html">Smoothed Aggregation</A>
|
|
|
|
<B> <A NAME="tex2html230"
|
|
|
|
HREF="node2.html">Contents</A></B>
|
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|