个人工具

“UbuntuHelp:Lapack”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{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 == ...)
 
 
(未显示同一用户的2个中间版本)
第3行: 第3行:
 
  * ''tested with:'' Ubuntu 6.06 (Dapper Drake) and Ubuntu 6.10 (Edgy Eft)
 
  * ''tested with:'' Ubuntu 6.06 (Dapper Drake) and Ubuntu 6.10 (Edgy Eft)
 
== Introduction ==
 
== 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]]
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconHelp2.png 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.
+
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]].
+
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.
+
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 ==
 
== Installation ==
 
=== Dependencies ===
 
=== Dependencies ===
第16行: 第16行:
 
By this the Fortran compiler '''g77''' will be installed, too.
 
By this the Fortran compiler '''g77''' will be installed, too.
 
=== Compiling ===
 
=== 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]].
+
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.
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png 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>)
 
* 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>
 
* untar the file and change into the newly created subfolder <code><nowiki>lapackpp-X.X.X</nowiki></code>
第30行: 第30行:
 
gcc -L/usr/local/lib -llapackpp foo.o
 
gcc -L/usr/local/lib -llapackpp foo.o
 
</nowiki></pre>
 
</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.
+
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png 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 ==
 
== Troubleshooting ==
 
If Lapack++ is installed to <code><nowiki>/usr/local</nowiki></code> (which is the default), the libraries will probably not be found:
 
If Lapack++ is installed to <code><nowiki>/usr/local</nowiki></code> (which is the default), the libraries will probably not be found:
第45行: 第45行:
 
</nowiki></pre>
 
</nowiki></pre>
 
== Links ==
 
== Links ==
* [[http://lapackpp.sourceforge.net/|Lapack++]] - documentation and information
+
* [http://lapackpp.sourceforge.net/ Lapack++] - documentation and information
 
----
 
----
[[category:CategoryDocumentation]]
 
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年5月12日 (二) 17:41的最新版本

* tested with: Ubuntu 6.06 (Dapper Drake) and Ubuntu 6.10 (Edgy Eft)

Introduction

IconsPage?action=AttachFile&do=get&target=IconHelp2.png There exists a rich variety of libraries for solving mathematical problems numerically in C++. The Netlib Repository is a good resource for information on this subject. The disadvantage of most of the libraries available there (like CLAPACK) is that they are outdated or at least not actively maintained. Because of this, the project Lapack++ has been brought to life. It bases on lapack++, which would later evolve into TNT, which however was never truly released. Therefore the developer 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 BLAS and LAPACK which were converted from Fortran code to C code by a wrapper called f2c. An alternative to Lapack++ is IT++. However, IT++ is licensed by the 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 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 this page. IconsPage?action=AttachFile&do=get&target=IconNote.png It is recommended to have a look at the Wiki document CompilingSoftware if you are not familiar with compiling software.

  • the required download has a name of the form lapackpp-X.X.X.tar.gz (the current one as of April 2007 is lapackpp-2.5.1.tar.gz)
  • untar the file and change into the newly created subfolder lapackpp-X.X.X
  • compile and install Lapack++ with the usual commands ./configure , make and sudo make install

Usage

After a default install, the header files of the library reside in /usr/local/lapackpp and can be included in C++ programs with:

#include <lapackpp/name.h>

The library files are installed to /usr/local/lib with liblapackpp.so being the main file. A linker command may therefore look like:

gcc -L/usr/local/lib -llapackpp foo.o

IconsPage?action=AttachFile&do=get&target=warning.png 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 /usr/local (which is the default), the libraries will probably not be found:

./lapack: error while loading shared libraries: liblapackpp.so.1: cannot open shared object file: No such file or directory

This can be resolved by editing (or creating) the file /etc/ld.so.conf in an editor with root privileges. One line with the installation path of the library

/usr/local/lib

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:

sudo ldconfig

Links

  • Lapack++ - documentation and information