krylov/psb_crgmres.f90
 krylov/psb_drgmres.f90
 krylov/psb_srgmres.f90
 krylov/psb_zrgmres.f90


Silly bug in usage of Xrot.
psblas3-final
Salvatore Filippone 13 years ago
parent 7470f70021
commit 9b61a45b93

@ -506,7 +506,7 @@ subroutine psb_crgmres_vect(a,prec,b,x,eps,desc_a,info,&
character(len=*), parameter :: methdname='RGMRES' character(len=*), parameter :: methdname='RGMRES'
info = psb_success_ info = psb_success_
name = 'psb_sgmres' name = 'psb_cgmres'
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
debug_unit = psb_get_debug_unit() debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level() debug_level = psb_get_debug_level()
@ -717,7 +717,7 @@ subroutine psb_crgmres_vect(a,prec,b,x,eps,desc_a,info,&
scal=cone/h(i+1,i) scal=cone/h(i+1,i)
call psb_geaxpby(scal,w,czero,v(i+1),desc_a,info) call psb_geaxpby(scal,w,czero,v(i+1),desc_a,info)
do k=2,i do k=2,i
call crot(1,h(k-1,i),1,h(k,i),1,real(c(k-1)),s(k-1)) call crot(1,h(k-1,i),1,h(k,i),1,real(c(k-1),kind=psb_spk_),s(k-1))
enddo enddo
@ -725,9 +725,9 @@ subroutine psb_crgmres_vect(a,prec,b,x,eps,desc_a,info,&
rti1 = h(i+1,i) rti1 = h(i+1,i)
call crotg(rti,rti1,tmp,s(i)) call crotg(rti,rti1,tmp,s(i))
c(i) = cmplx(tmp,szero) c(i) = cmplx(tmp,szero)
call crot(1,h(i,i),1,h(i+1,i),1,real(c(i)),s(i)) call crot(1,h(i,i),1,h(i+1,i),1,real(c(i),kind=psb_spk_),s(i))
h(i+1,i) = czero h(i+1,i) = czero
call crot(1,rs(i),1,rs(i+1),1,real(c(i)),s(i)) call crot(1,rs(i),1,rs(i+1),1,real(c(i),kind=psb_spk_),s(i))
if (istop_ == 1) then if (istop_ == 1) then
! !

@ -506,7 +506,7 @@ subroutine psb_drgmres_vect(a,prec,b,x,eps,desc_a,info,&
character(len=*), parameter :: methdname='RGMRES' character(len=*), parameter :: methdname='RGMRES'
info = psb_success_ info = psb_success_
name = 'psb_sgmres' name = 'psb_dgmres'
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
debug_unit = psb_get_debug_unit() debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level() debug_level = psb_get_debug_level()
@ -717,17 +717,17 @@ subroutine psb_drgmres_vect(a,prec,b,x,eps,desc_a,info,&
scal=done/h(i+1,i) scal=done/h(i+1,i)
call psb_geaxpby(scal,w,dzero,v(i+1),desc_a,info) call psb_geaxpby(scal,w,dzero,v(i+1),desc_a,info)
do k=2,i do k=2,i
call drot(1,h(k-1,i),1,h(k,i),1,real(c(k-1)),s(k-1)) call drot(1,h(k-1,i),1,h(k,i),1,real(c(k-1),kind=psb_dpk_),s(k-1))
enddo enddo
rti = h(i,i) rti = h(i,i)
rti1 = h(i+1,i) rti1 = h(i+1,i)
call drotg(rti,rti1,tmp,s(i)) call drotg(rti,rti1,tmp,s(i))
c(i) = cmplx(tmp,szero) c(i) = cmplx(tmp,dzero)
call drot(1,h(i,i),1,h(i+1,i),1,real(c(i)),s(i)) call drot(1,h(i,i),1,h(i+1,i),1,real(c(i),kind=psb_dpk_),s(i))
h(i+1,i) = dzero h(i+1,i) = dzero
call drot(1,rs(i),1,rs(i+1),1,real(c(i)),s(i)) call drot(1,rs(i),1,rs(i+1),1,real(c(i),kind=psb_dpk_),s(i))
if (istop_ == 1) then if (istop_ == 1) then
! !

@ -717,7 +717,7 @@ subroutine psb_srgmres_vect(a,prec,b,x,eps,desc_a,info,&
scal=sone/h(i+1,i) scal=sone/h(i+1,i)
call psb_geaxpby(scal,w,szero,v(i+1),desc_a,info) call psb_geaxpby(scal,w,szero,v(i+1),desc_a,info)
do k=2,i do k=2,i
call srot(1,h(k-1,i),1,h(k,i),1,real(c(k-1)),s(k-1)) call srot(1,h(k-1,i),1,h(k,i),1,real(c(k-1),kind=psb_spk_),s(k-1))
enddo enddo
@ -725,9 +725,9 @@ subroutine psb_srgmres_vect(a,prec,b,x,eps,desc_a,info,&
rti1 = h(i+1,i) rti1 = h(i+1,i)
call srotg(rti,rti1,tmp,s(i)) call srotg(rti,rti1,tmp,s(i))
c(i) = cmplx(tmp,szero) c(i) = cmplx(tmp,szero)
call srot(1,h(i,i),1,h(i+1,i),1,real(c(i)),s(i)) call srot(1,h(i,i),1,h(i+1,i),1,real(c(i),kind=psb_spk_),s(i))
h(i+1,i) = szero h(i+1,i) = szero
call srot(1,rs(i),1,rs(i+1),1,real(c(i)),s(i)) call srot(1,rs(i),1,rs(i+1),1,real(c(i),kind=psb_spk_),s(i))
if (istop_ == 1) then if (istop_ == 1) then
! !

@ -506,7 +506,7 @@ subroutine psb_zrgmres_vect(a,prec,b,x,eps,desc_a,info,&
character(len=*), parameter :: methdname='RGMRES' character(len=*), parameter :: methdname='RGMRES'
info = psb_success_ info = psb_success_
name = 'psb_sgmres' name = 'psb_zgmres'
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
debug_unit = psb_get_debug_unit() debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level() debug_level = psb_get_debug_level()
@ -717,17 +717,17 @@ subroutine psb_zrgmres_vect(a,prec,b,x,eps,desc_a,info,&
scal=zone/h(i+1,i) scal=zone/h(i+1,i)
call psb_geaxpby(scal,w,zzero,v(i+1),desc_a,info) call psb_geaxpby(scal,w,zzero,v(i+1),desc_a,info)
do k=2,i do k=2,i
call zrot(1,h(k-1,i),1,h(k,i),1,real(c(k-1)),s(k-1)) call zrot(1,h(k-1,i),1,h(k,i),1,real(c(k-1),kind=psb_dpk_),s(k-1))
enddo enddo
rti = h(i,i) rti = h(i,i)
rti1 = h(i+1,i) rti1 = h(i+1,i)
call zrotg(rti,rti1,tmp,s(i)) call zrotg(rti,rti1,tmp,s(i))
c(i) = cmplx(tmp,szero) c(i) = cmplx(tmp,dzero)
call zrot(1,h(i,i),1,h(i+1,i),1,real(c(i)),s(i)) call zrot(1,h(i,i),1,h(i+1,i),1,real(c(i),kind=psb_dpk_),s(i))
h(i+1,i) = zzero h(i+1,i) = zzero
call zrot(1,rs(i),1,rs(i+1),1,real(c(i)),s(i)) call zrot(1,rs(i),1,rs(i+1),1,real(c(i),kind=psb_dpk_),s(i))
if (istop_ == 1) then if (istop_ == 1) then
! !

Loading…
Cancel
Save