mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-19 04:12:11 +00:00
Merge with development
This commit is contained in:
@@ -3,9 +3,9 @@ include Make.inc
|
||||
|
||||
all: objs lib
|
||||
|
||||
objs: amgp cbnd
|
||||
objs: libdir amgp cbnd
|
||||
|
||||
lib: libdir objs
|
||||
lib: objs
|
||||
cd amgprec && $(MAKE) lib
|
||||
cd cbind && $(MAKE) lib
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_c_base_aggregator_mod
|
||||
use amg_c_dec_aggregator_mod
|
||||
use amg_c_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
#endif
|
||||
use amg_c_jac_smoother
|
||||
use amg_c_as_smoother
|
||||
use amg_c_diag_solver
|
||||
@@ -241,6 +243,8 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
if (info == 0) deallocate(lv%aggr,stat=info)
|
||||
if (info /= 0) then
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='aggregator deallocation?')
|
||||
goto 9999
|
||||
return
|
||||
end if
|
||||
end if
|
||||
@@ -250,8 +254,16 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_c_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_c_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
case default
|
||||
#if !defined(SERIAL_MPI)
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_d_base_aggregator_mod
|
||||
use amg_d_dec_aggregator_mod
|
||||
use amg_d_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#endif
|
||||
use amg_d_poly_smoother
|
||||
use amg_d_jac_smoother
|
||||
use amg_d_as_smoother
|
||||
@@ -267,6 +269,8 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
if (info == 0) deallocate(lv%aggr,stat=info)
|
||||
if (info /= 0) then
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='aggregator deallocation?')
|
||||
goto 9999
|
||||
return
|
||||
end if
|
||||
end if
|
||||
@@ -276,10 +280,18 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_d_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_d_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
#if !defined(SERIAL_MPI)
|
||||
case('COUP','COUPLED')
|
||||
allocate(amg_d_parmatch_aggregator_type :: lv%aggr, stat=info)
|
||||
case default
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_s_base_aggregator_mod
|
||||
use amg_s_dec_aggregator_mod
|
||||
use amg_s_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#endif
|
||||
use amg_s_poly_smoother
|
||||
use amg_s_jac_smoother
|
||||
use amg_s_as_smoother
|
||||
@@ -247,6 +249,8 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
if (info == 0) deallocate(lv%aggr,stat=info)
|
||||
if (info /= 0) then
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='aggregator deallocation?')
|
||||
goto 9999
|
||||
return
|
||||
end if
|
||||
end if
|
||||
@@ -256,10 +260,18 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_s_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_s_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
#if !defined(SERIAL_MPI)
|
||||
case('COUP','COUPLED')
|
||||
allocate(amg_s_parmatch_aggregator_type :: lv%aggr, stat=info)
|
||||
case default
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_z_base_aggregator_mod
|
||||
use amg_z_dec_aggregator_mod
|
||||
use amg_z_symdec_aggregator_mod
|
||||
#if !defined(SERIAL_MPI)
|
||||
#endif
|
||||
use amg_z_jac_smoother
|
||||
use amg_z_as_smoother
|
||||
use amg_z_diag_solver
|
||||
@@ -261,6 +263,8 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
if (info == 0) deallocate(lv%aggr,stat=info)
|
||||
if (info /= 0) then
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='aggregator deallocation?')
|
||||
goto 9999
|
||||
return
|
||||
end if
|
||||
end if
|
||||
@@ -270,8 +274,16 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_z_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_z_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
case default
|
||||
#if !defined(SERIAL_MPI)
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ program amg_d_pde2d
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=32) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
|
||||
! AMG aggregation
|
||||
character(len=32) :: aggr_prol ! aggregation type: SMOOTHED, NONSMOOTHED
|
||||
@@ -174,15 +174,15 @@ program amg_d_pde2d
|
||||
real(psb_dpk_) :: thr2 ! threshold for ILUT factorization
|
||||
|
||||
! coarsest-level solver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
|
||||
@@ -126,16 +126,16 @@ program amg_s_pde2d
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=32) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
|
||||
! AMG aggregation
|
||||
character(len=32) :: aggr_prol ! aggregation type: SMOOTHED, NONSMOOTHED
|
||||
character(len=32) :: par_aggr_alg ! parallel aggregation algorithm: DEC, SYMDEC
|
||||
character(len=32) :: aggr_type ! Type of aggregation SOC1, SOC2, MATCHBOXP
|
||||
integer(psb_ipk_) :: aggr_size ! Requested size of the aggregates for MATCHBOXP
|
||||
character(len=32) :: aggr_ord ! ordering for aggregation: NATURAL, DEGREE
|
||||
character(len=32) :: aggr_filter ! filtering: FILTER, NO_FILTER
|
||||
real(psb_spk_) :: mncrratio ! minimum aggregation ratio
|
||||
character(len=32) :: aggr_type ! Type of aggregation SOC1, SOC2, MATCHBOXP
|
||||
integer(psb_ipk_) :: aggr_size ! Requested size of the aggregates for MATCHBOXP
|
||||
character(len=32) :: aggr_ord ! ordering for aggregation: NATURAL, DEGREE
|
||||
character(len=32) :: aggr_filter ! filtering: FILTER, NO_FILTER
|
||||
real(psb_spk_) :: mncrratio ! minimum aggregation ratio
|
||||
real(psb_spk_), allocatable :: athresv(:) ! smoothed aggregation threshold vector
|
||||
integer(psb_ipk_) :: thrvsz ! size of threshold vector
|
||||
real(psb_spk_) :: athres ! smoothed aggregation threshold
|
||||
@@ -174,15 +174,15 @@ program amg_s_pde2d
|
||||
real(psb_spk_) :: thr2 ! threshold for ILUT factorization
|
||||
|
||||
! coarsest-level solver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_spk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_spk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
CSR ! Storage format CSR COO JAD
|
||||
0150 ! IDIM; domain size. Linear system size is IDIM**3
|
||||
CONST ! PDECOEFF: CONST, EXP, BOX, GAUSS Coefficients of the PDE
|
||||
0040 ! IDIM; domain size. Linear system size is IDIM**3
|
||||
CONST ! PDECOEFF: CONST, EXP, GAUSS Coefficients of the PDE
|
||||
CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
00008 ! ITMAX
|
||||
1 ! ITRACE
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
|
||||
Reference in New Issue
Block a user