加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 程序设计 > 正文

octave源代码安装之——依赖关系解析(致数学爱好者)

发布时间:2020-05-24 18:03:14 所属栏目:程序设计 来源:互联网
导读:octave源代码安装之——依赖关系解析(致数学爱好者) 我的系统是gentoo 3. 0 .6, gnome-3 ,gcc-4.5.3, 安装好系统,和一些必要的autotool, 就可以下载octave 安装, 有些教程(Programming Abstractions in C: A Second Course in Computer Science )说程序90

octave源代码安装之——依赖关系解析(致数学爱好者)

我的系统是gentoo 3. 0 .6,gnome-3,gcc-4.5.3,安装好系统,和一些必要的autotool,就可以下载octave 安装,

有些教程(Programming Abstractions in C: A Second Course in Computer Science )说程序90%是依靠库(Library)来完成的,只有很少的一部分是跟据应用来编写的代码,

从octave的源代码安装来看,果然如此。

下载octave-3.4.3.tar.gz,然后解压,建议进入su超级用户进行操作,

tar xvvf octave-3.4.3.tar.gz

cd octave-3.4.3

./configure

make

make install

当第一步,./configure的编译时候,首先是提示依赖BLAS和LAPACK,其实安装LAPACK就包括了BLAS,下载LAPACK,

1,我们现看看LAPACK的来龙去脉,LAPACK-Linear Algebra PACKage 的缩写,线性代数包,就是计算机算法程序,LAPACK的安装是cmake,如果你没有安装cmake,那就首先安装cmake后,再解压tar xvvf lapack-3.4.0.tgz,然后,进入文件夹后,

cmake .

make

make install

LAPACK是一个由: 田纳西大学,加州大学伯克利分校,科罗拉多州丹佛大学和NAG有限公司联合开发并提供的软件包。


LAPACK是用Fortran 90和提供用于求解线性方程组的例程,最小二乘线性系统的方程组,特征值问题,奇异值问题的解决方案。还提供了相关的矩阵因子分解(LU,Cholesky,QR,SVD,Schur,generalized Schur),如舒尔因式分解的重新排序和条件数估计的相关计算。稠密和带状矩阵处理,但不是一般的稀疏矩阵。在所有领域,类似的功能是提供真实和复杂的矩阵,在单精度和双精度。

LAPACK项目最初的目标是使被广泛使用的EISPACK,并有效地共享内存的向量和并行处理器上运行LINPACK库。在这些机器上,LINPACK性能和EISPACK是低效的,因为其内存访问模式不顾机器的多层次的内存层次结构,从而花费太多时间,而不是做有用的浮点运算的数据移动。LAPACK重组的算法,使用块矩阵运算,如矩阵乘法,解决这个问题,在最内层的循环。这些块操作,可以为每个架构进行了优化,占内存层次结构,并提供各种现代化的机器上实现高效率的运输方式。我们使用的术语,而不是“便携式”的“运输”,因为最快的性能,LAPACK的要求,高度优化的分块矩阵操作每台机器上已经实现。

更多信息参考:

http://www.netlib.org/lapack/

2,

当你安装好LAPACK后,再一次进入octave文件夹,octave-3.4.3/$./configure编译的时候,会出现一下的软件依赖关系表,逐一解释吧!

./configure

configure: WARNING: UMFPACK not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow.
configure: WARNING: AMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: COLAMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CCOLAMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CHOLMOD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CXSparse library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: GLPK library not found. The glpk function for solving linear programs will be disabled.
configure: WARNING: GraphicsMagick++ library not found. The imread function for reading image files will not be fully functional.
configure: WARNING: HDF5 library not found. Octave will not be able to save or load HDF5 data files.
configure: WARNING: Qhull library not found -- this will result in loss of functionality of some geometry functions.
configure: WARNING: FLTK config script not found. Native graphics will be disabled.
configure: WARNING:
configure: WARNING: I didn't find the necessary libraries to compile native
configure: WARNING: graphics. It isn't necessary to have native graphics,
configure: WARNING: but you will need to have gnuplot installed or you won't
configure: WARNING: be able to use any of Octave's plotting commands
configure: WARNING:
configure: WARNING: I didn't find gnuplot. It isn't necessary to have gnuplot
configure: WARNING: installed,but you won't be able to use any of Octave's
configure: WARNING: plotting commands without it.
configure: WARNING:
configure: WARNING: If gnuplot is installed,but isn't in your path,you can
configure: WARNING: tell Octave where to find it by using the gnuplot_binary
configure: WARNING: function. For example,
configure: WARNING:
configure: WARNING: gnuplot_binary ("/full/path/and/name/of/gnuplot/binary")
configure: WARNING:
configure: WARNING: at the Octave prompt.
configure: WARNING:
configure: WARNING: Setting default value to gnuplot
configure: WARNING:
configure:
configure: NOTE: libraries may be skipped if a library is not found OR
configure: NOTE: if the library on your system is missing required features.
(none) octave-3.4.3 #

