mld2p4-2:

docs/html/img100.png
 docs/html/img101.png
 docs/html/img102.png
 docs/html/img103.png
 docs/html/img104.png
 docs/html/img94.png
 docs/html/img95.png
 docs/html/img96.png
 docs/html/img97.png
 docs/html/img98.png
 docs/html/img99.png
 docs/html/node12.html
 docs/html/node14.html
 docs/html/node15.html
 docs/html/node18.html
 docs/html/node20.html
 docs/html/node26.html
 docs/mld2p4-2.0-guide.pdf
 docs/src/gettingstarted.tex
 docs/src/userinterface.tex
 mlprec/archive/mld_c_as_smoother_impl.f90
 mlprec/archive/mld_c_onelev_impl.f90
 mlprec/archive/mld_d_as_smoother_impl.f90
 mlprec/archive/mld_d_onelev_impl.f90
 mlprec/archive/mld_s_as_smoother_impl.f90
 mlprec/archive/mld_s_onelev_impl.f90
 mlprec/archive/mld_z_as_smoother_impl.f90
 mlprec/impl/level/mld_c_base_onelev_check.f90
 mlprec/impl/level/mld_d_base_onelev_check.f90
 mlprec/impl/level/mld_s_base_onelev_check.f90
 mlprec/impl/level/mld_z_base_onelev_check.f90
 mlprec/impl/mld_cmlprec_bld.f90
 mlprec/impl/mld_dmlprec_bld.f90
 mlprec/impl/mld_smlprec_bld.f90
 mlprec/impl/mld_z_onelev_impl.f90
 mlprec/impl/mld_zmlprec_bld.f90
 mlprec/impl/smoother/mld_c_as_smoother_check.f90
 mlprec/impl/smoother/mld_d_as_smoother_check.f90
 mlprec/impl/smoother/mld_s_as_smoother_check.f90
 mlprec/impl/smoother/mld_z_as_smoother_check.f90
 mlprec/mld_base_prec_type.F90
 mlprec/mld_c_ilu_solver.f90
 mlprec/mld_d_ilu_solver.f90
 mlprec/mld_s_ilu_solver.f90
 mlprec/mld_z_ilu_solver.f90
 tests/fileread/Makefile
 tests/fileread/df_sample.f90
 tests/fileread/runs/dfs.inp

Unify checks for INT nonnegative or positive.
stopcriterion
Salvatore Filippone 9 years ago
parent 758d52f175
commit 8d27ad5167

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 B

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 634 B

@ -727,7 +727,7 @@ $w = y_1$;
\begin{tabbing}
\quad \=\quad...
...= y_l+r_l$\\
\textbf{endfor} [1mm]
\textbf{endfor} \\ [1mm]
$w = y_1$;
\end{tabbing}}
\end{minipage}}">

@ -165,9 +165,9 @@ Preconditioner types, corresponding strings and default choices.
<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 post-smoothing only.
with pre- and post-smoothing.
Number of levels: 2.
Post-smoother: RAS with overlap 1 and ILU(0)
Smoother: RAS with overlap 1 and ILU(0)
on the local blocks.
Aggregation: decoupled smoothed aggregation with
threshold <IMG

