docs/pdf/Makefile
 docs/pdf/abstract.tex
 docs/pdf/advanced.tex
 docs/pdf/background.tex
 docs/pdf/bibliography.tex
 docs/pdf/listofroutines.tex
 docs/pdf/methods.tex
 docs/pdf/overview.tex
 docs/pdf/userguide.tex
 docs/pdf/userinterface.tex
 docs/userguide.pdf
 mlprec/mld_caggrmap_bld.f90
 mlprec/mld_cprecset.f90
 mlprec/mld_daggrmap_bld.f90
 mlprec/mld_dprecset.f90
 mlprec/mld_prec_type.f90
 mlprec/mld_saggrmap_bld.f90
 mlprec/mld_sprecset.f90
 mlprec/mld_zaggrmap_bld.f90
 mlprec/mld_zprecset.f90
 test/fileread/cf_sample.f90
 test/fileread/df_sample.f90
 test/fileread/sf_sample.f90
 test/fileread/zf_sample.f90
 test/pargen/Makefile
 test/pargen/ppde.f90
 test/pargen/spde.f90

Merged docs and minor fixes from Daniela.
stopcriterion
Salvatore Filippone 17 years ago
parent 2241c6af30
commit fc0b2cfbbe

@ -87,7 +87,6 @@ TOPFILE = userguide.tex
SECFILE = title.tex abstract.tex overview.tex conventions.tex distribution.tex \
building.tex background.tex gettingstarted.tex userinterface.tex \
errors.tex bibliography.tex license.tex
# advanced.tex listofroutines.tex
FIGDIR = figures
XPDFFLAGS =

@ -12,10 +12,15 @@ context of the PSBLAS (Parallel Sparse Basic Linear Algebra Subprograms)
computational framework and can be used in conjuction with the Krylov solvers
available in this framework. MLD2P4 enables the user to easily specify different aspects
of a generic algebraic multilevel Schwarz preconditioner, thus allowing to search
for the ``best'' preconditioner for the problem at hand. The package has been designed
employing object-oriented techniques, using Fortran 95 and MPI, with interfaces to
additional third party libraries such as UMFPACK, SuperLU and SuperLU\_Dist, that
can be exploited in building multi-level preconditioners.
for the ``best'' preconditioner for the problem at hand.
The package has been designed employing object-oriented techniques,
using Fortran 95, with interfaces to additional third party libraries
such as UMFPACK, SuperLU and SuperLU\_Dist, 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
communication is based on MPI and is managed mainly through PSBLAS.
This guide provides a brief description of the functionalities and
the user interface of MLD2P4.

