From 07c209137bea8f67d54dd1d42ef27e4b98a4a789 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 16 Oct 2009 09:27:06 +0000 Subject: [PATCH] mld2p4-2: mlprec/mld_daggrmat_nosmth_asb.F90 tests/pdegen/ppde.f90 tests/pdegen/runs/ppde.inp Fixed bug: control flow in nonsmoothed aggregation assembly. --- mlprec/mld_daggrmat_nosmth_asb.F90 | 13 ++++++++----- tests/pdegen/ppde.f90 | 7 ++++--- tests/pdegen/runs/ppde.inp | 16 ++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/mlprec/mld_daggrmat_nosmth_asb.F90 b/mlprec/mld_daggrmat_nosmth_asb.F90 index d5ca0229..144211e5 100644 --- a/mlprec/mld_daggrmat_nosmth_asb.F90 +++ b/mlprec/mld_daggrmat_nosmth_asb.F90 @@ -160,7 +160,10 @@ subroutine mld_daggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,p,info) acoo1%ja(i) = ilaggr(i) end do + call acoo1%set_dupl(psb_dupl_add_) call acoo1%set_nzeros(nrow) + call acoo1%set_asb() + call acoo1%fix(info) call acoo2%transp(acoo1) call a%csclip(bcoo,info,jmax=nrow) @@ -222,12 +225,12 @@ subroutine mld_daggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,p,info) call psb_errpush(4001,name,a_err='Build ac, desc_ac') goto 9999 - - else - info = 4001 - call psb_errpush(4001,name,a_err='invalid mld_coarse_mat_') - goto 9999 end if + + else + info = 4001 + call psb_errpush(4001,name,a_err='invalid mld_coarse_mat_') + goto 9999 end if call bcoo%free() diff --git a/tests/pdegen/ppde.f90 b/tests/pdegen/ppde.f90 index 0db1953a..235b3065 100644 --- a/tests/pdegen/ppde.f90 +++ b/tests/pdegen/ppde.f90 @@ -145,7 +145,7 @@ program ppde ! ! get parameters ! - call get_parms(ictxt,kmethd,prectype,afmt,idim,istopc,itmax,itrace,irst) + call get_parms(ictxt,kmethd,prectype,afmt,idim,istopc,itmax,itrace,irst,eps) ! ! allocate and fill in the coefficient matrix, rhs and initial guess @@ -219,7 +219,6 @@ program ppde if(iam == psb_root_) write(*,'("Calling iterative method ",a)')kmethd call psb_barrier(ictxt) t1 = psb_wtime() - eps = 1.d-9 call psb_krylov(kmethd,a,prec,b,x,eps,desc_a,info,& & itmax=itmax,iter=iter,err=err,itrace=itrace,istop=istopc,irst=irst) @@ -278,12 +277,13 @@ contains ! ! get iteration parameters from standard input ! - subroutine get_parms(ictxt,kmethd,prectype,afmt,idim,istopc,itmax,itrace,irst) + subroutine get_parms(ictxt,kmethd,prectype,afmt,idim,istopc,itmax,itrace,irst,eps) integer :: ictxt type(precdata) :: prectype character(len=*) :: kmethd, afmt integer :: idim, istopc,itmax,itrace,irst integer :: np, iam, info + real(psb_dpk_) :: eps character(len=20) :: buffer call psb_info(ictxt, iam, np) @@ -329,6 +329,7 @@ contains call psb_bcast(ictxt,itmax) call psb_bcast(ictxt,itrace) call psb_bcast(ictxt,irst) + call psb_bcast(ictxt,eps) call psb_bcast(ictxt,prectype%descr) ! verbose description of the prec diff --git a/tests/pdegen/runs/ppde.inp b/tests/pdegen/runs/ppde.inp index 1f1e8c98..d3e6f2ad 100644 --- a/tests/pdegen/runs/ppde.inp +++ b/tests/pdegen/runs/ppde.inp @@ -5,8 +5,8 @@ CSR ! Storage format CSR COO JAD 00100 ! ITMAX 01 ! ITRACE 30 ! IRST (restart for RGMRES and BiCGSTABL) -1.d-6 ! EPS -2L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars) +1.d-7 ! EPS +3L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars) ML ! Preconditioner NONE DIAG BJAC AS ML 1 ! Number of overlap layers for AS preconditioner at finest level HALO ! Restriction operator NONE HALO @@ -14,15 +14,15 @@ NONE ! Prolongation operator NONE SUM AVG ILU ! Subdomain solver ILU MILU ILUT UMF SLU 1 ! Level-set N for ILU(N) 1.d-4 ! Threshold T for ILU(T,P) -2 ! Number of levels in a multilevel preconditioner -SMOOTHED ! Kind of aggregation: SMOOTHED, NONSMOOTHED, MINENERGY +3 ! Number of levels in a multilevel preconditioner +NONSMOOTHED ! Kind of aggregation: SMOOTHED, NONSMOOTHED, MINENERGY DEC ! Type of aggregation DEC SYMDEC GLB MULT ! Type of multilevel correction: ADD MULT -POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD) -DIST ! Coarse level: matrix distribution DIST REPL +TWOSIDE ! Side of mult. correction PRE POST TWOSIDE (ignored for ADD) +REPL ! Coarse level: matrix distribution DIST REPL BJAC ! Coarse level: solver BJAC UMF SLU SLUDIST -ILU ! Coarse level: subsolver ILU UMF SLU SLUDIST -0 ! Coarse level: Level-set N for ILU(N) +ILUT ! Coarse level: subsolver ILU UMF SLU SLUDIST +1 ! Coarse level: Level-set N for ILU(N) 1.d-4 ! Coarse level: Threshold T for ILU(T,P) 4 ! Coarse level: Number of Jacobi sweeps 0.10d0 ! Smoother Aggregation Threshold: >= 0.0