@ -108,7 +108,7 @@ Setup and application of the default multi-level Schwarz preconditioner.
! preconditioner
type(mld_dprec_type) :: P
! right-hand side and solution vectors
real(kind(1.d0)) :: b(:), x(:)
type(psb_d_vect_type) :: b, x
... ...
!
! initialize the parallel environment
@ -122,8 +122,9 @@ Setup and application of the default multi-level Schwarz preconditioner.
!
! initialize the default multi-level preconditioner, i.e. hybrid
! Schwarz, using RAS (with overlap 1 and ILU(0) on the blocks)
! as post-smoother and 4 block-Jacobi sweeps (with UMFPACK LU
! on the blocks) as distributed coarse-level solver
! as pre- and post-smoother and 4 block-Jacobi sweeps
! (with UMFPACK LU on the blocks) as distributed coarse-level
! solver.
call mld_precinit(P,'ML',info)
!
! build the preconditioner
@ -208,9 +209,10 @@ Setup of a hybrid three-level Schwarz preconditioner.</CAPTION>
! a coarsest matrix replicated on the processors, and the
! LU factorization from UMFPACK 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_,'UMF',info)
call_mld_precset(P,'SMOOTHER_TYPE','BJAC',info)
call_mld_precset(P,'SMOOTHER_POS,'POST'w,info)
call mld_precset(P,'COARSE_MAT','REPL',info)
call mld_precset(P,'COARSE_SOLVE','UMF',info)
... ...
</PRE>
</TD></TR>
@ -240,9 +242,9 @@ Setup of an additive three-level Schwarz preconditioner.</CAPTION>
! post-smoother, and 5 block-Jacobi sweeps (with UMFPACK LU
! on the blocks) as distributed coarsest-level solver
call mld_precinit(P,'ML',info,nlev=3)
call mld_precset(P,mld_ml_type_,'ADD',info)
call_mld_precset(P,mld_smoother_pos_,'TWOSIDE',info)
call mld_precset(P,mld_coarse_sweeps_,5,info)
call mld_precset(P,'ML_TYPE','ADD',info)
call_mld_precset(P,'SMOOTHER_POS','TWOSIDE',info)
call mld_precset(P,'COARSE_SWEEPS',5,info)
... ...
</PRE>
</TD></TR>
@ -269,7 +271,7 @@ Setup of a one-level Schwarz preconditioner.</CAPTION>
... ...
! 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)
call mld_precset(P,'SUB_OVR',2,info)
... ...
</PRE>
</TD></TR>

@ -193,7 +193,7 @@ according to their needs.
<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1266"></A>
<DIV ALIGN="CENTER"><A NAME="1267"></A>
<TABLE>
<CAPTION><STRONG>Table 2:</STRONG>
Parameters defining the type of multi-level preconditioner.
@ -225,7 +225,7 @@ Parameters defining the type of multi-level preconditioner.
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142><code>mld_smoother_pos_</code> <BR><code>SMOOTHER_POS</code></TD>
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=57><TT>'PRE'</TT> <TT>'POST'</TT> <TT>'TWOSIDE'</TT></TD>
<TD ALIGN="LEFT"><TT>'POST'</TT></TD>
<TD ALIGN="LEFT"><TT>'TWOSIDE'</TT></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=198>``Position'' of the smoother: pre-smoother, post-smoother,
pre- and post-smoother.</TD>
</TR>
@ -238,7 +238,7 @@ Parameters defining the type of multi-level preconditioner.
<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1268"></A>
<DIV ALIGN="CENTER"><A NAME="1269"></A>
<TABLE>
<CAPTION><STRONG>Table 3:</STRONG>
Parameters defining the one-level preconditioner used as smoother.
@ -339,7 +339,7 @@ Parameters defining the one-level preconditioner used as smoother.
<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1270"></A>
<DIV ALIGN="CENTER"><A NAME="1271"></A>
<TABLE>
<CAPTION><STRONG>Table 4:</STRONG>
Parameters defining the aggregation algorithm.
@ -385,12 +385,28 @@ Parameters defining the aggregation algorithm.
WIDTH="56" HEIGHT="36" ALIGN="MIDDLE" BORDER="0"
SRC="img92.png"
ALT="$\in [0, 1]$"></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>0</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>0.05</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>Threshold <IMG
WIDTH="13" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img93.png"
ALT="$\theta$"> 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>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>Any&nbsp;real&nbsp;num. <IMG
WIDTH="56" HEIGHT="36" ALIGN="MIDDLE" BORDER="0"
SRC="img92.png"
ALT="$\in [0, 1]$"></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68>1.0</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>Scale factor applied to the threshold going
from level <IMG
WIDTH="33" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img94.png"
ALT="$ilev$"> to level <IMG
WIDTH="63" HEIGHT="34" ALIGN="MIDDLE" BORDER="0"
SRC="img95.png"
ALT="$ilev+1$">.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142><code>mld_aggr_omega_alg_</code> <BR><code>AGGR_OMEGA_ALG</code></TD>
<TD ALIGN="LEFT"><code>character(len=*)</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=68><TT>'EIG_EST'</TT> <TT>'USER_CHOICE'</TT></TD>
@ -426,7 +442,7 @@ Parameters defining the aggregation algorithm.
-->
<IMG
WIDTH="113" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img94.png"
SRC="img96.png"
ALT="$4/(3\rho(D^{-1}A))$"></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=170>Damping parameter <IMG
WIDTH="16" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
@ -438,7 +454,7 @@ Parameters defining the aggregation algorithm.
otherwise it is computed by the library, using the
selected estimate of the spectral radius <IMG
WIDTH="73" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img95.png"
SRC="img97.png"
ALT="$\rho(D^{-1}A)$"> of
<IMG
WIDTH="50" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
@ -454,7 +470,7 @@ Parameters defining the aggregation algorithm.
<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1273"></A>
<DIV ALIGN="CENTER"><A NAME="1274"></A>
<TABLE>
<CAPTION><STRONG>Table 5:</STRONG>
Parameters defining the coarse-space correction at the coarsest
@ -512,7 +528,7 @@ level.</CAPTION>
<TD ALIGN="LEFT"><code>integer</code></TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=91>Any&nbsp;int.&nbsp;num.&nbsp;<IMG
WIDTH="32" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img96.png"
SRC="img98.png"
ALT="$&gt; 0$"></TD>
<TD ALIGN="LEFT">4</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=142>Number of Block-Jacobi sweeps when 'BJAC' is used as