@ -1,12 +0,0 @@
\section{Advanced Use}\label{sec:advanced}
- MLD2P4 software architecture \\
- preconditioner data structure (descrizione "dettagliata") + possibilita' di settare singolarmente
i vari livelli (possibilita' accennata solamente nella precedente descrizione di precset) \\
- descrizione routine medium level (con introduzione sulle potenzialita' di ampliamento (?), offerte
da queto strato software) \\
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "userguide"
%%% End:

@ -5,7 +5,7 @@
\emph{Domain Decomposition} (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''
to be preconditioned is divided into submatrices, a ``local'' linear system
involving each submatrix is (approximately) solved, and the local solutions are used
to build a preconditioner for the whole original matrix. This process
often corresponds to dividing a physical domain associated to the original matrix
@ -61,7 +61,7 @@ starting from the original matrix. The algebraic approach is based on the \emph{
aggregation} algorithm \cite{BREZINA_VANEK,VANEK_MANDEL_BREZINA}. A decoupled version
of this algorithm is implemented, where the smoothed aggregation is applied locally
to each submatrix \cite{TUMINARO_TONG}. In the next two subsections we provide
a brief description of the multi-level Schwarz preconditioners and on the smoothed
a brief description of the multi-level Schwarz preconditioners and of the smoothed
aggregation technique as implemented in MLD2P4. For further details the user
is referred to \cite{para_04,aaecc_07,apnum_07,dd2_96}.
@ -203,7 +203,7 @@ One more variant of two-level hybrid preconditioner is obtained by applying
the smoother before and after the coarse-level correction. In this case, the
preconditioner is symmetric if $A$, $M_{1L}$ and $M_{C}$ are symmetric.
As previously noted, on parallel computers the number of sumatrices usually matches
As previously noted, on parallel computers the number of submatrices usually matches
the number of available processors. When the size of the system to be preconditioned
is very large, the use of many processors, i.e.\ of many small submatrices, often
leads to a large coarse-level system, whose solution may be computationally expensive.
@ -220,7 +220,7 @@ For a detailed descrition of them, the reader is
referred to \cite[Chapter 3]{dd2_96}.
The algorithm for the application of a multi-level hybrid
post-smoothed preconditioner $M$ to a vector $v$, i.e.\ for the
computation of $w=M^{-1}v$ is reported, for
computation of $w=M^{-1}v$, is reported, for
example, in Figure~\ref{fig:mlhpost_alg}. Here the number of levels
is denoted by $nlev$ and the levels are numbered in increasing order starting
from the finest one, i.e.\ the finest level is level 1; the coarse matrix

@ -28,12 +28,13 @@ in Scientific Computing, Lecture Notes in Computer Science,
Springer, 2005, 593--602.
%
\bibitem{aaecc_07} A.~Buttari, P.~D'Ambra, D.~di~Serafino, S.~Filippone,
{\em 2LEV-D2P4: a package of high-performance preconditioners},
{\em 2LEV-D2P4: a package of high-performance preconditioners
for scientific and engineering applications},
Applicable Algebra in Engineering, Communications and Computing,
18, 3, May, 2007, 223--239.
18, 3, 2007, 223--239.
%Published online: 13 February 2007, {\tt http://dx.doi.org/10.1007/s00200-007-0035-z}
%
\bibitem{apnum_07} P.~D'Ambra, S.~Filippone, D.~Di~Serafino,
\bibitem{apnum_07} P.~D'Ambra, S.~Filippone, D.~di~Serafino,
{\em On the Development of PSBLAS-based Parallel Two-level Schwarz Preconditioners},
Applied Numerical Mathematics, Elsevier Science,
57, 11-12, 2007, 1181-1196.
@ -105,8 +106,8 @@ BIT Numerical Mathematics, 43, 2003, 945--959.
%
\bibitem{PSBLASGUIDE}
S.~Filippone, A.~Buttari,
{\em PSBLAS-2.1 User's Guide. A Reference Guide for the Parallel Sparse BLAS Library},
xxxxx.
{\em PSBLAS-2.3 User's Guide. A Reference Guide for the Parallel Sparse BLAS Library},
available from \texttt{http://www.ce.uniroma2.it/psblas/}.
%
\bibitem{psblas_00}
S.~Filippone, M.~Colajanni,
@ -114,7 +115,8 @@ S.~Filippone, M.~Colajanni,
Computation on Sparse Matrices},
ACM Transactions on Mathematical Software, 26, 4, 2000, 527--550.
\bibitem{SUPERLUDIST}
X.~S.~Li, J.~W.~Demmel, {\em SuperLU\_DIST: A Scalable Distributed-memory Sparse Direct Solver for Unsymmetric Linear Systems},
X.~S.~Li, J.~W.~Demmel, {\em SuperLU\_DIST: A Scalable Distributed-memory
Sparse Direct Solver for Unsymmetric Linear Systems},
ACM Transactions on Mathematical Software, 29, 2, 2003, 110--140.
%
%\bibitem{KIVA3PSBLAS}
@ -177,7 +179,7 @@ in J. Donnelley, editor, Proceedings of SuperComputing 2000, Dallas, 2000.
\bibitem{VANEK_MANDEL_BREZINA}
P.~Van{\v e}k, J.~Mandel and M.~Brezina,
{\em Algebraic Multigrid by Smoothed Aggregation for Second and Fourth Order Elliptic Problems},
Computing, 1996, 56, 179-196.
Computing, 56, 1996, 179-196.
%
\end{thebibliography}

@ -1,10 +0,0 @@
\section{List of Routines}\label{sec:routines}
Elenco (ordine alfabetico) di tutte le routine, con rinvio (ipertestuale e num. pag.) alla descrizione
di ciascuna in qualche paragrafo precedente
(una specie di indice analitico, che rimanda alle routine descritte precedentemente nei rispettivi paragrafi)
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "userguide"
%%% End:

@ -1,607 +0,0 @@
\section{Iterative Methods}
\label{sec:methods}
\markboth{\underline{MLD2P4 User's and Reference Guide}}
{\underline{\ref{sec:methods} Iterative Methods}}
In this chapter we provide routines for preconditioners and iterative
methods. The interfaces for Krylov subspace methods are available in
the module \verb|mld_krylov_mod|. The installation process of MLD2P4
ensures that these may be used as a drop-in replacement for the PSBLAS
methods; they are accessible under the PSBLAS names (see the PSBLAS
documentation),
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Krylov Methods driver routine
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subroutine{mld\_krylov \label{krylov}}{Krylov Methods Driver Routine}
This subroutine is a driver that provides a general interface for all
the Krylov-Subspace family methods.
The stopping criterion is the normwise backward error, in the infinity
norm, i.e. the iteration is stopped when
\[ err = \frac{\|r_i\|}{(\|A\|\|x_i\|+\|b\|)} < eps \]
or the 2-norm residual reduction
\[ err = \frac{\|r_i\|}{\|b\|_2} < eps \]
according to the value passed through the istop argument (see
later). In the above formulae, $x_i$ is the tentative solution and
$r_i=b-Ax_i$ the corresponding residual at the $i$-th iteration.
\syntax{call psb\_krylov}{method,a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop}
\begin{description}
\item[Type:] Synchronous.
\item[\bf On Entry]
\item[method] a string that defines the iterative method to be
used. Supported values are:
\begin{description}
\item[CG]: the Conjugate Gradient method;
\item[CGS]:the Conjugate Gradient Stabilized method;
\item[BICG]: the Bi-Conjugate Gradient method;
\item[BICGSTAB]: the Bi-Conjugate Gradient Stabilized method;
\item[BICGSTABL]: the Bi-Conjugate Gradient Stabilized method with restarting;
\item[RGMRES]: the Generalized Minimal Residual method with restarting.
\end{description}
\item[a] the local portion of global sparse matrix
$A$. \\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf in}.\\
Specified as: a structured data of type \spdata.
\item[prec] The data structure containing the preconditioner.\\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf in}.\\
Specified as: a structured data of type \precdata.
\item[b] The RHS vector. \\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf in}.\\
Specified as: a rank one array.
\item[x] The initial guess. \\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf inout}.\\
Specified as: a rank one array.
\item[eps] The stopping tolerance. \\
Scope: {\bf global} \\
Type: {\bf required}\\
Intent: {\bf in}.\\
Specified as: a real number.
\item[desc\_a] contains data structures for communications.\\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf in}.\\
Specified as: a structured data of type \descdata.
\item[itmax] The maximum number of iterations to perform.\\
Scope: {\bf global} \\
Type: {\bf optional}\\
Intent: {\bf in}.\\
Default: $itmax = 1000$.\\
Specified as: an integer variable $itmax \ge 1$.
\item[itrace] If $>0$ print out an informational message about
convergence every $itrace$ iterations.\\
Scope: {\bf global} \\
Type: {\bf optional}\\
Intent: {\bf in}.\\
\item[irst] An integer specifying the restart parameter.\\
Scope: {\bf global} \\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Values: $irst>0$. This is employed for the BiCGSTABL or RGMRES
methods, otherwise it is ignored.
\item[istop] An integer specifying the stopping criterion.\\
Scope: {\bf global} \\
Type: {\bf optional}.\\
Intent: {\bf in}.\\
Values: 1: use the normwise backward error, 2: use the scaled 2-norm
of the residual. Default: 1.
\item[\bf On Return]
\item[x] The computed solution. \\
Scope: {\bf local} \\
Type: {\bf required}\\
Intent: {\bf inout}.\\
Specified as: a rank one array.
\item[iter] The number of iterations performed.\\
Scope: {\bf global} \\
Type: {\bf optional}\\
Intent: {\bf out}.\\
Returned as: an integer variable.
\item[err] The convergence estimate on exit.\\
Scope: {\bf global} \\
Type: {\bf optional}\\
Intent: {\bf out}.\\
Returned as: a real number.
\item[info] Error code.\\
Scope: {\bf local} \\
Type: {\bf required} \\
Intent: {\bf out}.\\
An integer value; 0 means no error has been detected.
\end{description}
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% % CG
%% %
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \subroutine{psb\_cg \label{cg}}{CG Iterative Method}
%% This subroutine implements the CG method with restarting. The
%% stopping criterion is the normwise backward error, in the infinity
%% norm, i.e. the iteration is stopped when
%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
%% or
%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
%% according to the value passed through the istop argument (see later).
%% \syntax{call psb\_cg}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
%% \begin{description}
%% \item[\bf On Entry]
%% \item[a] the local portion of global sparse matrix
%% $A$. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \spdata.
%% \item[prec] The data structure containing the preconditioner.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \precdata.
%% \item[b] The RHS vector. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[x] The initial guess. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[eps] The stopping tolerance. \\
%% Scope: {\bf global} \\
%% Type: {\bf required}\\
%% Specified as: a real number.
%% \item[desc\_a] contains data structures for communications.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \descdata.
%% \item[itmax] The maximum number of iterations to perform.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Default: $itmax = 1000$.\\
%% Specified as: an integer variable $itmax \ge 1$.
%% \item[itrace] If $>0$ print out an informational message about
%% convergence every $itrace$ iterations.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[istop] An integer specifying the stopping criterion.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[\bf On Return]
%% \item[x] The computed solution. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[iter] The number of iterations performed.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: an integer variable.
%% \item[err] The error estimate on exit.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: a real number.
%% \item[info] Error code.\\
%% Scope: {\bf local} \\
%% Type: {\bf required} \\
%% An integer value; 0 means no error has been detected.
%% \end{description}
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% % CGS
%% %
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \subroutine{psb\_cgs \label{cgs}}{CGS Iterative Method}
%% This subroutine implements the CGS method with restarting. The
%% stopping criterion is the normwise backward error, in the infinity
%% norm, i.e. the iteration is stopped when
%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
%% or
%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
%% according to the value passed through the istop argument (see later).
%% \syntax{call psb\_cgs}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
%% \begin{description}
%% \item[\bf On Entry]
%% \item[a] the local portion of global sparse matrix
%% $A$. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \spdata.
%% \item[prec] The data structure containing the preconditioner.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \precdata.
%% \item[b] The RHS vector. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[x] The initial guess. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[eps] The stopping tolerance. \\
%% Scope: {\bf global} \\
%% Type: {\bf required}\\
%% Specified as: a real number.
%% \item[desc\_a] contains data structures for communications.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \descdata.
%% \item[itmax] The maximum number of iterations to perform.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Default: $itmax = 1000$.\\
%% Specified as: an integer variable $itmax \ge 1$.
%% \item[itrace] If $>0$ print out an informational message about
%% convergence every $itrace$ iterations.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[istop] An integer specifying the stopping criterion.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[\bf On Return]
%% \item[x] The computed solution. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[iter] The number of iterations performed.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: an integer variable.
%% \item[err] The error estimate on exit.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: a real number.
%% \item[info] Error code.\\
%% Scope: {\bf local} \\
%% Type: {\bf required} \\
%% An integer value; 0 means no error has been detected.
%% \end{description}
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% % BiCG
%% %
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \subroutine{psb\_bicg \label{bicg}}{BiCG Iterative Method}
%% This subroutine implements the BiCG method with restarting. The
%% stopping criterion is the normwise backward error, in the infinity
%% norm, i.e. the iteration is stopped when
%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
%% or
%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
%% according to the value passed through the istop argument (see later).
%% \syntax{call psb\_bicg}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
%% \begin{description}
%% \item[\bf On Entry]
%% \item[a] the local portion of global sparse matrix
%% $A$. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \spdata.
%% \item[prec] The data structure containing the preconditioner.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \precdata.
%% \item[b] The RHS vector. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[x] The initial guess. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[eps] The stopping tolerance. \\
%% Scope: {\bf global} \\
%% Type: {\bf required}\\
%% Specified as: a real number.
%% \item[desc\_a] contains data structures for communications.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \descdata.
%% \item[itmax] The maximum number of iterations to perform.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Default: $itmax = 1000$.\\
%% Specified as: an integer variable $itmax \ge 1$.
%% \item[itrace] If $>0$ print out an informational message about
%% convergence every $itrace$ iterations.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[istop] An integer specifying the stopping criterion.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[\bf On Return]
%% \item[x] The computed solution. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[iter] The number of iterations performed.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: an integer variable.
%% \item[err] The error estimate on exit.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: a real number.
%% \item[info] Error code.\\
%% Scope: {\bf local} \\
%% Type: {\bf required} \\
%% An integer value; 0 means no error has been detected.
%% \end{description}
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% % BiCGSTAB
%% %
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \subroutine{psb\_bicgstab \label{bicgstab}}{BiCGSTAB Iterative Method}
%% This subroutine implements the BiCGSTAB method with restarting. The
%% stopping criterion is the normwise backward error, in the infinity
%% norm, i.e. the iteration is stopped when
%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
%% or
%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
%% according to the value passed through the istop argument (see later).
%% \syntax{call psb\_bicgstab}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,istop}
%% \begin{description}
%% \item[\bf On Entry]
%% \item[a] the local portion of global sparse matrix
%% $A$. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \spdata.
%% \item[prec] The data structure containing the preconditioner.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \precdata.
%% \item[b] The RHS vector. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[x] The initial guess. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[eps] The stopping tolerance. \\
%% Scope: {\bf global} \\
%% Type: {\bf required}\\
%% Specified as: a real number.
%% \item[desc\_a] contains data structures for communications.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \descdata.
%% \item[itmax] The maximum number of iterations to perform.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Default: $itmax = 1000$.\\
%% Specified as: an integer variable $itmax \ge 1$.
%% \item[itrace] If $>0$ print out an informational message about
%% convergence every $itrace$ iterations.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[istop] An integer specifying the stopping criterion.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[\bf On Return]
%% \item[x] The computed solution. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[iter] The number of iterations performed.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: an integer variable.
%% \item[err] The error estimate on exit.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: a real number.
%% \item[info] Error code.\\
%% Scope: {\bf local} \\
%% Type: {\bf required} \\
%% An integer value; 0 means no error has been detected.
%% \end{description}
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% % BiCGSTAB(L)
%% %
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \subroutine{psb\_bicgstabl \label{bicgstabl}}{BiCGSTAB-$l$ Iterative Method}
%% This subroutine implements the BiCGSTAB-$l$ method with restarting. The
%% stopping criterion is the normwise backward error, in the infinity
%% norm, i.e. the iteration is stopped when
%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
%% or
%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
%% according to the value passed through the istop argument (see later).
%% \syntax{call psb\_bicgstab}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop}
%% \begin{description}
%% \item[\bf On Entry]
%% \item[a] the local portion of global sparse matrix
%% $A$. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \spdata.
%% \item[prec] The data structure containing the preconditioner.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \precdata.
%% \item[b] The RHS vector. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[x] The initial guess. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[eps] The stopping tolerance. \\
%% Scope: {\bf global} \\
%% Type: {\bf required}\\
%% Specified as: a real number.
%% \item[desc\_a] contains data structures for communications.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \descdata.
%% \item[itmax] The maximum number of iterations to perform.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Default: $itmax = 1000$.\\
%% Specified as: an integer variable $itmax \ge 1$.
%% \item[itrace] If $>0$ print out an informational message about
%% convergence every $itrace$ iterations.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[irst] An integer specifying the restarting iteration.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[istop] An integer specifying the stopping criterion.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[\bf On Return]
%% \item[x] The computed solution. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[iter] The number of iterations performed.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: an integer variable.
%% \item[err] The error estimate on exit.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: a real number.
%% \item[info] Error code.\\
%% Scope: {\bf local} \\
%% Type: {\bf required} \\
%% An integer value; 0 means no error has been detected.
%% \end{description}
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %
%% % GMRES
%% %
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \subroutine{psb\_gmres \label{gmres}}{GMRES Iterative Method}
%% This subroutine implements the GMRES method with restarting. The
%% stopping criterion is the normwise backward error, in the infinity
%% norm, i.e. the iteration is stopped when
%% \[ \frac{\|r\|}{(\|A\|\|x\|+\|b\|)} < eps \]
%% or
%% \[ \frac{\|r_i\|}{\|b\|_2} < eps \]
%% according to the value passed through the istop argument (see later).
%% \syntax{call psb\_gmres}{a,prec,b,x,eps,desc\_a,info,itmax,iter,err,itrace,irst,istop}
%% \begin{description}
%% \item[\bf On Entry]
%% \item[a] the local portion of global sparse matrix
%% $A$. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \spdata.
%% \item[prec] The data structure containing the preconditioner.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \precdata.
%% \item[b] The RHS vector. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[x] The initial guess. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[eps] The stopping tolerance. \\
%% Scope: {\bf global} \\
%% Type: {\bf required}\\
%% Specified as: a real number.
%% \item[desc\_a] contains data structures for communications.\\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a structured data of type \descdata.
%% \item[itmax] The maximum number of iterations to perform.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Default: $itmax = 1000$.\\
%% Specified as: an integer variable $itmax \ge 1$.
%% \item[itrace] If $>0$ print out an informational message about
%% convergence every $itrace$ iterations.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[irst] An integer specifying the restart iteration.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[istop] An integer specifying the stopping criterion.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% \item[\bf On Return]
%% \item[x] The computed solution. \\
%% Scope: {\bf local} \\
%% Type: {\bf required}\\
%% Specified as: a rank one array.
%% \item[iter] The number of iterations performed.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: an integer variable.
%% \item[err] The error estimate on exit.\\
%% Scope: {\bf global} \\
%% Type: {\bf optional}\\
%% Returned as: a real number.
%% \item[info] Error code.\\
%% Scope: {\bf local} \\
%% Type: {\bf required} \\
%% An integer value; 0 means no error has been detected.
%% \end{description}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "userguide"
%%% End:

