krylov/psb_ccgr.f90
 krylov/psb_dcgr.f90
 krylov/psb_scgr.f90
 krylov/psb_zcgr.f90

Cosmetic changes
psblas3-pattern
Salvatore Filippone 9 years ago
parent 5edd786cc6
commit c83985fe16

@ -124,12 +124,12 @@ subroutine psb_ccgr_vect(a,prec,b,x,eps,desc_a,info,&
integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop
integer(psb_ipk_), Optional, Intent(out) :: iter integer(psb_ipk_), Optional, Intent(out) :: iter
real(psb_spk_), Optional, Intent(out) :: err real(psb_spk_), Optional, Intent(out) :: err
! = local data ! = local data
complex(psb_spk_), allocatable :: alpha(:), h(:,:) complex(psb_spk_), allocatable :: alpha(:), h(:,:)
type(psb_c_vect_type), allocatable :: z(:), c(:), c_scale(:) type(psb_c_vect_type), allocatable :: z(:), c(:), c_scale(:)
type(psb_c_vect_type) :: r type(psb_c_vect_type) :: r
real(psb_dpk_) :: r_norm, b_norm, a_norm, x_norm, derr real(psb_dpk_) :: r_norm, b_norm, a_norm, derr
integer(psb_ipk_) :: n_col, mglob, naux, err_act integer(psb_ipk_) :: n_col, mglob, naux, err_act
integer(psb_ipk_) :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: np, me, ictxt integer(psb_ipk_) :: np, me, ictxt
@ -169,10 +169,10 @@ subroutine psb_ccgr_vect(a,prec,b,x,eps,desc_a,info,&
istop_ = 2 istop_ = 2
endif endif
! !
! ISTOP_ = 1: Normwise backward error, infinity norm ! ISTOP_ = 1: Normwise backward error, infinity norm
! ISTOP_ = 2: ||r||/||b||, 2-norm ! ISTOP_ = 2: ||r||/||b||, 2-norm
! !
if ((istop_ < 1 ).or.(istop_ > 2 ) ) then if ((istop_ < 1 ).or.(istop_ > 2 ) ) then
info=psb_err_invalid_istop_ info=psb_err_invalid_istop_
@ -237,10 +237,6 @@ subroutine psb_ccgr_vect(a,prec,b,x,eps,desc_a,info,&
call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v)
x_norm = psb_normi(x, desc_a, info)
do i =1,nl+1 do i =1,nl+1
call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v)
call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v)
@ -249,12 +245,6 @@ subroutine psb_ccgr_vect(a,prec,b,x,eps,desc_a,info,&
itx = 0 itx = 0
if (istop_ == 2) then
b_norm = psb_norm2(b, desc_a, info)
else if (istop_ == 1) then
a_norm = psb_spnrmi(a,desc_a,info)
b_norm = psb_normi(b, desc_a, info)
endif
nrst = -1 nrst = -1
call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info) call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info)
restart: do restart: do

@ -124,12 +124,12 @@ subroutine psb_dcgr_vect(a,prec,b,x,eps,desc_a,info,&
integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop
integer(psb_ipk_), Optional, Intent(out) :: iter integer(psb_ipk_), Optional, Intent(out) :: iter
real(psb_dpk_), Optional, Intent(out) :: err real(psb_dpk_), Optional, Intent(out) :: err
! = local data ! = local data
real(psb_dpk_), allocatable :: alpha(:), h(:,:) real(psb_dpk_), allocatable :: alpha(:), h(:,:)
type(psb_d_vect_type), allocatable :: z(:), c(:), c_scale(:) type(psb_d_vect_type), allocatable :: z(:), c(:), c_scale(:)
type(psb_d_vect_type) :: r type(psb_d_vect_type) :: r
real(psb_dpk_) :: r_norm, b_norm, a_norm, x_norm, derr real(psb_dpk_) :: r_norm, b_norm, a_norm, derr
integer(psb_ipk_) :: n_col, mglob, naux, err_act integer(psb_ipk_) :: n_col, mglob, naux, err_act
integer(psb_ipk_) :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: np, me, ictxt integer(psb_ipk_) :: np, me, ictxt
@ -169,10 +169,10 @@ subroutine psb_dcgr_vect(a,prec,b,x,eps,desc_a,info,&
istop_ = 2 istop_ = 2
endif endif
! !
! ISTOP_ = 1: Normwise backward error, infinity norm ! ISTOP_ = 1: Normwise backward error, infinity norm
! ISTOP_ = 2: ||r||/||b||, 2-norm ! ISTOP_ = 2: ||r||/||b||, 2-norm
! !
if ((istop_ < 1 ).or.(istop_ > 2 ) ) then if ((istop_ < 1 ).or.(istop_ > 2 ) ) then
info=psb_err_invalid_istop_ info=psb_err_invalid_istop_
@ -237,10 +237,6 @@ subroutine psb_dcgr_vect(a,prec,b,x,eps,desc_a,info,&
call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v)
x_norm = psb_normi(x, desc_a, info)
do i =1,nl+1 do i =1,nl+1
call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v)
call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v)
@ -249,12 +245,6 @@ subroutine psb_dcgr_vect(a,prec,b,x,eps,desc_a,info,&
itx = 0 itx = 0
if (istop_ == 2) then
b_norm = psb_norm2(b, desc_a, info)
else if (istop_ == 1) then
a_norm = psb_spnrmi(a,desc_a,info)
b_norm = psb_normi(b, desc_a, info)
endif
nrst = -1 nrst = -1
call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info) call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info)
restart: do restart: do

