- 论坛徽章:
- 0
|
自己编译arpack实在郁闷的很,偷懒一下有系统自动安装的先!:)
参考中科大bbs上一个帖子把问题解决了 1、在新得利里面搜索arpack,下载后安装 2、在终端输入whereis
libarpack 我的机器上得的结果: libarpack:
/usr/lib/libarpack.a /usr/lib/libarpack.so 用第一个路径 3、去http://www.caam.rice.edu/software/ARPACK/
下载arpack96.tar.gz 4、终端中输入tar
xzvf arpack96.tar.gz 5、cd
ARPACK/EXAMPLES/NONSYM 6、输入gfortran
dndrv1.f -L/usr/lib -larpack -o ss 举例:如果程序aaa.f要调用/dir/lib/lib***.a
(我的机器上路径是/usr/lib/libarpack.a) 编译时写作
gfortran aaa.f -L/dir/lib -l*** -o -ss 7、执行./ss 8、得到结果 Ritz
values (Real,Imag) and relative residuals ---------------------------------------------- Col
1 Col 2 Col 3 Row
1: 1.96054E+01 0.00000E+00 1.94458E-14 Row
2: 7.68333E+01 0.00000E+00 4.23099E-15 Row
3: 4.82193E+01 0.00000E+00 7.80421E-15 Row
4: 4.82193E+01 0.00000E+00 6.98407E-15 _NDRV1 ====== Size
of the matrix is 100 The
number of Ritz values requested is 4 The
number of Arnoldi vectors generated (NCV) is 20 What
portion of the spectrum: SM The
number of converged Ritz values is 4 The
number of Implicit Arnoldi update iterations taken is 9 The
number of OP*x is 139 ********************************************************************************* 说明调用成功了 附注:1、网上有关于安装arpack的帖子,不过比较复杂,不推荐使用,源里面有现成的可以用 2、其他软件包没有尝试过,希望拍砖
引文:
[color="#0000ff"]http://forum.ubuntu.org.cn/viewtopic.php?p=774057&sid=3eaa45aee598026a2bfd3cc2b098b93a
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/46093/showart_1671499.html |
|