@ -19,7 +19,8 @@ These preconditioners have the following general features:
\begin{itemize}
\item both \emph{additive and hybrid multilevel} 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;
that are multiplicative among the levels and additive inside each level;
the basic Additive Schwarz (AS) preconditioners are obtained by considering only one level;
\item a \emph{purely algebraic} 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
@ -70,7 +71,20 @@ by expert users to build new versions of multi-level Schwarz preconditioners.
We provide here a description of the upper-layer routines, but not of the
medium-layer ones.
This guide is organized as follows. \textbf{ORGANIZZAZIONE DELLA GUIDA}
This guide is organized as follows. The notational conventions used in
the guide and in the naming of the MLD2P4 routines are reported in
Section~\ref{sec:conventions}. Information on the distribution of the source code and the
related license is given in Section~\ref{sec:distribution}, while details on the configuration
and installation of package are given in Section~\ref{sec:building}. A description of
multi-level Schwarz preconditioners based on smoothed aggregation is provided
in Section~\ref{sec:background}, to help the users in choosing among the different preconditioners
implemented in MLD2P4. The basics for building and applying the preconditioners
with the Krylov solvers implemented in PSBLAS are reported in Section~\ref{sec:started}, where the
Fortran 95 codes of a few sample programs are also shown. A reference guide for
the upper-layer routines of MLD2P4, that are the user interface, is provided
in Section~\ref{sec:userinterface}. The error handling mechanism used by the package is briefly described
in Section~\ref{sec:errors}. The copyright terms concerning the distribution and modification
of MLD2P4 are reported in Appendix~\ref{sec:license}.
%%% Local Variables:
%%% mode: latex

