使用dgeev函数求特征值特征向量,在独立程序中可以正常求解
program test
use lapack95
implicit none
integer info, lda, ldvl, ldvr, lwork, rwork,n
REAL*8 vl(3,3), vr(3,3),wr(3),wi(3),arr(3,3),work(20)
arr(1,:) = [1.0, 1.0 ,0.0]
arr(2,:) = [ 0.0 ,1.0 ,0.0]
arr(3,:) = [0.0,0.0,1.0]
n=3
lda=3
ldvl=3
ldvr=3
lwork=12
rwork=12
call dgeev('N','V',n,arr,lda,wr,wi,vl,ldvl,vr,ldvr,work,lwork,info)
print*, 'eigenvalue',wr
print*, '----------------------------------------------------'
print*, 'eigenvector',vr
print*, '----------------------------------------------------'
pause
end program test
但是在另一个程序中加入这部分就出错
不知道是什么原因
|