个人工具
119.28.94.63
该IP地址的讨论
登录
查看“UbuntuHelp:Lapack”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:Lapack”的源代码
来自Ubuntu中文
←
UbuntuHelp:Lapack
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/Lapack%2B%2B}} {{Languages|UbuntuHelp:Lapack%2B%2B}} * ''tested with:'' Ubuntu 6.06 (Dapper Drake) and Ubuntu 6.10 (Edgy Eft) == Introduction == {{https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconHelp2.png%7D%7D There exists a rich variety of libraries for solving mathematical problems numerically in C++. The [[http://www.netlib.org/|Netlib Repository]] is a good resource for information on this subject. The disadvantage of most of the libraries available there (like [[http://www.netlib.org/clapack/index.html|CLAPACK]]) is that they are outdated or at least not actively maintained. Because of this, the project [[http://lapackpp.sourceforge.net/|Lapack++]] has been brought to life. It bases on [[http://www.netlib.org/lapack++/index.html|lapack++]], which would later evolve into [[http://math.nist.gov/tnt/|TNT]], which however was never truly released. Therefore the developer [[http://www.cstim.de/|Christian Stimming]] {de} {en} came to the opinion that there should be something more up-to-date. Like many other mathematical libraries, Lapack++ bases on the two Fortran libraries [[http://www.netlib.org/blas/index.html|BLAS]] and [[http://www.netlib.org/lapack/index.html|LAPACK]] which were converted from Fortran code to C code by a wrapper called [[http://www.netlib.org/f2c/index.html|f2c]]. An alternative to Lapack++ is [[http://itpp.sourceforge.net/|IT++]]. However, IT++ is licensed by the [[http://en.wikipedia.org/wiki/Gpl|GPL]]. This may not be suitable for companies who do not wish to make the source code of ther projects freely available. In contrast to this Lapack++ is licensed by the [[http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License|LGPL]] and can therefore be used for non-open-source projects as well. == Installation == === Dependencies === Prior to installing Lapack++, the following packages have to be installed: * '''build-essential''' * '''lapack3-dev''' * '''refblas3-dev''' * '''atlas3-base-dev''' (''universe'') By this the Fortran compiler '''g77''' will be installed, too. === Compiling === In order to install the Lapack++ library, one has to compile it from source. The sources can be downloaded from [[http://sourceforge.net/project/showfiles.php?group_id=99696|this page]]. {{https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png%7D%7D It is recommended to have a look at the Wiki document [[UbuntuHelp:CompilingSoftware|CompilingSoftware]] if you are not familiar with compiling software. * the required download has a name of the form <code><nowiki>lapackpp-X.X.X.tar.gz</nowiki></code> (the current one as of April 2007 is <code><nowiki>lapackpp-2.5.1.tar.gz</nowiki></code>) * untar the file and change into the newly created subfolder <code><nowiki>lapackpp-X.X.X</nowiki></code> * compile and install Lapack++ with the usual commands <code><nowiki>./configure</nowiki></code> , <code><nowiki>make</nowiki></code> and <code><nowiki>sudo make install</nowiki></code> == Usage == After a default install, the header files of the library reside in <code><nowiki>/usr/local/lapackpp</nowiki></code> and can be included in C++ programs with: <pre><nowiki> #include <lapackpp/name.h> </nowiki></pre> The library files are installed to <code><nowiki>/usr/local/lib</nowiki></code> with <code><nowiki>liblapackpp.so</nowiki></code> being the main file. A linker command may therefore look like: <pre><nowiki> gcc -L/usr/local/lib -llapackpp foo.o </nowiki></pre> {{https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png%7D%7D Some parts of the library are still from the original lapack++ 1.0 from 1998 and they may contain bugs. Also, all the undocumented files were not tested. == Troubleshooting == If Lapack++ is installed to <code><nowiki>/usr/local</nowiki></code> (which is the default), the libraries will probably not be found: <pre><nowiki> ./lapack: error while loading shared libraries: liblapackpp.so.1: cannot open shared object file: No such file or directory </nowiki></pre> This can be resolved by editing (or creating) the file <code><nowiki>/etc/ld.so.conf</nowiki></code> in an editor with root privileges. One line with the installation path of the library <pre><nowiki> /usr/local/lib </nowiki></pre> has to be added to the file. After that, the environment variables for the library path have to be reloaded by entering the following command in a terminal: <pre><nowiki> sudo ldconfig </nowiki></pre> == Links == * [[http://lapackpp.sourceforge.net/|Lapack++]] - documentation and information ---- [[category:CategoryDocumentation]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:Lapack
。