@ -35,7 +35,7 @@
% /URI (http://ce.uniroma2.it/psblas)
}
% \setlength\oddsidemargin{.7in}
\setlength\textwidth{1.15\textwidth}
% \setlength\evensidemargin{.7in}
% \newlength{\centeroffset}
% \setlength{\centeroffset}{0.5\oddsidemargin}

@ -7,7 +7,7 @@ The basic user interface of MLD2P4 consists of six routines. The four routines \
for the setup and the application of any one-level and multi-level
preconditioner implemented in the package.
The routine \verb|mld_precfree| deallocates the preconditioner data structure, while
\verb|mld_prec\-descr| prints a description of the preconditioner setup by the user.
\verb|mld_precdescr| prints a description of the preconditioner setup by the user.
For each routine, the same user interface is overloaded with
respect to the real/complex case and the single/double precision;
@ -32,8 +32,8 @@ i.e.
provides the constants \verb|psb_spk_|
= \verb|kind(1.e0)| and \verb|psb_dpk_| = \verb|kind(1.d0)|;
\item real parameters defining the preconditioner must be declared
according to the precision of the previous data structures
(see Section~\ref{sec:precset}).
according to the precision of the sparse matrix and preconditioner
data structures (see Section~\ref{sec:precset}).
\end{itemize}
A description of each routine is given in the remainder of this section.
@ -122,10 +122,10 @@ can be logically divided into four groups, i.e.\ parameters defining
\item the aggregation algorithm;
\item the coarse-space correction at the coarsest level.
\end{enumerate}
A list of the parameters that can be set, along with allowed and
A list of the parameters that can be set, along with their allowed and
default values, is given in Tables~\ref{tab:p_type}-\ref{tab:p_coarse}.
For a detailed description of the meaning of the parameters, please
see Section~\ref{sec:background}.
refer to Section~\ref{sec:background}.
%
%Note that the routine allows to set different features of the
%preconditioner at each level through the use of \verb|ilev|.
@ -144,19 +144,18 @@ see Section~\ref{sec:background}.
\verb|mld_ml_type_| & \verb|character(len=*)|
& \texttt{'ADD'} \ \ \ \texttt{'MULT'}
& \texttt{'MULT'}
& basic multi-level framework: additive or multiplicative
among the levels (always additive inside a level) \\
& Basic multi-level framework: additive or multiplicative
among the levels (always additive inside a level). \\ \hline
\verb|mld_smoother_type_|& \verb|character(len=*)|
& \texttt{'DIAG'} \ \ \ \texttt{'BJAC'} \ \ \ \texttt{'AS'}
& \texttt{'AS'}
& basic one-level preconditioner (i.e.\ smoother) of the
multi-level preconditioner: diagonal, block Jacobi,
AS \\
& Basic one-level preconditioner (i.e.\ smoother): diagonal,
block Jacobi, AS \\ \hline
\verb|mld_smoother_pos_| & \verb|character(len=*)|
& \texttt{'PRE'} \ \ \ \texttt{'POST'} \ \ \ \texttt{'TWOSIDE'}
& \texttt{'POST'}
& ``position'' of the smoother: pre-smoother, post-smoother,
pre- and post-smoother \\
& ``Position'' of the smoother: pre-smoother, post-smoother,
pre- and post-smoother. \\
\hline
\end{tabular}
\end{center}
@ -166,7 +165,7 @@ see Section~\ref{sec:background}.
\begin{sidewaystable}
\begin{center}
\begin{tabular}{|l|l|p{2.6cm}|l|p{7cm}|}
\begin{tabular}{|l|l|p{3.2cm}|l|p{7cm}|}
\hline
\verb|what| & \textsc{data type} & \verb|val| & \textsc{default} &
\textsc{comments} \\ \hline
@ -174,35 +173,35 @@ see Section~\ref{sec:background}.
\verb|mld_sub_ovr_| & \verb|integer|
& any integer number $\ge 0$
& 1
& Number of overlap layers. \\
& Number of overlap layers. \\ \hline
\verb|mld_sub_restr_| & \verb|character(len=*)|
& \texttt{'HALO'} \ \ \ \ \ \texttt{'NONE'}
& \texttt{'HALO'} \hspace{2.5cm} \texttt{'NONE'}
& \texttt{'HALO'}
& Type of restriction operator:
\texttt{'HALO'} for taking into account the overlap, \texttt{'NONE'}
for neglecting it. \\
for neglecting it. \\ \hline
\verb|mld_sub_prol_| & \verb|character(len=*)|
& \texttt{'SUM'} \ \ \ \ \ \texttt{'NONE'}
& \texttt{'SUM'} \hspace{2.5cm} \texttt{'NONE'}
& \texttt{'NONE'}
& Type of prolongator operator:
\texttt{'SUM'} for adding the contributions from the overlap, \texttt{'NONE'}
for neglecting them. \\
for neglecting them. \\ \hline
\verb|mld_sub_solve_| & \verb|character(len=*)|
& \texttt{'ILU'} \ \ \ \ \ \texttt{'MILU'} \ \ \ \ \ \texttt{'ILUT'} \ \ \ \ \
\texttt{'UMF'} \ \ \ \ \ \texttt{'SLU'}
& \texttt{'ILU'} \hspace{2.5cm} \texttt{'MILU'} \hspace{2.5cm} \texttt{'ILUT'}
\hspace{2.5cm} \texttt{'UMF'} \hspace{2.5cm} \texttt{'SLU'}
& \texttt{'UMF'}
& Local solver: ILU($p$), MILU($p$), ILU($p,t$), LU from UMFPACK, LU from SuperLU,
plus triangular solve. \\
& Local solver: ILU($p$), MILU($p$), ILU($p,t$), LU from UMFPACK, LU from SuperLU
(plus triangular solve). \\ \hline
\verb|mld_sub_fillin_| & \verb|integer|
& any integer number $\ge 0$
& Any~int.~num.~$\ge 0$
& 0
& Fill-in level $p$ of the incomplete LU factorizations. \\
& Fill-in level $p$ of the incomplete LU factorizations. \\ \hline
\verb|mld_sub_thresh_| & \verb|real(|\emph{kind\_parameter}\verb|)|
& any real number $\ge 0$
& Any~real~num.~$\ge 0$
& \texttt{0.e0} (or \texttt{0.d0})
& Drop tolerance $t$ in the ILU($p,t$) factorization. \\
& Drop tolerance $t$ in the ILU($p,t$) factorization. \\ \hline
\verb|mld_sub_ren_| & \verb|character(len=*)|
& \texttt{'RENUM\_NONE'}, \texttt{'RENUM\_GLOBAL'} %, \texttt{'RENUM_GPS'}
& \texttt{'RENUM\_NONE'} \texttt{'RENUM\_GLOBAL'} %, \texttt{'RENUM_GPS'}
& \texttt{'RENUM\_NONE'}
& Row and column reordering of the local submatrices: no reordering,
reordering according to the global numbering of the rows and columns of
@ -216,7 +215,7 @@ see Section~\ref{sec:background}.
\begin{sidewaystable}
\begin{center}
\begin{tabular}{|l|l|p{2.6cm}|l|p{7cm}|}
\begin{tabular}{|l|l|p{2.3cm}|p{2.6cm}|p{7cm}|}
\hline
\verb|what| & \textsc{data type} & \verb|val| & \textsc{default} &
\textsc{comments} \\ \hline
@ -224,21 +223,25 @@ see Section~\ref{sec:background}.
\verb|mld_aggr_alg_| & \verb|character(len=*)|
& \texttt{'DEC'}
& \texttt{'DEC'}
& Aggregation algorithm. Currently, only the decoupled aggregation is available. \\
& Aggregation algorithm. Currently, only the decoupled aggregation is available. \\ \hline
\verb|mld_aggr_kind_| & \verb|character(len=*)|
& \texttt{'SMOOTH'} \ \ \ \ \ \texttt{'RAW'}
& \texttt{'SMOOTH'} \hspace{2.5cm} \texttt{'RAW'}
& \texttt{'SMOOTH'}
& Type of aggregation: smoothed or raw, i.e.\ using the tentative prolongator. \\
& Type of aggregation: smoothed or raw, i.e.\ using the tentative prolongator. \\ \hline
\verb|mld_aggr_thresh_| & \verb|real(|\emph{kind\_parameter}\verb|)|
& any real number $\in [0, 1]$
& Any~real~num. $\in [0, 1]$
& \texttt{0.e0} (or \texttt{0.d0})
& The threshold $\theta$ in the aggregation algorithm. \\
& The threshold $\theta$ in the aggregation algorithm. \\ \hline
\verb|mld_aggr_eig_| & \verb|character(len=*)|
& \texttt{'A\_NORMI'}
& \texttt{'A\_NORMI'}
& Estimate of the maximum eigenvalue of $D^{-1}A$
for the smoothed aggregation. Currently, only the infinity norm of
the matrix is available. \\
the matrix is available. \\ \hline
\verb|mld_aggr_damp_| & \verb|real(|\emph{kind\_parameter}\verb|)|
& Any~real~num. $>0$
& \texttt{4.e0/3.e0} \hspace{1cm} (or \texttt{4.d0/3.d0})
& The damping parameter $\omega$ in the aggregation algorithm. \\
\hline
\end{tabular}
\end{center}
@ -248,41 +251,41 @@ see Section~\ref{sec:background}.
\begin{sidewaystable}
\begin{center}
\begin{tabular}{|l|l|p{2.6cm}|l|p{7cm}|}
\begin{tabular}{|l|l|p{3.2cm}|l|p{7cm}|}
\hline
\verb|what| & \textsc{data type} & \verb|val| & \textsc{default} &
\textsc{comments} \\ \hline
%\multicolumn{5}{|c|}{\emph{coarse-space correction at the coarsest level}}\\ \hline
\verb|mld_coarse_mat_| & \verb|character(len=*)|
& \texttt{'DISTR'} \ \ \ \ \ \texttt{'REPL'}
& \texttt{'DISTR'} \hspace{2.5cm} \texttt{'REPL'}
& \texttt{'DISTR'}
& Coarsest matrix: distributed among the processors or replicated on each of them. \\
& Coarsest matrix: distributed among the processors or replicated on each of them. \\ \hline
\verb|mld_coarse_solve_| & \verb|character(len=*)|
& \texttt{'BJAC'} \ \ \ \ \ \texttt{'UMF'} \ \ \ \ \ \ \ \ \texttt{'SLU'}
\ \ \ \ \ \texttt{'SLUDIST'}
& \texttt{'BJAC'} \hspace{2.5cm} \texttt{'UMF'} \hspace{2.5cm} \texttt{'SLU'}
\hspace{2.5cm} \texttt{'SLUDIST'}
& \texttt{'BJAC'}
& Solver used at the coarsest level: block Jacobi, sequential LU from UMFPACK,
sequential LU from SuperLU, or distributed LU from SuperLU\_Dist.
sequential LU from SuperLU, distributed LU from SuperLU\_Dist.
If the coarsest matrix is distributed, only \texttt{'BJAC'} and \texttt{'SLUDIST'}
can be chosen; if it is replicated, only \emph{'BJAC'} or \texttt{'SLUDIST'} can
be selected. \\
can be chosen; if it is replicated, only \texttt{'BJAC'} or \texttt{'SLUDIST'} can
be selected. \\ \hline
\verb|mld_coarse_subsolve_| & \verb|character(len=*)|
& \texttt{'ILU'} \ \ \ \ \ \ \ \texttt{'MILU'} \ \ \ \ \ \ \ \ \texttt{'ILUT'}
\ \ \ \ \ \ \ \texttt{'UMF'} \ \ \ \ \ \ \ \texttt{'SLU'}
& \texttt{'ILU'} \hspace{2.5cm} \texttt{'MILU'} \hspace{2.5cm} \texttt{'ILUT'}
\hspace{2.5cm} \texttt{'UMF'} \hspace{2.5cm} \texttt{'SLU'}
& \texttt{'UMF'}
& Solver for the diagonal blocks of the coarse matrix, in case the block Jacobi solver
is chosen as coarsest-level solver: ILU($p$), MILU($p$), ILU($p,t$), LU from UMFPACK,
LU from SuperLU, plus triangular solve. \\
LU from SuperLU, plus triangular solve. \\ \hline
\verb|mld_coarse_sweeps_|& \verb|integer|
& any integer number $> 0$
& Any~int.~num.~$> 0$
& \texttt{4}
& Number of Block-Jacobi sweeps when 'BJAC' is used as coarsest-level solver. \\
\verb|mld_coarse_fillin_| & \verb|integer|
& any integer number $\ge 0$
& Any~int.~num.~$\ge 0$
& \texttt{0}
& Fill-in level $p$ of the incomplete LU factorizations. \\
& Fill-in level $p$ of the incomplete LU factorizations. \\ \hline
\verb|mld_coarse_thresh_| & \verb|real(|\emph{kind\_parameter}\verb|)|
& any real number $\ge 0$
& Any~real.~num.~$\ge 0$
& \texttt{0.d0} (or \texttt{0.e0})
& Drop tolerance $t$ in the ILU($p,t$) factorization. \\
\hline
@ -395,6 +398,7 @@ This routine deallocates the preconditioner data structure.
\subsection{Subroutine mld\_precdescr\label{sec:precdescr}}
\begin{center}
\verb|mld_precdescr(p,info)|\\
\verb|mld_precdescr(p,info,iout)|\\
\end{center}