3,依次解析,

佛罗里达大学贡献此软件包,SuiteSparse.

SuiteSparse: A Suite of Sparse matrix packagesthat I haveauthored or co-authored are available as a single tar or zip file here,

是一个分散矩阵集成软件包,可以将一下软件包放在一个tar包或者zip包,我下载的是SuiteSparse-3.7.0.tar.gz,

具体软件包如下:

  • SuiteSparseQR multithreaded multifrontal sparseQR factorization
  • AMD: approximate minimum degree
  • CAMD: constrainted approximate minimum degree
  • CCOLAMD: constrained column approximate minimum degree
  • COLAMD: column approximate minimum degree
  • CHOLMOD: sparse supernodal Cholesky factorization and update/downdate
  • LDL: a simple LDL^T factorization
  • UMFPACK: sparse multifrontal LU factorization
  • UFconfig : common configurations (for all but CSparse)
  • CSparse,: a concise sparse matrix packagea sparse matrix package for my book,Direct Methods for Sparse Linear Systems,published as part ofSIAM's book series on theFundamentalsof Algorithms
  • CXSparse: CSparse eXtended,with complex matrices and "long" integers,
  • RBio: read/write matrices in Rutherford/Boeing format
  • BTF: permutation to block triangular form
  • KLU: sparse LU factorization,for circuit simulation

#SuiteSparseQR多线程多波分散QR分解
#AMD:近似最低程度
#CAMD:约束近似最低程度
#CCOLAMD:约束的列近似最低程度
#COLAMD:列近似最低程度
#CHOLMOD:分散supernodal Cholesky分解和update/downdate
#低密度脂蛋白:一个简单的LDL^ T分解
#UMFPACK:分散的多波LU分解
#UFconfig:常见的配置(但CSparse)
#CSparse一个简明的稀疏矩阵稀疏矩包,我的书,分散线性系统的直接方法,SIAM系列丛书的一部分(算法的基础)上公布
#CXSparse:CSparse扩展,复杂的矩阵和“长”的整数,
#RBio:读/写格式矩阵在卢瑟福/波音公司
#BTF:排列块三角形式
#KLU:分散LU分解,电路仿真,


但是,在安装SuiteSparse-3.7.0的时候,查看README,

(1)依赖BLAS和LAPACK库,可以查看默认设置,UFconfig/UFconfig.mk 中 -lblas,llapack
(2)安装 Intel's Threading Building Blocks (TBB)

英特尔线程构建模块(英特尔TBB)提供了一个丰富而完整的的方式来表达一个C + +程序的并行。它是一个库,可以帮助您利用多核心处理器的性能,而不必是一个线程的专家。英特尔TBB不仅仅是一个线程更换库。它代表了一种更高层次的,基于任务的并行抽象平台的细节和可扩展性和性能的线程机制。

http://threadingbuildingblocks.org/ver.php?fid=180

(3)编译METIS(或者不用METIS),

如果你没有下载METIS,可以选择跳过, 进入并编辑SuiteSparse-3.7.0/UFconfig/UFconfig.mk ,

CHOLMOD_CONFIG = -DNPARTITION

因为METIS是CHOLMOD所依赖的软件包,所以,在CHOLMOD的选项中,-DNPARTITION的解释是不包括分区模块,GNU LGPL 认证,同时也不包括METIS,因此选择这个选项,可以不安装METIS,且可以安装SuiteSparse。

(4)也可以根据需要设置其他的 UFconfig/UFconfig.mk ,

如果你已经编译了 SuiteSparse,然后你有更改了UFconfig/UFconfig.mk,你必须输入“make purge" (或者 ”make realclean"在当前文件夹)

(5)进入SuiteSparse-3.7.0,输入"make",所有的软件包都将安装,如果你仅仅安装库文件而不运行demos,可以输入"make library" 进行安装。

(6)安装,输入"sudo make install ",如果你是超级用户,可以直接输入“make install" 进行安装。 所有的库默认安装在 /usr/local/lib 和 /usr/local/include中。可以在UFconfig.mk 中更改安装路径。

(7) 卸载,超级用户,输入“ make uninstall "即可。

4.

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读