@ -69,14 +69,14 @@ This routine computes <!-- MATH
-->
<IMG
WIDTH="117" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img97.png"
ALT="$y = op(M^{-1}) x$">, where <IMG
SRC="img99.png"
ALT="$y = op(M^{-1})\, x$">, where <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
WIDTH="22" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img98.png"
SRC="img100.png"
ALT="$op$">
denotes the preconditioner itself or its transpose, according to
the value of <code>trans</code>.
@ -106,7 +106,7 @@ and hence it is completely transparent to the user.
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The local part of the vector <IMG
WIDTH="14" HEIGHT="18" ALIGN="BOTTOM" BORDER="0"
SRC="img99.png"
SRC="img101.png"
ALT="$x$">. Note that <I>type</I> and
<I>kind_parameter</I> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
@ -117,7 +117,7 @@ and hence it is completely transparent to the user.
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34>&nbsp;</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=340>The local part of the vector <IMG
WIDTH="14" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="img100.png"
SRC="img102.png"
ALT="$y$">. Note that <I>type</I> and
<I>kind_parameter</I> must be chosen according
to the real/complex, single/double precision version of MLD2P4 under use.</TD>
@ -144,28 +144,28 @@ and hence it is completely transparent to the user.
-->
<IMG
WIDTH="132" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img101.png"
SRC="img103.png"
ALT="$op(M^{-1}) = M^{-1}$">;
if <code>trans</code> = <code>'T','t'</code> then <!-- MATH
$op(M^{-1}) = M^{-T}$
-->
<IMG
WIDTH="135" HEIGHT="40" ALIGN="MIDDLE" BORDER="0"
SRC="img102.png"
SRC="img104.png"
ALT="$op(M^{-1}) = M^{-T}$">
(transpose of <IMG
WIDTH="48" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img103.png"
SRC="img105.png"
ALT="$M^{-1})$">; if <code>trans</code> = <code>'C','c'</code> then <!-- MATH
$op(M^{-1}) = M^{-C}$
-->
<IMG
WIDTH="136" HEIGHT="40" ALIGN="MIDDLE" BORDER="0"
SRC="img104.png"
SRC="img106.png"
ALT="$op(M^{-1}) = M^{-C}$">
(conjugate transpose of <IMG
WIDTH="48" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
SRC="img103.png"
SRC="img105.png"
ALT="$M^{-1})$">.</TD>
</TR>
<TR><TD ALIGN="LEFT" VALIGN="TOP" WIDTH=34><code>work</code></TD>

@ -63,7 +63,7 @@ Mathematics Department, Macquarie University, Sydney.
The command line arguments were: <BR>
<STRONG>latex2html</STRONG> <TT>-local_icons -noaddress -dir ../../html userhtml.tex</TT>
<P>
The translation was initiated by Salvatore Filippone on 2015-10-14
The translation was initiated by Filippone on 2015-12-17
<BR><HR>
</BODY>

File diff suppressed because it is too large Load Diff

@ -85,9 +85,9 @@ Additive Schwarz & \verb|'AS'| & Restricted Additive Schwarz (RAS),
with overlap 1 and ILU(0) on the local blocks. \\ \hline
Multilevel &\verb|'ML'| & Multi-level hybrid preconditioner (additive on the
same level and multiplicative through the levels),
with post-smoothing only.
with pre- and post-smoothing.
Number of levels: 2.
Post-smoother: RAS with overlap 1 and ILU(0)
Smoother: RAS with overlap 1 and ILU(0)
on the local blocks.
Aggregation: decoupled smoothed aggregation with
threshold $\theta = 0$.
@ -151,7 +151,7 @@ the corresponding Fortran 95 codes are available in \verb|examples/fileread/|.
! preconditioner
type(mld_dprec_type) :: P
! right-hand side and solution vectors
real(kind(1.d0)) :: b(:), x(:)
type(psb_d_vect_type) :: b, x
... ...
!
! initialize the parallel environment
@ -165,8 +165,9 @@ the corresponding Fortran 95 codes are available in \verb|examples/fileread/|.
!
! initialize the default multi-level preconditioner, i.e. hybrid
! Schwarz, using RAS (with overlap 1 and ILU(0) on the blocks)
! as post-smoother and 4 block-Jacobi sweeps (with UMFPACK LU
! on the blocks) as distributed coarse-level solver
! as pre- and post-smoother and 4 block-Jacobi sweeps
! (with UMFPACK LU on the blocks) as distributed coarse-level
! solver.
call mld_precinit(P,'ML',info)
!
! build the preconditioner
@ -249,9 +250,10 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
! a coarsest matrix replicated on the processors, and the
! LU factorization from UMFPACK 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_,'UMF',info)
call_mld_precset(P,'SMOOTHER_TYPE','BJAC',info)
call_mld_precset(P,'SMOOTHER_POS,'POST'w,info)
call mld_precset(P,'COARSE_MAT','REPL',info)
call mld_precset(P,'COARSE_SOLVE','UMF',info)
... ...
\end{verbatim}
}
@ -272,9 +274,9 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
! post-smoother, and 5 block-Jacobi sweeps (with UMFPACK LU
! on the blocks) as distributed coarsest-level solver
call mld_precinit(P,'ML',info,nlev=3)
call mld_precset(P,mld_ml_type_,'ADD',info)
call_mld_precset(P,mld_smoother_pos_,'TWOSIDE',info)
call mld_precset(P,mld_coarse_sweeps_,5,info)
call mld_precset(P,'ML_TYPE','ADD',info)
call_mld_precset(P,'SMOOTHER_POS','TWOSIDE',info)
call mld_precset(P,'COARSE_SWEEPS',5,info)
... ...
\end{verbatim}
}
@ -292,7 +294,7 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
... ...
! 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)
call mld_precset(P,'SUB_OVR',2,info)
... ...
\end{verbatim}
}

