I have some question about zgeev subroutine in LAPCK to trouble you.
I am writing FORTRAN 90 code. zgeev subroutine written in F77 is not compatible with my FORTRAN 90 code (zgeev subroutine written in F77 does not return the correct eigenvectors and eigenvalues. Even worse when zgeev subroutine is called the second times, I encountered error: servere(161): Program Exception – array bounds exceeded at line 167 in ZGEBAK.f). I found that if the arguments of zgeev were not allocatable matrices, I did not encounter the error. So I assume this is due to the zgeev subroutine written in F77 is not compatible with my FORTRAN 90 code.
Is the LAPACK written in FORTRAN 90 available? I found the source codes of LAPACK in FORTRAN 95. But when I tried to compile the source codes to generate library, I had more than 700 errors.
What should I do? Thank you very much for your help.
The following is my FORTRAN 90 code that has problem with ZGEEV in FORTRAN 77. When all matrices are not allocatable matices, I do not have the error. But I need to use allocatable matrices. Thanks again.
program test_eig
implicit none
INTEGER, PARAMETER :: DPC = KIND((1.0D0,1.0D0))
INTEGER, PARAMETER :: DP = KIND(1.0D0)
complex(DPC), dimension(:,:), allocatable :: VL,VR, A
complex(DPC), dimension(:), allocatable :: W, WORK
real(DP), dimension(:), allocatable :: RWORK
integer :: INFO, N
N=6
allocate(VL(1,1))
allocate(VR(N,N), A(N,N))
allocate(W(N), WORK(N))
allocate(RWORK(N*2))
VL=0
VR=0
W=0
WORK=0
RWORK=0
A=0
A(1,1)=(0.948275170054075,1.13160317511797)
A(2,1)=(-0.849373459407665,-1.90244480766304)
A(3,1)=(6.97177713356470,-5.50215064828530)
A(1,2)=(-16.8336381894322,29.0327833705286)
A(2,2)=(-0.481557522697477,8.350384821317058E-002)
A(3,2)=(-8.62609828223245,-32.4324577138091)
A(1,3)=(5.50215064828525,6.97177713356471)
A(2,3)=(-0.744633891424639,1.94582935723871)
A(3,3)=(0.948275170054117,1.13160317511794)
A(4,4)=(-6.69287772055732,7.050000131130217E-002)
A(5,4)=(-0.720175500523152,-1.61830643033964)
A(6,4)=0
A(4,5)=(-0.635074470866619,1.65355643099529)
A(5,5)=(-0.409499942779541,7.050000131130217E-002)
A(6,5)=(-0.720175500523152,-1.61830643033964)
A(5,6)=(-0.635074470866619,1.65355643099529)
A(6,6)=(-6.69287772055732,7.050000131130217E-002)
A(4,6)=0
call ZGEEV('N','V',N,A,N,W,VL,1,VR, N, WORK, N*2, RWORK, INFO)
A=0
A(1,1)=(-9.40337766333686,0.141000002622604)
A(2,2)=(-3.11999988555908,0.141000002622604)
A(3,3)=(-9.40337766333686,0.141000002622604)
A(4,4)=(-9.40337766333686,0.141000002622604)
A(5,5)=(-3.11999988555908,0.141000002622604)
A(6,6)=(-9.40337766333686,0.141000002622604)
call ZGEEV('N','V',N,A,N,W,VL,1,VR, N, WORK, N*2, RWORK, INFO)
end program test_eig

