From 45c74ea2d89b54429017a42785b433243f4298ba Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 23 Apr 2007 08:18:41 +0000 Subject: [PATCH] Put in right-preconditioned GMRES. --- Makefile | 2 +- krylov/psb_dgmresr.f90 | 2 -- test/pargen/ppde90.f90 | 18 +++++++++--------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index a2e9438c..6390ae09 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ include Make.inc -#PREC=../mld2p4-dev +#PREC=../mld2p4 PREC=prec diff --git a/krylov/psb_dgmresr.f90 b/krylov/psb_dgmresr.f90 index 5e644dbf..eebfaf3b 100644 --- a/krylov/psb_dgmresr.f90 +++ b/krylov/psb_dgmresr.f90 @@ -289,7 +289,6 @@ Subroutine psb_dgmresr(a,prec,b,x,eps,desc_a,info,& call psb_precaply(prec,v(:,i),w1,desc_a,info) Call psb_spmm(done,a,w1,dzero,w,desc_a,info,work=aux) ! - !********** ADD ERROR HANDLING ************** do k = 1, i h(k,i) = psb_gedot(v(:,k),w,desc_a,info) @@ -332,7 +331,6 @@ Subroutine psb_dgmresr(a,prec,b,x,eps,desc_a,info,& xni = psb_geamax(xt,desc_a,info) rerr = rni/(ani*xni+bni) ! - !********** ADD PSBLAS ERROR HANDLING ************** else if (istop_ == 2) then ! diff --git a/test/pargen/ppde90.f90 b/test/pargen/ppde90.f90 index 316dc015..1f61fe25 100644 --- a/test/pargen/ppde90.f90 +++ b/test/pargen/ppde90.f90 @@ -99,7 +99,7 @@ program pde90 ! solver parameters integer :: iter, itmax,ierr,itrace, methd,iprec, istopc,& - & iparm(20), ml, novr + & iparm(20), irst, novr real(kind(1.d0)) :: err, eps, rparm(20) ! other variables @@ -127,7 +127,7 @@ program pde90 ! ! get parameters ! - call get_parms(ictxt,cmethd,iprec,novr,afmt,idim,istopc,itmax,itrace,ml) + call get_parms(ictxt,cmethd,iprec,novr,afmt,idim,istopc,itmax,itrace,irst) ! ! allocate and fill in the coefficient matrix, rhs and initial guess @@ -188,7 +188,7 @@ program pde90 t1 = psb_wtime() eps = 1.d-9 call psb_krylov(cmethd,a,pre,b,x,eps,desc_a,info,& - & itmax=itmax,iter=iter,err=err,itrace=itrace,istop=istopc,irst=ml) + & itmax=itmax,iter=iter,err=err,itrace=itrace,istop=istopc,irst=irst) if(info.ne.0) then info=4010 @@ -236,10 +236,10 @@ contains ! ! get iteration parameters from the command line ! - subroutine get_parms(ictxt,cmethd,iprec,novr,afmt,idim,istopc,itmax,itrace,ml) + subroutine get_parms(ictxt,cmethd,iprec,novr,afmt,idim,istopc,itmax,itrace,irst) integer :: ictxt character :: cmethd*10, afmt*5 - integer :: idim, iret, istopc,itmax,itrace,ml, iprec, novr + integer :: idim, iret, istopc,itmax,itrace,irst, iprec, novr character*40 :: charbuf integer :: iargc, np, iam external iargc @@ -279,9 +279,9 @@ contains itrace=-1 endif if (ip.ge.7) then - read(*,*) ml + read(*,*) irst else - ml=1 + irst=1 endif ! broadcast parameters to all processors @@ -289,7 +289,7 @@ contains intbuf(2) = istopc intbuf(3) = itmax intbuf(4) = itrace - intbuf(5) = ml + intbuf(5) = irst call psb_bcast(ictxt,intbuf(1:5)) write(*,'("Solving matrix : ell1")') @@ -316,7 +316,7 @@ contains istopc = intbuf(2) itmax = intbuf(3) itrace = intbuf(4) - ml = intbuf(5) + irst = intbuf(5) end if return