@ -199,7 +199,7 @@ according to their needs.
block Jacobi, AS. \\ \hline
\verb|mld_smoother_pos_| \break \verb|SMOOTHER_POS| & \verb|character(len=*)|
& \texttt{'PRE'} \ \ \ \texttt{'POST'} \ \ \ \texttt{'TWOSIDE'}
& \texttt{'POST'}
& \texttt{'TWOSIDE'}
& ``Position'' of the smoother: pre-smoother, post-smoother,
pre- and post-smoother. \\
\hline
@ -289,8 +289,13 @@ according to their needs.
(i.e.\ using the tentative prolongator). \\ \hline
\verb|mld_aggr_thresh_| \break \verb|AGGR_THRESH| & \verb|real(|\emph{kind\_parameter}\verb|)|
& Any~real~num. $\in [0, 1]$
& 0
& 0.05
& Threshold $\theta$ in the aggregation algorithm. \\ \hline
\verb|mld_aggr_scale_| \break \verb|AGGR_SCALE| & \verb|real(|\emph{kind\_parameter}\verb|)|
& Any~real~num. $\in [0, 1]$
& 1.0
& Scale factor applied to the threshold going
from level $ilev$ to level $ilev+1$. \\ \hline
\verb|mld_aggr_omega_alg_| \break \verb|AGGR_OMEGA_ALG|& \verb|character(len=*)|
& \texttt{'EIG\_EST'} \hspace{2.5cm} \texttt{'USER\_CHOICE'}
& \texttt{'EIG\_EST'}

