24小时热门版块排行榜    

CyRhmU.jpeg
查看: 888  |  回复: 10
当前主题已经存档。

落日照秋草

木虫 (正式写手)

[交流] 【求助】求助LAPACK 问题!【已完结】已有1人参与

请问哪位知道ZGETRI这个语句如何使用啊?

[ Last edited by 余泽成 on 2010-3-28 at 19:08 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
回帖支持 ( 显示支持度最高的前 50 名 )

dickli2008

银虫 (小有名气)

★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
wangen994(金币+2):互动期间参与应助额外奖励 2010-04-03 15:32
安装MKL的时候有个Intel Math Kernel Library reference manual,里面有详细的介绍
10楼2010-03-22 11:00:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通回帖

dic213

木虫 (著名写手)

第三军团儿童团团长

★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
jjdg(金币+2):辛苦了 1-27 19:07
SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
016: *  Purpose
017: *  =======
018: *
019: *  ZGETRI computes the inverse of a matrix using the LU factorization
020: *  computed by ZGETRF.
021: *
022: *  This method inverts U and then computes inv(A) by solving the system
023: *  inv(A)*L = inv(U) for inv(A).
024: *
025: *  Arguments
026: *  =========
027: *
028: *  N       (input) INTEGER
029: *          The order of the matrix A.  N >= 0.
030: *
031: *  A       (input/output) COMPLEX*16 array, dimension (LDA,N)
032: *          On entry, the factors L and U from the factorization
033: *          A = P*L*U as computed by ZGETRF.
034: *          On exit, if INFO = 0, the inverse of the original matrix A.
035: *
036: *  LDA     (input) INTEGER
037: *          The leading dimension of the array A.  LDA >= max(1,N).
038: *
039: *  IPIV    (input) INTEGER array, dimension (N)
040: *          The pivot indices from ZGETRF; for 1<=i<=N, row i of the
041: *          matrix was interchanged with row IPIV(i).
042: *
043: *  WORK    (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
044: *          On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
045: *
046: *  LWORK   (input) INTEGER
047: *          The dimension of the array WORK.  LWORK >= max(1,N).
048: *          For optimal performance LWORK >= N*NB, where NB is
049: *          the optimal blocksize returned by ILAENV.
050: *
051: *          If LWORK = -1, then a workspace query is assumed; the routine
052: *          only calculates the optimal size of the WORK array, returns
053: *          this value as the first entry of the WORK array, and no error
054: *          message related to LWORK is issued by XERBLA.
055: *
056: *  INFO    (output) INTEGER
057: *          = 0:  successful exit
058: *          < 0:  if INFO = -i, the i-th argument had an illegal value
059: *          > 0:  if INFO = i, U(i,i) is exactly zero; the matrix is
060: *                singular and its inverse could not be computed.
061: *
062: *  =====================================================================

http://www.netlib.org/lapack/explore-html/zgetri.f.html
春梦随云散, 飞花逐水流. 寄言众儿女, 何必觅闲愁.
2楼2010-01-27 17:14:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

落日照秋草

木虫 (正式写手)

请问如何把LAPACK库装上啊?说明看的不太懂
3楼2010-01-27 17:33:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dic213

木虫 (著名写手)

第三军团儿童团团长


小木虫(金币+0.5):给个红包,谢谢回帖交流
引用回帖:
Originally posted by 落日照秋草 at 2010-01-27 17:33:22:
请问如何把LAPACK库装上啊?说明看的不太懂

你用Linux还是windows啊?
我用过linux的,上官方网站就有安装说明,先试试呗,有问题再说咯
春梦随云散, 飞花逐水流. 寄言众儿女, 何必觅闲愁.
4楼2010-01-28 08:47:03
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lurencyj

木虫 (著名写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
余泽成(金币+1):欢迎新虫,谢谢参与应助! 2010-01-28 09:30
如果用的系统是linux,可以在系统管理里面软件包安装中找到lapack,系统会自动安装下载。用的时候,在命令行中直接带上-llapack,引用就ok。
很女子很弓虽大
5楼2010-01-28 09:04:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

woshilsh

荣誉版主 (职业作家)

优秀版主


余泽成(金币+1):谢谢参与应助! 2010-01-28 10:34
windows好像一样
[center][url=http://www.91cool.net/][img]http://id.91cool.net/sign/?name=小木虫印&amp;amp;amp;say=各位版主辛苦了![/img][/url][/center]
6楼2010-01-28 10:19:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

ftp0000

木虫 (小有名气)


小木虫(金币+0.5):给个红包,谢谢回帖交流
jjdg:直接pm5楼吧!那样会快很多~ 2010-02-12 00:04
在windows环境下,总是马上装成功了,提示错误,好像是跟其他什么软件冲突了

还没有找到原因,没有装上
7楼2010-02-11 20:23:50
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yy3780

木虫 (著名写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
jjdg(金币+1):感谢参与! 2010-02-13 00:02
计算矩阵的逆矩阵吧。
安装Lapack,网上搜下,有一些博客说明,有windows下可以使用的,注意使用的是什么样的编辑器,按照说明改写文件,然后运行,就会产生三个库。

[ Last edited by yy3780 on 2010-2-12 at 22:46 ]
8楼2010-02-12 22:44:59
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dickli2008

银虫 (小有名气)

★ ★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
余泽成(金币+3):谢谢应助,辛苦了! 2010-03-22 15:44
完整的功能提示给你吧:
?getri
Computes the inverse of an LU-factored general
matrix.
Syntax
FORTRAN 77:
call sgetri( n, a, lda, ipiv, work, lwork, info )
call dgetri( n, a, lda, ipiv, work, lwork, info )
call cgetri( n, a, lda, ipiv, work, lwork, info )
call zgetri( n, a, lda, ipiv, work, lwork, info )
Fortran 95:
call getri( a, ipiv [,info] )
Description
This routine is declared in mkl_lapack.fi for FORTRAN 77 interface, in lapack.f90 for Fortran
95 interface, and in mkl_lapack.h for C interface.
The routine computes the inverse inv(A) of a general matrix A. Before calling this routine, call
?getrf to factorize A.
Input Parameters
n INTEGER. The order of the matrix A; n ≥ 0.
a, work REAL for sgetri
DOUBLE PRECISION for dgetri
COMPLEX for cgetri
DOUBLE COMPLEX for zgetri.
Arrays: a(lda,*), work(*).
a(lda,*) contains the factorization of the matrix A, as returned by
?getrf: A = P*L*U.
The second dimension of a must be at least max(1,n).
work(*) is a workspace array of dimension at least max(1,lwork).
lda INTEGER. The first dimension of a; lda ≥ max(1, n).
ipiv INTEGER.
Array, DIMENSION at least max(1, n).
The ipiv array, as returned by ?getrf.
lwork INTEGER. The size of the work array; lwork ≥ n.
If lwork = -1, then a workspace query is assumed; the routine only
calculates the optimal size of the work array, returns this value as the
first entry of the work array, and no error message related to lwork is
issued by xerbla.
See Application Notes below for the suggested value of lwork.
Output Parameters
a Overwritten by the n-by-n matrix inv(A).
If info = 0, on exit work(1) contains the minimum value of lwork
required for optimum performance. Use this lwork for subsequent runs.
work(1)
info INTEGER. If info = 0, the execution is successful.
If info = -i, the i-th parameter had an illegal value.
If info = i, the i-th diagonal element of the factor U is zero, U is
singular, and the inversion could not be completed.
Fortran 95 Interface Notes
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their
FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible
arguments, see Fortran 95 Interface Conventions.
703
LAPACK Routines: Linear Equations 3
Specific details for the routine getri interface are as follows:
a Holds the matrix A of size (n,n).
ipiv Holds the vector of length n.
Application Notes
For better performance, try using lwork = n*blocksize, where blocksize is a
machine-dependent value (typically, 16 to 64) required for optimum performance of the blocked
algorithm.
If you are in doubt how much workspace to supply, use a generous value of lwork for the first
run or set lwork = -1.
If you choose the first option and set any of admissible lwork sizes, which is no less than the
minimal value described, the routine completes the task, though probably not so fast as with
a recommended workspace, and provides the recommended workspace in the first element of
the corresponding array work on exit. Use this value (work(1)) for subsequent runs.
If you set lwork = -1, the routine returns immediately and provides the recommended
workspace in the first element of the corresponding array (work). This operation is called a
workspace query.
Note that if you set lwork to less than the minimal required value and not -1, the routine
returns immediately with an error exit and does not provide any information on the recommended
workspace.
The computed inverse X satisfies the following error bound:
|XA - I| ≤ c(n)ε|X|P|L||U|,
where c(n) is a modest linear function of n; ε is the machine precision; I denotes the identity
matrix; P, L, and U are the factors of the matrix factorization A = P*L*U.
The total number of floating-point operations is approximately (4/3)n3 for real flavors and
(16/3)n3 for complex flavors.
9楼2010-03-22 10:59:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 落日照秋草 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见