由买买提看人间百态

topics

全部话题 - 话题: lapack
1 2 3 4 5 6 下页 末页 (共6页)
r*****t
发帖数: 547
1
来自主题: FDU版 - linux 下 装 lapack (转载)
【 以下文字转载自 Linux 讨论区 】
发信人: rivulet (砌沙塔的小孩), 信区: Linux
标 题: linux 下 装 lapack
发信站: BBS 未名空间站 (Thu Nov 18 09:09:38 2010, 美东)
执行make之后,一切顺利,到了test的时候。页面显示如下:
make[1]: Leaving directory `/tmp/free_lib/Lapack/LAPACK/TESTING/LIN'
Testing REAL LAPACK linear equation routines
./xlintsts < stest.in > stest.out 2>&1
p*****e
发帖数: 310
2
来自主题: Programming版 - lapack如何求解XA=B
【 以下文字转载自 Computation 讨论区 】
发信人: pinacle (大石头), 信区: Computation
标 题: lapack如何求解XA=B
发信站: BBS 未名空间站 (Fri Jun 12 07:33:51 2009, 美东)
我用lapack的dgetrf把A进行LU分解,也发现用blas的dtrsm可以进行右边求解,但是发
现dgetrf里的iPiv,即pivoting得信息没法在dtrsm里体现出来。而lapack中的dgetrs没
用右边求解的功能。
我现在只好先用A的LU分解,用dgetri得到逆然后B*A^(-1),这样效率太低了。
另外的方法是用dtrsm求解完以后在对解进行列变换,即X*(PLU)=B => X*P = Y, 可是
发现lapack只提供dlaswp来进行行变换。
另外我还想到因为X*P=Y => P'X'=Y', 这样可以用行变换得到X转置再转置回来,但是这
也太麻烦了,而且还得知道inv(P'),效率如何也不清楚。
不知道有没有好办法?
f******y
发帖数: 2971
3
来自主题: Physics版 - lapack安装问题 (转载)
【 以下文字转载自 Computation 讨论区 】
发信人: finalguy (答案), 信区: Computation
标 题: lapack安装问题
发信站: BBS 未名空间站 (Sat Feb 23 04:52:36 2008)
想在linux下装lapack,因为另外两个库要用到。另外两个库都是用C写的。
我的问题是我应该装clapack,还是装lapack?把编译生成的并且改过名字的liblapack.a放到/usr/lib
下,还是放到/usr/local/lib下?我现在是不管怎么弄,另外两个库都没法测试通过。
一个在configure的时候直接告诉我找不到lapack,另一个不需要configure,编译也能
通过,但是link的时候出一堆错,都是说 'dxxx_'没有定义过,应该也是lapck的问题。
大家有经验吗?谢谢了。
r*****t
发帖数: 547
4
来自主题: Linux版 - linux 下 装 lapack
执行make之后,一切顺利,到了test的时候。页面显示如下:
make[1]: Leaving directory `/tmp/free_lib/Lapack/LAPACK/TESTING/LIN'
Testing REAL LAPACK linear equation routines
./xlintsts < stest.in > stest.out 2>&1
b********r
发帖数: 1080
5
来自主题: Programming版 - C++里用Blas/Lapack的问题 (转载)
【 以下文字转载自 Computation 讨论区 】
发信人: bankbuster (恭喜发财), 信区: Computation
标 题: C++里用Blas/Lapack的问题
发信站: BBS 未名空间站 (Tue Aug 9 14:57:49 2011, 美东)
我用atlas,程序里简单调用zgeev函数。编译没有错,没有警告。运行也不出错,但结
果完全不对。似乎函数根本没有被调用。
另外哪里能找到在C或者C++下调用Blas/Lapack函数的具体格式?我这里函数参数还是
在网上搜的。完全没有相关的手册。难道Blas/Lapack只是给fortran用的?
程序如下
#include
#include
#include
#include
#include
using namespace std;
typedef complex dcomplex;
extern "C" void zgeev_( char* jobvl, char* jobvr, int* n, ... 阅读全帖
r**u
发帖数: 42
6
Please check out standard linear algebra program benchmark LAPACK++
LAPACK++ (Linear Algebra PACKage in C++) is a software library for numerical
linear algebra that solves systems of linear equations and eigenvalue problems
on high performance computer architectures.
Old version:
http://math.nist.gov/lapack++/
Latest version:
http://lapackpp.sourceforge.net/

多谢
s*******g
发帖数: 4
7
来自主题: Computation版 - lapack++ and blitz++
blitz++ is designed to be a multi-dimensional array library (a very fast one),
not
a linear algebra library (such as boost::ublas or lapack++). For instance,
blitz++
does not provide sparse matrices. A look at lapack++ website
http://math.nist.gov/lapack++/
seems to imply that it is not actively developed (last update in 2000).
boost::multi_array also provides multi-dimensional arrays, but it is much
slower
than blitz++. I have only used boost::ublas for linear algebra (e.g. sparse
matrices)
a
f******y
发帖数: 2971
8
来自主题: Computation版 - lapack安装问题
想在linux下装lapack,因为另外两个库要用到。另外两个库都是用C写的。
我的问题是我应该装clapack,还是装lapack?把编译生成的并且改过名字的liblapack.a放到/usr/lib
下,还是放到/usr/local/lib下?我现在是不管怎么弄,另外两个库都没法测试通过。
一个在configure的时候直接告诉我找不到lapack,另一个不需要configure,编译也能
通过,但是link的时候出一堆错,都是说 'dxxx_'没有定义过,应该也是lapck的问题。
大家有经验吗?谢谢了。
b*********n
发帖数: 56
9
来自主题: Computation版 - lapack安装问题

liblapack.a放到/usr/lib
题。
Always install lapack from your linux distribution directly, whenever
possible. Many distributions carry a lapack package.
Secondly, (I am not quite sure about this), your program might be looking
for liblapack.so
Lastly, on my machine, lapack is in /usr/lib/ I installed it from debian
repository. So it is put there by default.
p*****e
发帖数: 310
10
来自主题: Computation版 - lapack如何求解XA=B
我用lapack的dgetrf把A进行LU分解,也发现用blas的dtrsm可以进行右边求解,但是发
现dgetrf里的iPiv,即pivoting得信息没法在dtrsm里体现出来。而lapack中的dgetrs没
用右边求解的功能。
我现在只好先用A的LU分解,用dgetri得到逆然后B*A^(-1),这样效率太低了。
另外的方法是用dtrsm求解完以后在对解进行列变换,即X*(PLU)=B => X*P = Y, 可是
发现lapack只提供dlaswp来进行行变换。
另外我还想到因为X*P=Y => P'X'=Y', 这样可以用行变换得到X转置再转置回来,但是这
也太麻烦了,而且还得知道inv(P'),效率如何也不清楚。
不知道有没有好办法?
t**g
发帖数: 49
11
来自主题: CS版 - LAPACK++ or TNT?
both lapack++ and TNT are week.
with them, you'd better prepare to call the lapack directly sometime.
there is a nice c++ package called SYNAPS by B. Mourrain et al.
worth trying: http://www-sop.inria.fr/galaad/logiciels/synaps/.
but it is still under developing.
P*****P
发帖数: 57
12
来自主题: Unix版 - question about install lapack
i'm using a tru64 system. I tred to install a math tool, OOF, but it
needs LAPACK. So I installed a compaq software cxml which was said
including the lapack. But the math tool cant find "libblas", which is
supposed to be the library of BLAS.
anyone know how to solve this porblem? thanks a lot!
X****r
发帖数: 3557
13
来自主题: Computation版 - 请问如何在C++中使用lapack?
linker是语言中立的。你只要知道FORTRAN 例程的调用规范(calling convention),
在任何语言里都可以调。注意矩阵在内存里是按列排的,不是按行排的。
比如在C/C++ 里调lapack, 你只要
#include "f2c.h"
#include "clapack.h"
然后连接的时候连上lapack的目标文件或库就行了。
以上两个头文件可以在netlib.org找到
http://www.netlib.org/f2c/f2c.h
http://www.netlib.org/clapack/clapack.h
s***t
发帖数: 195
14
来自主题: Computation版 - lapack++ and blitz++
never used blitz++, but from what i read, blitz++ is not a replacement
of lapack. it's more like blas, probably. but i would imagine
blitz++ is not compatible with lapack.

Boost,
b********r
发帖数: 1080
15
来自主题: Computation版 - C++里用Blas/Lapack的问题
我用atlas,程序里简单调用zgeev函数。编译没有错,没有警告。运行也不出错,但结
果完全不对。似乎函数根本没有被调用。
另外哪里能找到在C或者C++下调用Blas/Lapack函数的具体格式?我这里函数参数还是
在网上搜的。完全没有相关的手册。难道Blas/Lapack只是给fortran用的?
程序如下
#include
#include
#include
#include
#include
using namespace std;
typedef complex dcomplex;
extern "C" void zgeev_( char* jobvl, char* jobvr, int* n, dcomplex* a,
int* lda, dcomplex* w, dcomplex* vl, int* ldvl, dcomplex*
vr, int* ldvr, dcomplex* work, int* lwork, double* r... 阅读全帖
b********r
发帖数: 1080
16
来自主题: Computation版 - C++里用Blas/Lapack的问题
我用atlas,程序里简单调用zgeev函数。编译没有错,没有警告。运行也不出错,但结
果完全不对。似乎函数根本没有被调用。
另外哪里能找到在C或者C++下调用Blas/Lapack函数的具体格式?我这里函数参数还是
在网上搜的。完全没有相关的手册。难道Blas/Lapack只是给fortran用的?
程序如下
#include
#include
#include
#include
#include
using namespace std;
typedef complex dcomplex;
extern "C" void zgeev_( char* jobvl, char* jobvr, int* n, dcomplex* a,
int* lda, dcomplex* w, dcomplex* vl, int* ldvl, dcomplex*
vr, int* ldvr, dcomplex* work, int* lwork, double* r... 阅读全帖
mw
发帖数: 525
17
来自主题: CS版 - LAPACK++ or TNT?
Hi,
the GSL from GNU is implemented in standart C , and looks ugly in a OO
designed program.
LAPACK++ seems to be much better, but its webpage said it has been replaced
with TNT, i go to the webpage of TNT and found it's actually not well
maintained (seems to be)
so, what kind of toolkit are u now using ? or you guys just write them by
yourself?
thanks
mw
发帖数: 525
18
来自主题: CS版 - LAPACK++ or TNT?
i finally chose TNT
lapack is too complicated for me , especially when I need to program on
WIndows.
TNT is really not so powerful, i need to write quite a lot of code myself to
turn it into something i want.
anyway, it's quite handy.
oh, thanks for your suggestion! :)
t******1
发帖数: 334
19
大家有在C里面call lapack subroutine么?
我在学校的超级计算机上编译,include跟linker的flag都设好了,但是还是出现
undefined reference to这个错误,不知道哪儿出问题了,有人知道么?
google结果,据说可能是一个libg2c的库的问题,但我一个新手,啥都不懂,能知道
linker已经觉得很牛鼻了,这个问题对我而言很棘手。
希望懂的同志能帮一下手。谢谢。
t******1
发帖数: 334
20
多谢各位的回答。
的确是找不到某一个函数,那个函数是用fortran语言写的。
定义在头文件里面已经定义过了,include路径也找到了,所以应该不是定义的问题。
应该是link的时候出的问题。我用的是一个lapack的库里的一个函数,但是我link的路
径明明已经设好了。
-L/opt/intel/mkl/10.0.4.023/lib/em64t -llapack
不知道上面某仁兄说的“一个一个的定位“是什么意思。
l***o
发帖数: 390
21
我以前遇到过这样的问题,大多是不同的编译器用不同的 name mangling 方法造成的
,特别是函数名字中有下划线时。比如用 gfortran 连接 g77 编译的库就要加上编译
选项 -ff2c。那个函数名中有下划线吗?
还有一种可能是连接库的顺序不对,不过比较少见,一般不会把 .o 文件放在 -
llapack 之后的。可以尝试把 lapack 库在待连接文件中的顺序向后调整一下。
l***g
发帖数: 1035
22
来自主题: Programming版 - do you use blas/lapack?
【 以下文字转载自 Computation 讨论区 】
发信人: leong (piggypiggy), 信区: Computation
标 题: do you use blas/lapack?
发信站: BBS 未名空间站 (Sat Feb 16 22:10:39 2008), 转信
survey:
do you use blas or other math library? for what purpose?
thanks
h****r
发帖数: 29
23
来自主题: Programming版 - Linux下运行lapack和blas的问题
Linux fodora core 8.00
用yum装了lapack和blas,结果运行程序时碰到这样的问题
forrtl: severe (168): Program Exception - illegal instruction
Image PC Routine Line Source
libblas.so.3 00002AAAAB5514BB Unknown Unknown Unknown
以前用fedora core 4 和 5 都好好的。
哪位同学可以给点建议?多谢!
p*****e
发帖数: 310
24
来自主题: Programming版 - lapack如何求解XA=B
多谢!blas/lapack貌似没有矩阵转置的函数吧?

factorization
出现
s**p
发帖数: 207
25
来自主题: Unix版 - about install lapack.
i tried to install it on alpha osf1 v4.0
i did what the release notes told me
while it said this sentense is wrong
blaslib = -ldxml
anyone can help me?
and how can i install lapack on sunos 5.9
i can't find the related setting on release notes
thank you
P*****P
发帖数: 57
26
来自主题: Unix版 - question about install lapack
i also tried to install the lapack from netlib.org, though failed
D**e
发帖数: 10169
27
来自主题: Unix版 - question about install lapack
when you compile lapack, there is an option to turn on/off the blas. turn it
off.
or you can add -llibblas in your Makefile.
P*****P
发帖数: 57
28
来自主题: Unix版 - question about install lapack
I installed a package(cxml) provided by Compaq. And all the tests in
LAPACK/BLAS were passsed. But when i run "sh ./configure" to configure
the math tool i want to install, it still can not find "libblas", following
is the code in the configure file to test blas. should i make any changes?
thanks!
...
AC_CACHE_SAVE
dnl Checks for libraries.
AC_ARG_WITH(blas,
[ --with-blas=-lblas Specify library (or libraries) for BLAS],
[
if test "x$withval" != "xno" ; then
AC_M
P*****P
发帖数: 57
29
来自主题: Unix版 - question about install lapack
well, the problem is i cant find that libblas.a
the compaq software installed some "lapack-equivalent", dont know how it works.
sigh, the system is totally a mess, esp to me
even rpm cannot be installed, even for the package i download form tru64 website.
s****d
发帖数: 7
30
来自主题: Computation版 - 请问如何在C++中使用lapack?
Lapack是 用fortan写的,怎么才能在C中调用它的lib?多谢!
s**i
发帖数: 381
31
来自主题: Computation版 - lapack++ and blitz++
Are they both necessary for scientific computations with C++?
It seems to me that lapack++ also has some kind of Matrix and Vector
definitions
so what is the advantage of using Blitz++(Or something similar such as Boost,
MTL) ?
s**i
发帖数: 381
32
来自主题: Computation版 - lapack++ and blitz++
In terms of eigenvalue decomposition, which one is best?
I guess still LAPACK?

),
This is the old version. There has been a new fork since 2000 by other guys:
http://lapackpp.sourceforge.net/html/index.html
j**u
发帖数: 6059
33
☆─────────────────────────────────────☆
neodreamer (aladdin) 于 (Fri Feb 2 17:11:48 2007) 提到:
rt
☆─────────────────────────────────────☆
jzxu (自然) 于 (Fri Feb 2 17:17:15 2007) 提到:

我相信computation版藏龙卧虎,呵呵。你有什么问题,说出来大家讨论讨论。
☆─────────────────────────────────────☆
neodreamer (aladdin) 于 (Fri Feb 2 17:35:31 2007) 提到:
系里的unix和linux都没有lapack
所以我想装一个自己用。
我先下载了blas然后用f77编译
然后ar成 libblas.a,
然后下载cblas,按照README编译
没问题。
我突然想到一个问题就是定义接口的那写头文件是放在哪里的?
是不是blas的函数名是按照标准固定的?
☆──────────────────────
t**********n
发帖数: 135
34
来自主题: Computation版 - Lapack的精度问题
最近在用Lapack求特征值。
3x3方阵[1,2,3;0,1,2;0,0,1],结果应该是1 1 1,但是现在第一个是 1.
00000000090558。用Matlab没有这个问题。这个正常么?
多谢多谢
k******n
发帖数: 35
35
来自主题: Computation版 - Lapack的精度问题
Matlab calls LAPACK to solve linear systems. I would not worry about the
diff you got from Matlab and your code, since the relative error is within
IEEE754 machine tolerance.
o**n
发帖数: 1249
36
【 以下文字转载自 Linux 讨论区 】
发信人: oIin (olin|mMITogether), 信区: Linux
标 题: 怎么知道lapack之类是否支持long double?
发信站: BBS 未名空间站 (Wed Jan 6 19:51:03 2010, 美东)
我怀疑默认是不是从repository下来的都默认是不支持long double的?
怎么能简单看出已经安装的lib是否支持long double呢?多谢
x*****u
发帖数: 3419
37
来自主题: Computation版 - C++里用Blas/Lapack的问题
This is one I had that works:
/*
to compile :
$ gcc array_lapack.c -llapack -lblas -lm
*/
#include
#include
#define size 3 /* dimension of matrix */
struct complex {double re; double im;}; /* a complex number */
main()
{
struct complex A[3][3], b[3], WORK[6], RWORK[6];
struct complex w[3], vl[1][3], vr[1][3];
double AT[2*size*size]; /* for transformed matrix */
int i, j, ok;
char jobvl, jobvr;
int n, lda, ldvl,... 阅读全帖
x*****u
发帖数: 3419
38
来自主题: Computation版 - C++里用Blas/Lapack的问题
This is one I had that works:
/*
to compile :
$ gcc array_lapack.c -llapack -lblas -lm
*/
#include
#include
#define size 3 /* dimension of matrix */
struct complex {double re; double im;}; /* a complex number */
main()
{
struct complex A[3][3], b[3], WORK[6], RWORK[6];
struct complex w[3], vl[1][3], vr[1][3];
double AT[2*size*size]; /* for transformed matrix */
int i, j, ok;
char jobvl, jobvr;
int n, lda, ldvl,... 阅读全帖
a****p
发帖数: 6155
39
来自主题: Physics版 - lapack安装问题 (转载)
都liblaapack.a了,还export LD_LIBRARY_PATH,ldconfig (/etc/ld.so.conf) 干嘛
直接告诉地址不就得了。
OP用的啥lapack? atlas,MKL,还是acml?
S****8
发帖数: 401
40
来自主题: Programming版 - 150行 F# 做矩阵运算比MKL还快
LAPACK层的性能现在几乎完全取决于底层BLAS的性能,LAPACK的算法层的算法都是基本
固定了
这哥们除非在lapack层作出重大变化,否则干不过MKL的blas+lapack,但是能在LAPACK算
法层做重大优化的,估计能去mit当叫兽了
g****t
发帖数: 31659
41
来自主题: Programming版 - 150行 F# 做矩阵运算比MKL还快
他可以优化多核调度。不一定走改进加减乘除的路线。


: LAPACK层的性能现在几乎完全取决于底层BLAS的性能,LAPACK的算法层的算法都
是基本

: 固定了

: 这哥们除非在算法层作出重大变化,否则干不过MKL的blas lapack,但是能在
LAPACK算

: 法层做重大优化的,估计能去mit当叫兽了

l**t
发帖数: 64
42
来自主题: Programming版 - 问一个C++下的Bug(Linux下)
既然你都调试了,为什么不跟进去看看cpu100%时执行的是什么代码,一般跟进去基本
就能知道问题原因
某些linux下能正常运行并不表示程序没问题,因此,这个程序肯定是有问题的
printf的测试不容易看出问题,可能是程序多线程运行共享数据未作保护导致的,也可
能是程序本身内存越界问题,不同的操作系统、编译器对堆栈的设置的大小都是不同的
,使得越界访问造成的后果也不同,当然还有更多的可能性
但是归根结底一句话,你的程序有问题
LAPACK直接用fortran版的不是很好么,C++里也能调用啊,在矩阵传进去前转置一下,
算完后再转置回来就能避免矩阵按行存储和按列存储的差异,而且你在linux下用GCC的
编译器,不同语言交叉编译非常方便啊
我在windows下就用的C++调用fortran版的lapack,用了boost.ublas boost.bindings
lapack atlas,很方便。

有一个奇怪的bug, 在某些
束。我debug的时候发现,在某一
就能顺利执行。
为什么只在某些platform下出为题
f*********u
发帖数: 455
43
来自主题: Programming版 - GNU make problem of Solaris
I want to install lapack into a Solaris machine. However, when i unpack the
source code and try to compile the files for LAPACK, i always met with such
a problem in SRC/Makefile
( cd SRC; make )
make: Fatal error in reader: Makefile, line 75: Unexpected end of line seen
(the line of ifdef USEXBLAS)
Current working directory /home/wliu/lapack-3.2.2/SRC
*** Error code 1
make: Fatal error: Command failed for target `lapacklib'
I almost went crazy. I delete all the multilines since it is said that m
p**o
发帖数: 3409
44
matlab核心在80年代初的确自己用c重写过(那些库后来叫JACKPAC);
后来他们公司发现这样吃力不讨好,2000年重写了接口,封装了netlib的LAPACK。
参见:
http://www.mathworks.com/company/newsletters/news_notes/clevesc
目前的matlab支持若干个LAPACK实现,默认用的是Intel MKL的LAPACK。
在matlab的安装目录的bin目录下,可以找到cublas/mkl/acml的dll/so文件。

法.
D***n
发帖数: 6804
45
来自主题: Programming版 - 请不要盲目崇拜FP语言
愚蠢之至的思路,除了显示你对计算一无所知还能说明啥?
你知道netlib,Lapack, Atlas是什么江湖地位么?你知道这些库花了多少人多少精力
和银子么?还短期无法完成代码,哈哈哈!
Scipy里面也用同样的库,所以你拿SPARK去比,只能比出同样的速度来。
Before building, you will also need to install packages that NumPy and SciPy
depend on
BLAS and LAPACK libraries (optional but strongly recommended for NumPy,
required for SciPy): typically ATLAS + LAPACK, or MKL, or ACML
C and Fortran compilers (typically gcc and gfortran).
l*****e
发帖数: 594
46
来自主题: Programming版 - 弱问 blas 该怎么在Visual studio调用
要用cblas 的函数,找到了cblas.h, blas.lib, blas.dll 编译还是出错说找不到外
部函数。google cblas.dll 和 cblas.lib 无果。google到了一些example都是在用
lapack,看到有说法blas是包含在lapack里,我就是着找了个lapack的sln直接写了个
blas的函数,仍然不行。
求高手指点!!
k******n
发帖数: 35
47
来自主题: Computation版 - 有没有这种SVD的程序
I do not think LAPACK is a good choice in your case unless your problem is
really small.
I assume your matrices are dense. Since S and T are positive definite, S^{1/
2} and T^{1/2} can be obtained by Cholesky decomposition. To use LAPACK, K
has to be calculated explicitly. If you only a few singular values, this is
totally not necessary. Consider K as an operator and use ARPACK.
If the problem is small or you need all singular values, LAPACK will be your
choice. However, I would say Matlab will
x*******n
发帖数: 185
48
fftw是c
LAPACK是fortran
但是现在有C-LAPACK和lapack++
所以,fft和矩阵操作两个最重要的东东都有c/c++的lib,你说我们还为什么要fortran
呢?
x*******n
发帖数: 185
49
fftw是c
LAPACK是fortran
但是现在有C-LAPACK和lapack++
所以,fft和矩阵操作两个最重要的东东都有很成熟的c/c++的lib,你说我们还为什么
要fortran呢?
k*******d
发帖数: 1340
50
来自主题: Quant版 - 面了两个IB,教训+请教
LAPACK是Fortran的Library啊,接口风格像C吧。版上还从来没听过考LAPACK的,原来现在都开始
问LAPACK了。。
1 2 3 4 5 6 下页 末页 (共6页)