@ -64,7 +64,7 @@ subroutine mld_c_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',0,is_legal_n_ovr)
& 'Overlap layers ',0,is_int_non_negative)
if (allocated(sm%sv)) then

@ -190,11 +190,11 @@ subroutine mld_c_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
if (allocated(lv%sm)) then

@ -64,7 +64,7 @@ subroutine mld_d_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',0,is_legal_n_ovr)
& 'Overlap layers ',0,is_int_non_negative)
if (allocated(sm%sv)) then

@ -190,11 +190,11 @@ subroutine mld_d_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
if (allocated(lv%sm)) then

@ -64,7 +64,7 @@ subroutine mld_s_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',0,is_legal_n_ovr)
& 'Overlap layers ',0,is_int_non_negative)
if (allocated(sm%sv)) then

@ -190,11 +190,11 @@ subroutine mld_s_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
if (allocated(lv%sm)) then

@ -64,7 +64,7 @@ subroutine mld_z_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',0,is_legal_n_ovr)
& 'Overlap layers ',0,is_int_non_negative)
if (allocated(sm%sv)) then

@ -53,11 +53,11 @@ subroutine mld_c_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (allocated(lv%sm)) then

@ -53,11 +53,11 @@ subroutine mld_d_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (allocated(lv%sm)) then

@ -53,11 +53,11 @@ subroutine mld_s_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (allocated(lv%sm)) then

@ -53,11 +53,11 @@ subroutine mld_z_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (allocated(lv%sm)) then

@ -475,11 +475,11 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit
info=3111

@ -475,11 +475,11 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit
info=3111

@ -475,11 +475,11 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit
info=3111

@ -186,11 +186,11 @@ subroutine mld_z_base_onelev_check(lv,info)
info = psb_success_
call mld_check_def(lv%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
call mld_check_def(lv%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps)
& 'Jacobi sweeps',1,is_int_positive)
if (allocated(lv%sm)) then

@ -475,11 +475,11 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
& write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',ione,is_legal_jac_sweeps)
& 'Jacobi sweeps',ione,is_int_positive)
if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit
info=3111

@ -57,7 +57,7 @@ subroutine mld_c_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',izero,is_legal_n_ovr)
& 'Overlap layers ',izero,is_int_non_negative)
if (allocated(sm%sv)) then

@ -57,7 +57,7 @@ subroutine mld_d_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',izero,is_legal_n_ovr)
& 'Overlap layers ',izero,is_int_non_negative)
if (allocated(sm%sv)) then

@ -57,7 +57,7 @@ subroutine mld_s_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',izero,is_legal_n_ovr)
& 'Overlap layers ',izero,is_int_non_negative)
if (allocated(sm%sv)) then

