Hello,
I have a fortran code where I want to diagonalize a complex Hermitian
matrix. I'm using Lapack subroutine "ZHPEV" for diagonalization.
Following link provides the usage of "ZHPEV":
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/sp34/essl/essl192.html
I'm getting syntax error message for using "ap" parameter where the
"." is used in the place of complex character (in line 25 of the code
below).
-------------------------begin---------------------------
c finding the eigenvalues of a complex matrix using LAPACK
Implicit none
c declarations, notice double precision
complex*16 A(3,3), w(3), ap(6), aux(9,9)
integer i, j, n, iopt, naux
open(2,file='test1004.out')
c define matrix A
A(1,1)=(3.1, -1.8)
A(1,2)=(1.3, 0.2)
A(1,3)=(-5.7, -4.3)
A(2,1)=(1.3, 0)
A(2,2)=(-6.9, 3.2)
A(2,3)=(5.8, 2.2)
A(3,1)=(5.7, -4.0)
A(3,2)=(5.8, 2.9)
A(3,3)=(-8.8, 3.2)
do 10 i=1,3
write(2,11)(A(i,j),j=1,3)
10 continue
11 format(f6.2)
c
c find the solution using the LAPACK routine ZGEEV
call ZGPEV(iopt,ap,w,n,aux,naux)
iopt=20
ap(6)=((3.1, .), (1.3, 0.2), (-6.9, .), (-5.7,-4.3),
& (5.8, 2.2), (-8.8, .))
n=3
naux=9
c output of eigenvalues
c if (ok .eq. 0) then
c do i=1, 3
c write(*,*) w(i)
c enddo
c else
c write (*,*) "An error occured"
c endif
stop
end
-------------------------end---------------------------
I'd appreciate if anyone can help me in fixing this problem. |