LAPACK (Linear Algebra PACKage) Oak Ridge 国家、加大学Davis Illinois 大学等合开发的线,用于在同高性能计算环境上高效求解值线数问[7]

LAPACK 标准Fortran 77 编写LAPACK 支持实型复型数据类型,完全支持计算。LAPACK 可以在量机高性能超量工作站,和共存储多处理机上高效运行,也可以在各种类型机(PC, 工作站, 机)上获得满意的结LAPACK 新版本为lapack-3.0。

  

 测试文件:Single Precision Example (sgeev):

 program test_sgeev
c Purpose: Compute the eigenvalues and, optionally, the left and/or
c right eigenvectors for an n-by-n real nonsymmetric matrix.
c Usage: call sgeev(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr,
c work, lwork, info)

integer nout, n, lda, lwork, ldvr, ldvl
parameter (nout=6, n=3, lda=n, lwork=5*n, ldvl=n, ldvr=n)
integer i, j, info
real a(lda,n), vr(ldvr,n), vl(ldvl,n)
real work(lwork), wi(n), wr(n)
external sgeev
c
data a / 3, 7, -4, 2, 8, -4, -1, -1, 3 /
c
call sgeev('N', 'V', n, a, lda, wr, wi, vl, ldvl, vr, ldvr,
& work, lwork, info)
c
write (*,*)
print*,' *** the real part of the computed eigenvalues ***'
write(nout, 98) (wr(i), i=1,n)
c
write (*,*)
print*,' *** the imaginary part of the computed eigenvalues ***'
write(nout, 98) (wi(i), i=1,n)
c
write (*,*)
print*,' *** the right eigenvectors ***'
do 10 i = 1,ldvr
write(nout, 99) vr(i,1), vr(i,2), vr(i,3)
10 continue
98 format (1x,f10.4)
99 format (1x,3f10.4)
c
end


***** OUTPUT: *****

*** the real part of the computed eigenvalues ***
11.0000
1.0000
2.0000

*** the imaginary part of the computed eigenvalues ***
0.0000
0.0000
0.0000

*** the right eigenvectors ***
-0.2673 -0.7071 -0.3714
-0.8018 0.7071 0.5571
0.5345 0.0000 0.7428


*********************



 

DGGEV 广义特征值求解,测试程序

      implicit none
      integer     i,info
      real(8)       ::  aa(2,2),bb(2,2),x(2),vl(2,2),vr(2,2)
      real(8)       ::  WORK(16,2),A1(2), A2(2), B1(2)
      data bb/10., 0., 0., 10./
      data aa/20000, -10000, -10000, 10000/
      call DGGEV('N','V',2,AA,2,BB,2,A1,A2,B1,VL,2,VR,2,WORK,16,info)
      do i=1,2
            x(i)=A1(i)/B1(i)
      end do
      write(*,*)x
      end

解:2628   382

 

 

 

附:
基维百科:线性方程组求解
http://zh.wikipedia.org/wiki/%E7%BA%BF%E6%80%A7%E6%96%B9%E7%A8%8B%E7%BB%84%E6%B1%82%E8%A7%A3
基维百科
http://de.wikibooks.org/wiki/Fortran:_LAPACK (de)
Erstellen der LAPACK-Bibliothek mit gfortran  (de)
Uni-Karlsruhe:(de)
http://www.rz.uni-karlsruhe.de/produkte/1690.php

Google Group  comp.lang.fortran 的一篇文章 Lapack安装及其它
http://groups.google.de/group/comp.lang.fortran/browse_thread/thread/105d267d44a97704/c8884fc6eb3245cf?lnk=gst&q=lapack&rnum=1&hl=de#c8884fc6eb3245cf

编译好的连接库for win32:
http://www.fi.muni.cz/~xsvobod2/misc/lapack/

德语版的介绍
http://userpage.fu-berlin.de/~kweinert/it/lapack.html

Windows环境编译方法
http://jsy.dyn.dhs.org/maths/fortran/netlib/lapack/Windows/#installLAPACK
[原创]Windows下也可以编译lapack的静态连接库了
http://bbs.pfan.cn/post-241751.html

LAPACK for Windows    LAPACK Windows Installer
http://icl.cs.utk.edu/lapack-for-windows/