@ -57,7 +57,7 @@ subroutine mld_z_as_smoother_check(sm,info)
call mld_check_def(sm%prol,&
& 'Prolongator',psb_none_,is_legal_prolong)
call mld_check_def(sm%novr,&
& 'Overlap layers ',izero,is_legal_n_ovr)
& 'Overlap layers ',izero,is_int_non_negative)
if (allocated(sm%sv)) then

@ -640,14 +640,14 @@ contains
is_legal_base_prec = ((ip>=mld_noprec_).and.(ip<=mld_max_prec_))
return
end function is_legal_base_prec
function is_legal_n_ovr(ip)
function is_int_non_negative(ip)
implicit none
integer(psb_ipk_), intent(in) :: ip
logical :: is_legal_n_ovr
logical :: is_int_non_negative
is_legal_n_ovr = (ip >= 0)
is_int_non_negative = (ip >= 0)
return
end function is_legal_n_ovr
end function is_int_non_negative
function is_legal_renum(ip)
implicit none
integer(psb_ipk_), intent(in) :: ip
@ -662,14 +662,14 @@ contains
is_legal_ilu_scale = ((ip >= mld_ilu_scale_none_).and.(ip <= mld_max_ilu_scale_))
return
end function is_legal_ilu_scale
function is_legal_jac_sweeps(ip)
function is_int_positive(ip)
implicit none
integer(psb_ipk_), intent(in) :: ip
logical :: is_legal_jac_sweeps
logical :: is_int_positive
is_legal_jac_sweeps = (ip >= 1)
is_int_positive = (ip >= 1)
return
end function is_legal_jac_sweeps
end function is_int_positive
function is_legal_prolong(ip)
implicit none
integer(psb_ipk_), intent(in) :: ip
@ -774,14 +774,6 @@ contains
& (ip==mld_milu_n_).or.(ip==mld_ilu_t_))
return
end function is_legal_ilu_fact
function is_legal_ml_lev(ip)
implicit none
integer(psb_ipk_), intent(in) :: ip
logical :: is_legal_ml_lev
is_legal_ml_lev = (ip >= 0)
return
end function is_legal_ml_lev
function is_legal_d_omega(ip)
implicit none
real(psb_dpk_), intent(in) :: ip

@ -223,7 +223,7 @@ contains
select case(sv%fact_type)
case(mld_ilu_n_,mld_milu_n_)
call mld_check_def(sv%fill_in,&
& 'Level',izero,is_legal_ml_lev)
& 'Level',izero,is_int_non_negative)
case(mld_ilu_t_)
call mld_check_def(sv%thresh,&
& 'Eps',szero,is_legal_s_fact_thrs)

@ -223,7 +223,7 @@ contains
select case(sv%fact_type)
case(mld_ilu_n_,mld_milu_n_)
call mld_check_def(sv%fill_in,&
& 'Level',izero,is_legal_ml_lev)
& 'Level',izero,is_int_non_negative)
case(mld_ilu_t_)
call mld_check_def(sv%thresh,&
& 'Eps',dzero,is_legal_d_fact_thrs)

@ -223,7 +223,7 @@ contains
select case(sv%fact_type)
case(mld_ilu_n_,mld_milu_n_)
call mld_check_def(sv%fill_in,&
& 'Level',izero,is_legal_ml_lev)
& 'Level',izero,is_int_non_negative)
case(mld_ilu_t_)
call mld_check_def(sv%thresh,&
& 'Eps',szero,is_legal_s_fact_thrs)

@ -223,7 +223,7 @@ contains
select case(sv%fact_type)
case(mld_ilu_n_,mld_milu_n_)
call mld_check_def(sv%fill_in,&
& 'Level',izero,is_legal_ml_lev)
& 'Level',izero,is_int_non_negative)
case(mld_ilu_t_)
call mld_check_def(sv%thresh,&
& 'Eps',dzero,is_legal_d_fact_thrs)

