8 public :: hecmw_estimate_cond_num_cg
9 public :: hecmw_estimate_cond_num_gmres
16 integer(kind=kint),
intent(in) :: ITER
17 real(kind=
kreal),
intent(in) :: d(:), e(:)
19 #ifdef HECMW_WITH_LAPACK
20 character(len=1) :: JOBZ, range
22 real(kind=
kreal) :: vl, vu, abstol, z(1,1)
23 integer(kind=kint) :: N, IL, IU, M, LDZ=1, isuppz(1)
24 integer(kind=kint) :: LWORK, LIWORK, INFO
25 real(kind=
kreal),
allocatable :: w(:), work(:)
26 integer(kind=kint),
allocatable :: IWORK(:)
27 real(kind=
kreal),
allocatable :: d1(:), e1(:)
28 integer(kind=kint) :: i
33 allocate(d1(iter),e1(iter))
53 allocate(work(1),iwork(1))
54 call dstegr(jobz,range,n,d1,e1,vl,vu,il,iu,abstol, &
55 m,w,z,ldz,isuppz,work,lwork,iwork,liwork,info)
57 write(*,*)
'ERROR: dstegr returned with INFO=',info
63 deallocate(work,iwork)
64 allocate(work(lwork),iwork(liwork))
65 call dstegr(jobz,range,n,d1,e1,vl,vu,il,iu,abstol, &
66 m,w,z,ldz,isuppz,work,lwork,iwork,liwork,info)
68 write(*,*)
'ERROR: dstegr returned with INFO=',info
71 write(*,
'("emin=",1pe13.6,", emax=",1pe13.6,", emax/emin=",1pe13.6)') &
73 deallocate(work,iwork)
104 integer(kind=kint),
intent(in) :: I
105 real(kind=
kreal),
intent(in) :: h(:,:)
107 #ifdef HECMW_WITH_LAPACK
109 character(len=1) :: JOBZ
110 integer(kind=kint) :: N, LDH, LDZ=1, lwork, info
111 real(kind=
kreal),
allocatable :: wr(:), work(:), h1(:,:)
112 integer(kind=kint),
allocatable :: IWORK(:)
113 real(kind=
kreal) :: z(1,1)
114 integer(kind=kint) :: j, k
170 call dgesdd(jobz,n,n,h1,ldh,wr,z,ldz,z,ldz,work,lwork,iwork,info)
172 write(*,*)
'ERROR: dgesdd returned with INFO=',info
178 allocate(work(lwork))
179 call dgesdd(jobz,n,n,h1,ldh,wr,z,ldz,z,ldz,work,lwork,iwork,info)
181 write(*,*)
'ERROR: dgesdd returned with INFO=',info
188 write(*,
'("emin=",1pe13.6,", emax=",1pe13.6,", emax/emin=",1pe13.6)') &
189 wr(n), wr(1), wr(1)/wr(n)
subroutine hecmw_estimate_condition_gmres(I, H)
subroutine hecmw_estimate_condition_cg(ITER, D, E)
integer(kind=4), parameter kreal