@ -124,12 +124,12 @@ subroutine psb_scgr_vect(a,prec,b,x,eps,desc_a,info,&
integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop
integer(psb_ipk_), Optional, Intent(out) :: iter integer(psb_ipk_), Optional, Intent(out) :: iter
real(psb_spk_), Optional, Intent(out) :: err real(psb_spk_), Optional, Intent(out) :: err
! = local data ! = local data
real(psb_spk_), allocatable :: alpha(:), h(:,:) real(psb_spk_), allocatable :: alpha(:), h(:,:)
type(psb_s_vect_type), allocatable :: z(:), c(:), c_scale(:) type(psb_s_vect_type), allocatable :: z(:), c(:), c_scale(:)
type(psb_s_vect_type) :: r type(psb_s_vect_type) :: r
real(psb_dpk_) :: r_norm, b_norm, a_norm, x_norm, derr real(psb_dpk_) :: r_norm, b_norm, a_norm, derr
integer(psb_ipk_) :: n_col, mglob, naux, err_act integer(psb_ipk_) :: n_col, mglob, naux, err_act
integer(psb_ipk_) :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: np, me, ictxt integer(psb_ipk_) :: np, me, ictxt
@ -169,10 +169,10 @@ subroutine psb_scgr_vect(a,prec,b,x,eps,desc_a,info,&
istop_ = 2 istop_ = 2
endif endif
! !
! ISTOP_ = 1: Normwise backward error, infinity norm ! ISTOP_ = 1: Normwise backward error, infinity norm
! ISTOP_ = 2: ||r||/||b||, 2-norm ! ISTOP_ = 2: ||r||/||b||, 2-norm
! !
if ((istop_ < 1 ).or.(istop_ > 2 ) ) then if ((istop_ < 1 ).or.(istop_ > 2 ) ) then
info=psb_err_invalid_istop_ info=psb_err_invalid_istop_
@ -237,10 +237,6 @@ subroutine psb_scgr_vect(a,prec,b,x,eps,desc_a,info,&
call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v)
x_norm = psb_normi(x, desc_a, info)
do i =1,nl+1 do i =1,nl+1
call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v)
call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v)
@ -249,12 +245,6 @@ subroutine psb_scgr_vect(a,prec,b,x,eps,desc_a,info,&
itx = 0 itx = 0
if (istop_ == 2) then
b_norm = psb_norm2(b, desc_a, info)
else if (istop_ == 1) then
a_norm = psb_spnrmi(a,desc_a,info)
b_norm = psb_normi(b, desc_a, info)
endif
nrst = -1 nrst = -1
call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info) call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info)
restart: do restart: do

@ -124,12 +124,12 @@ subroutine psb_zcgr_vect(a,prec,b,x,eps,desc_a,info,&
integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop integer(psb_ipk_), Optional, Intent(in) :: itmax, itrace, irst, istop
integer(psb_ipk_), Optional, Intent(out) :: iter integer(psb_ipk_), Optional, Intent(out) :: iter
real(psb_dpk_), Optional, Intent(out) :: err real(psb_dpk_), Optional, Intent(out) :: err
! = local data ! = local data
complex(psb_dpk_), allocatable :: alpha(:), h(:,:) complex(psb_dpk_), allocatable :: alpha(:), h(:,:)
type(psb_z_vect_type), allocatable :: z(:), c(:), c_scale(:) type(psb_z_vect_type), allocatable :: z(:), c(:), c_scale(:)
type(psb_z_vect_type) :: r type(psb_z_vect_type) :: r
real(psb_dpk_) :: r_norm, b_norm, a_norm, x_norm, derr real(psb_dpk_) :: r_norm, b_norm, a_norm, derr
integer(psb_ipk_) :: n_col, mglob, naux, err_act integer(psb_ipk_) :: n_col, mglob, naux, err_act
integer(psb_ipk_) :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: np, me, ictxt integer(psb_ipk_) :: np, me, ictxt
@ -169,10 +169,10 @@ subroutine psb_zcgr_vect(a,prec,b,x,eps,desc_a,info,&
istop_ = 2 istop_ = 2
endif endif
! !
! ISTOP_ = 1: Normwise backward error, infinity norm ! ISTOP_ = 1: Normwise backward error, infinity norm
! ISTOP_ = 2: ||r||/||b||, 2-norm ! ISTOP_ = 2: ||r||/||b||, 2-norm
! !
if ((istop_ < 1 ).or.(istop_ > 2 ) ) then if ((istop_ < 1 ).or.(istop_ > 2 ) ) then
info=psb_err_invalid_istop_ info=psb_err_invalid_istop_
@ -237,10 +237,6 @@ subroutine psb_zcgr_vect(a,prec,b,x,eps,desc_a,info,&
call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(r, desc_a,info, scratch=.true.,mold=x%v)
x_norm = psb_normi(x, desc_a, info)
do i =1,nl+1 do i =1,nl+1
call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(c(i), desc_a,info, scratch=.true.,mold=x%v)
call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v) call psb_geasb(z(i), desc_a,info, scratch=.true.,mold=x%v)
@ -249,12 +245,6 @@ subroutine psb_zcgr_vect(a,prec,b,x,eps,desc_a,info,&
itx = 0 itx = 0
if (istop_ == 2) then
b_norm = psb_norm2(b, desc_a, info)
else if (istop_ == 1) then
a_norm = psb_spnrmi(a,desc_a,info)
b_norm = psb_normi(b, desc_a, info)
endif
nrst = -1 nrst = -1
call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info) call psb_init_conv(methdname,istop_,itrace_,itmax_,a,b,eps,desc_a,stopdat,info)
restart: do restart: do

Loading…
Cancel
Save