@ -8,6 +8,7 @@ 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).
DFSAOBJS=df_sample_alya.o data_input.o
DFSOBJS=df_sample.o data_input.o
SFSOBJS=sf_sample.o data_input.o
CFSOBJS=cf_sample.o data_input.o
@ -15,13 +16,18 @@ ZFSOBJS=zf_sample.o data_input.o
EXEDIR=./runs
all: sf_sample df_sample cf_sample zf_sample
all: sf_sample df_sample cf_sample zf_sample df_sample_alya
df_sample: $(DFSOBJS)
$(F90LINK) $(LINKOPT) $(DFSOBJS) -o df_sample \
$(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
/bin/mv df_sample $(EXEDIR)
df_sample_alya: $(DFSAOBJS)
$(F90LINK) $(LINKOPT) $(DFSAOBJS) -o df_sample_alya \
$(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
/bin/mv df_sample_alya $(EXEDIR)
sf_sample: $(SFSOBJS)
$(F90LINK) $(LINKOPT) $(SFSOBJS) -o sf_sample \
$(MLD_LIB) $(PSBLAS_LIB) $(LDLIBS)
@ -42,10 +48,12 @@ df_sample.o: data_input.o
cf_sample.o: data_input.o
zf_sample.o: data_input.o
df_sample_alya.o: data_input.o
clean:
/bin/rm -f $(DFSOBJS) $(ZFSOBJS) $(SFSOBJS) $(DFSOBJS) \
*$(.mod) $(EXEDIR)/sf_sample $(EXEDIR)/cf_sample \
$(EXEDIR)/df_sample $(EXEDIR)/zf_sample
$(EXEDIR)/df_sample_alya $(EXEDIR)/df_sample $(EXEDIR)/zf_sample
lib:
(cd ../../; make library)

@ -71,6 +71,7 @@ program df_sample
real(psb_dpk_) :: cthres ! threshold for coarse fact. ILU(T)
integer(psb_ipk_) :: cjswp ! block-Jacobi sweeps
real(psb_dpk_) :: athres ! smoothed aggregation threshold
real(psb_dpk_) :: ascale ! smoothed aggregation scale factor
end type precdata
type(precdata) :: prec_choice
@ -98,17 +99,18 @@ program df_sample
real(psb_dpk_) :: err, eps
character(len=5) :: afmt
character(len=20) :: name
character(len=20) :: name, renum
integer(psb_ipk_), parameter :: iunit=12
integer(psb_ipk_) :: iparm(20)
character(len=40) :: fprefix
! other variables
integer(psb_ipk_) :: i,info,j,m_problem
integer(psb_ipk_) :: i,info,j,m_problem, lbw,ubw,prf
integer(psb_ipk_) :: internal, m,ii,nnzero
real(psb_dpk_) :: t1, t2, tprec
real(psb_dpk_) :: r_amax, b_amax, scale,resmx,resmxp
integer(psb_ipk_) :: nrhs, nrow, n_row, dim, nv, ne
integer(psb_ipk_), allocatable :: ivg(:), ipv(:)
integer(psb_ipk_), allocatable :: ivg(:), ipv(:),perm(:)
call psb_init(ictxt)
call psb_info(ictxt,iam,np)
@ -171,7 +173,7 @@ program df_sample
m_problem = aux_a%get_nrows()
call psb_bcast(ictxt,m_problem)
! At this point aux_b may still be unallocated
if (psb_size(aux_b,dim=ione) == m_problem) then
! if any rhs were present, broadcast the first one
@ -191,7 +193,6 @@ program df_sample
b_col_glob(i) = 1.d0
enddo
endif
call psb_bcast(ictxt,b_col_glob(1:m_problem))
else
call psb_bcast(ictxt,m_problem)
call psb_realloc(m_problem,1,aux_b,ircode)
@ -200,9 +201,35 @@ program df_sample
goto 9999
endif
b_col_glob =>aux_b(:,1)
call psb_bcast(ictxt,b_col_glob(1:m_problem))
end if
!
! Renumbering?
!
if (iam==psb_root_) then
renum='NONE'
call psb_cmp_bwpf(aux_a,lbw,ubw,prf,info)
write(*,*) 'Bandwidth and profile (original): ',lbw,ubw,prf
write(*,*) 'Renumbering algorithm : ',psb_toupper(renum)
if (trim(psb_toupper(renum))/='NONE') then
call psb_mat_renum(renum,aux_a,info,perm=perm)
if (info /= 0) then
write(0,*) 'Error from RENUM',info
goto 9999
end if
call psb_gelp('N',perm(1:m_problem),&
& b_col_glob(1:m_problem),info)
call psb_cmp_bwpf(aux_a,lbw,ubw,prf,info)
end if
write(*,*) 'Bandwidth and profile (renumbrd):',lbw,ubw,prf
end if
call psb_bcast(ictxt,b_col_glob(1:m_problem))
call aux_a%clean_zeros(info)
! switch over different partition types
if (ipart == 0) then
call psb_barrier(ictxt)
@ -267,6 +294,7 @@ program df_sample
call mld_precset(prec,mld_aggr_alg_, prec_choice%aggr_alg,info)
call mld_precset(prec,mld_ml_type_, prec_choice%mltype, info)
call mld_precset(prec,mld_smoother_pos_, prec_choice%smthpos, info)
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_coarse_subsolve_, prec_choice%csbsolve,info)
@ -304,6 +332,11 @@ program df_sample
write(psb_out_unit,'(" ")')
end if
write(fprefix,'(a,i3.3,a,i3.3)') 'proc-',iam,'-',np
call prec%dump(info,head='Pressure test case',ac=.true.)
iparm = 0
call psb_barrier(ictxt)
t1 = psb_wtime()
@ -434,6 +467,7 @@ contains
call read_data(prec%cthres,psb_inp_unit) ! Threshold for fact. ILU(T)
call read_data(prec%cjswp,psb_inp_unit) ! Jacobi sweeps
call read_data(prec%athres,psb_inp_unit) ! smoother aggr thresh
call read_data(prec%ascale,psb_inp_unit) ! smoother aggr thresh
end if
end if
@ -471,6 +505,7 @@ contains
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. ILU(T)
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
call psb_bcast(icontxt,prec%ascale) ! smoother aggr scale factor
end if
end subroutine get_parms

@ -1,15 +1,15 @@
thm1000x600.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
NONE ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
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
CSR ! Storage format: CSR COO JAD
2 ! IPART (partition method): 0 (block) 2 (graph, with Metis)
2 ! ISTOPC
00500 ! ITMAX
01000 ! ITMAX
02 ! ITRACE
30 ! IRST (restart for RGMRES and BiCGSTABL)
1.d-5 ! EPS
3L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars)
1.d-9 ! EPS
4L-M-RAS-I-UR ! Longer descriptive name for preconditioner (up to 20 chars)
ML ! Preconditioner type: NONE JACOBI BJAC AS ML
1 ! Number of overlap layers for AS preconditioner
HALO ! AS restriction operator: NONE HALO
@ -18,7 +18,7 @@ ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU
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
3 ! Number of levels in a multilevel preconditioner
4 ! Number of levels in a multilevel preconditioner
AS ! Smoother type JACOBI BJAC AS ignored for non-ML
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED
DEC ! Type of aggregation: DEC
@ -27,7 +27,8 @@ TWOSIDE ! Side of correction PRE POST TWOSIDE (ignored for A
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)
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
1 ! 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/PJAC coarsest-level solver
0.01d0 ! Smoothed aggregation threshold: >= 0.0
2 ! Number of Jacobi sweeps for BJAC/PJAC coarsest-level solver
0.0125d0 ! Smoothed aggregation threshold: >= 0.0
0.5 ! Smoothed aggregation scaling factor.

Loading…
Cancel
Save