File diff suppressed because one or more lines are too long

@ -47,8 +47,11 @@
! build the coarse-level matrix.
!
! The aggregation algorithm is a parallel version of that described in
! M. Brezina and P. Vanek, A black-box iterative solver based on a
! * M. Brezina and P. Vanek, A black-box iterative solver based on a
! two-level Schwarz method, Computing, 63 (1999), 233-263.
! * P. Vanek, J. Mandel and M. Brezina, Algebraic Multigrid by Smoothed
! Aggregation for Second and Fourth Order Elliptic Problems, Computing, 56
! (1996), 179-196.
! For more details see
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.

@ -91,7 +91,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv)) then
info = 3111
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
return
endif
nlev_ = size(p%baseprecv)
@ -110,7 +110,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
info = 3111
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
return
endif
@ -162,13 +162,16 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
case(mld_bjac_)
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_sweeps_)
@ -204,7 +207,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -215,7 +218,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
do ilev_=2,nlev_-1
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -224,7 +227,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
case(mld_coarse_mat_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
& ': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
& ': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -232,28 +235,29 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
case(mld_coarse_solve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case(mld_bjac_)
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_subsolve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
end if
@ -262,7 +266,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
case(mld_coarse_sweeps_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -270,7 +274,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev)
case(mld_coarse_fillin_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -355,7 +359,7 @@ subroutine mld_cprecsetc(p,what,string,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -427,7 +431,7 @@ subroutine mld_cprecsetr(p,what,val,info,ilev)
end if
if (.not.allocated(p%baseprecv)) then
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
info = 3111
return
endif
@ -439,7 +443,7 @@ subroutine mld_cprecsetr(p,what,val,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -480,16 +484,24 @@ subroutine mld_cprecsetr(p,what,val,info,ilev)
case(mld_fact_thrs_)
do ilev_=1,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
p%baseprecv(ilev_)%rprcparm(what) = val
end do
case(mld_coarse_fthrs_)
ilev_=nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
p%baseprecv(ilev_)%rprcparm(mld_fact_thrs_) = val
case(mld_aggr_damp_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -498,7 +510,7 @@ subroutine mld_cprecsetr(p,what,val,info,ilev)
case(mld_aggr_thresh_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif

@ -47,8 +47,11 @@
! build the coarse-level matrix.
!
! The aggregation algorithm is a parallel version of that described in
! M. Brezina and P. Vanek, A black-box iterative solver based on a
! * M. Brezina and P. Vanek, A black-box iterative solver based on a
! two-level Schwarz method, Computing, 63 (1999), 233-263.
! * P. Vanek, J. Mandel and M. Brezina, Algebraic Multigrid by Smoothed
! Aggregation for Second and Fourth Order Elliptic Problems, Computing, 56
! (1996), 179-196.
! For more details see
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.

@ -91,7 +91,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv)) then
info = 3111
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
return
endif
nlev_ = size(p%baseprecv)
@ -110,7 +110,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
info = 3111
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
return
endif
@ -162,13 +162,16 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
case(mld_bjac_)
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_sweeps_)
@ -204,7 +207,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -215,7 +218,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
do ilev_=2,nlev_-1
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -224,7 +227,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
case(mld_coarse_mat_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
& ': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
& ': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -232,28 +235,29 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
case(mld_coarse_solve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case(mld_bjac_)
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_subsolve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
end if
@ -262,7 +266,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
case(mld_coarse_sweeps_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -270,7 +274,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev)
case(mld_coarse_fillin_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -355,7 +359,7 @@ subroutine mld_dprecsetc(p,what,string,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -426,7 +430,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
end if
if (.not.allocated(p%baseprecv)) then
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
info = 3111
return
endif
@ -438,7 +442,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -479,7 +483,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
case(mld_fact_thrs_)
do ilev_=1,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -488,7 +492,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
case(mld_coarse_fthrs_)
ilev_=nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -496,7 +500,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
case(mld_aggr_damp_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -505,7 +509,7 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
case(mld_aggr_thresh_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif

File diff suppressed because it is too large Load Diff

@ -47,8 +47,11 @@
! build the coarse-level matrix.
!
! The aggregation algorithm is a parallel version of that described in
! M. Brezina and P. Vanek, A black-box iterative solver based on a
! * M. Brezina and P. Vanek, A black-box iterative solver based on a
! two-level Schwarz method, Computing, 63 (1999), 233-263.
! * P. Vanek, J. Mandel and M. Brezina, Algebraic Multigrid by Smoothed
! Aggregation for Second and Fourth Order Elliptic Problems, Computing, 56
! (1996), 179-196.
! For more details see
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.

@ -91,7 +91,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv)) then
info = 3111
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
return
endif
nlev_ = size(p%baseprecv)
@ -110,7 +110,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
info = 3111
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
return
endif
@ -162,13 +162,16 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
case(mld_bjac_)
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_sweeps_)
@ -204,7 +207,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -215,7 +218,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
do ilev_=2,nlev_-1
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -224,7 +227,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
case(mld_coarse_mat_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
& ': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
& ': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -232,28 +235,29 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
case(mld_coarse_solve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case(mld_bjac_)
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_subsolve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
end if
@ -262,7 +266,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
case(mld_coarse_sweeps_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -270,7 +274,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev)
case(mld_coarse_fillin_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -355,7 +359,7 @@ subroutine mld_sprecsetc(p,what,string,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -426,7 +430,7 @@ subroutine mld_sprecsetr(p,what,val,info,ilev)
end if
if (.not.allocated(p%baseprecv)) then
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
info = 3111
return
endif
@ -438,7 +442,7 @@ subroutine mld_sprecsetr(p,what,val,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -479,16 +483,24 @@ subroutine mld_sprecsetr(p,what,val,info,ilev)
case(mld_fact_thrs_)
do ilev_=1,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
p%baseprecv(ilev_)%rprcparm(what) = val
end do
case(mld_coarse_fthrs_)
ilev_=nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
p%baseprecv(ilev_)%rprcparm(mld_fact_thrs_) = val
case(mld_aggr_damp_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -497,7 +509,7 @@ subroutine mld_sprecsetr(p,what,val,info,ilev)
case(mld_aggr_thresh_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif

@ -47,8 +47,11 @@
! build the coarse-level matrix.
!
! The aggregation algorithm is a parallel version of that described in
! M. Brezina and P. Vanek, A black-box iterative solver based on a
! * M. Brezina and P. Vanek, A black-box iterative solver based on a
! two-level Schwarz method, Computing, 63 (1999), 233-263.
! * P. Vanek, J. Mandel and M. Brezina, Algebraic Multigrid by Smoothed
! Aggregation for Second and Fourth Order Elliptic Problems, Computing, 56
! (1996), 179-196.
! For more details see
! P. D'Ambra, D. di Serafino and S. Filippone, On the development of
! PSBLAS-based parallel two-level Schwarz preconditioners, Appl. Num. Math.

@ -91,7 +91,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv)) then
info = 3111
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
return
endif
nlev_ = size(p%baseprecv)
@ -110,7 +110,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
info = 3111
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
return
endif
@ -162,13 +162,16 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
case(mld_bjac_)
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_sweeps_)
@ -204,7 +207,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -215,7 +218,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
do ilev_=2,nlev_-1
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -224,7 +227,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
case(mld_coarse_mat_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
& ': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
& ': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -232,28 +235,29 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
case(mld_coarse_solve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
if (nlev_ > 1) then
p%baseprecv(nlev_)%iprcparm(mld_coarse_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == 0) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = val
p%baseprecv(nlev_)%iprcparm(mld_smoother_type_) = mld_bjac_
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
select case (val)
case(mld_umf_, mld_slu_)
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_repl_mat_
case(mld_bjac_)
p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_ilu_n_
case default
p%baseprecv(nlev_)%iprcparm(mld_coarse_mat_) = mld_distr_mat_
if (p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) == mld_bjac_) &
& p%baseprecv(nlev_)%iprcparm(mld_sub_solve_) = mld_umf_
end select
endif
case(mld_coarse_subsolve_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
end if
@ -262,7 +266,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
case(mld_coarse_sweeps_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -270,7 +274,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev)
case(mld_coarse_fillin_)
if (.not.allocated(p%baseprecv(nlev_)%iprcparm)) then
write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
&': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -355,7 +359,7 @@ subroutine mld_zprecsetc(p,what,string,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -427,7 +431,7 @@ subroutine mld_zprecsetr(p,what,val,info,ilev)
end if
if (.not.allocated(p%baseprecv)) then
write(0,*) name,': Error: Uninitialized preconditioner, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner, should call MLD_PRECINIT'
info = 3111
return
endif
@ -439,7 +443,7 @@ subroutine mld_zprecsetr(p,what,val,info,ilev)
return
endif
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = 3111
return
endif
@ -480,16 +484,24 @@ subroutine mld_zprecsetr(p,what,val,info,ilev)
case(mld_fact_thrs_)
do ilev_=1,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
p%baseprecv(ilev_)%rprcparm(what) = val
end do
case(mld_coarse_fthrs_)
ilev_=nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
p%baseprecv(ilev_)%rprcparm(mld_fact_thrs_) = val
case(mld_aggr_damp_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif
@ -498,7 +510,7 @@ subroutine mld_zprecsetr(p,what,val,info,ilev)
case(mld_aggr_thresh_)
do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then
write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
write(0,*) name,': Error: uninitialized preconditioner component, should call MLD_PRECINIT'
info = -1
return
endif

@ -289,7 +289,7 @@ program cf_sample
call psb_sum(ictxt,descsize)
call psb_sum(ictxt,precsize)
if (iam==psb_root_) then
call mld_precdescr(prec)
call mld_precdescr(prec,info)
write(*,'("Matrix: ",a)')mtrx_file
write(*,'("Computed solution on ",i8," processors")')np
write(*,'("Iterations to convergence : ",i6)')iter

@ -289,7 +289,7 @@ program df_sample
call psb_sum(ictxt,descsize)
call psb_sum(ictxt,precsize)
if (iam==psb_root_) then
call mld_precdescr(prec)
call mld_precdescr(prec,info)
write(*,'("Matrix: ",a)')mtrx_file
write(*,'("Computed solution on ",i8," processors")')np
write(*,'("Iterations to convergence : ",i6)')iter

@ -289,7 +289,7 @@ program sf_sample
call psb_sum(ictxt,descsize)
call psb_sum(ictxt,precsize)
if (iam==psb_root_) then
call mld_precdescr(prec)
call mld_precdescr(prec,info)
write(*,'("Matrix: ",a)')mtrx_file
write(*,'("Computed solution on ",i8," processors")')np
write(*,'("Iterations to convergence : ",i6)')iter

@ -289,7 +289,7 @@ program zf_sample
call psb_sum(ictxt,descsize)
call psb_sum(ictxt,precsize)
if (iam==psb_root_) then
call mld_precdescr(prec)
call mld_precdescr(prec,info)
write(*,'("Matrix: ",a)')mtrx_file
write(*,'("Computed solution on ",i8," processors")')np
write(*,'("Iterations to convergence : ",i6)')iter

@ -9,6 +9,7 @@ FINCLUDES=$(FMFLAG). $(FMFLAG)$(MLDLIBDIR) $(FMFLAG)$(PSBDIR) $(FIFLAG).
EXEDIR=./runs
all: ppde spde
ppde: ppde.o data_input.o
$(F90LINK) ppde.o data_input.o -o ppde $(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)

@ -222,7 +222,7 @@ program ppde
call psb_amx(ictxt,tprec)
if (iam == psb_root_) write(*,'("Preconditioner time : ",es10.4)')tprec
if (iam == psb_root_) call mld_precdescr(prec)
if (iam == psb_root_) call mld_precdescr(prec,info)
if (iam == psb_root_) write(*,'(" ")')
!

@ -222,7 +222,7 @@ program spde
call psb_amx(ictxt,tprec)
if (iam == psb_root_) write(*,'("Preconditioner time : ",es10.4)')tprec
if (iam == psb_root_) call mld_precdescr(prec)
if (iam == psb_root_) call mld_precdescr(prec,info)
if (iam == psb_root_) write(*,'(" ")')
!

Loading…
Cancel
Save