Skip to content

Commit

Permalink
doc: add documentation for lapack library linking support
Browse files Browse the repository at this point in the history
- Fixes dealii#14579
- Reference external-libs/lapack.html in readme.html

Signed-off-by: Nistha Bhawsinka <nistha.bhawsinka@gmail.com>
  • Loading branch information
CodyGirl committed Dec 23, 2022
1 parent 85f0935 commit d9ce5ac
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 3 deletions.
87 changes: 87 additions & 0 deletions doc/external-libs/lapack.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>The deal.II Readme on interfacing to BLAS/LAPACK</title>
<link href="../screen.css" rel="StyleSheet">
<meta name="copyright" content="Copyright (C) 2010 - 2017 by the deal.II authors">
<meta name="keywords" content="deal.II">
</head>
<body>

<h2>Installation of <acronym>BLAS/LAPACK</acronym></h2>

<p>
<a href="https://netlib.org/lapack/">LAPACK</a>
is a library of Fortran subroutines for solving the most
commonly occurring problems in numerical linear algebra.
LAPACK is available on <a href="https://github.com/Reference-LAPACK/lapack">GitHub</a>. LAPACK releases are also available on <a href="https://netlib.org/lapack/">netlib</a>.
</p>

<p>
Below is a short summary of instructions on how to compile and install
<acronym>LAPACK</acronym> by hand (for the case you wish to do so).
</p>

<h3>How to compile and install <acronym>LAPACK</acronym> by hand</h3>

<p>
First clone the <a href="https://github.com/Reference-LAPACK/lapack">LAPACK</a>
repository. And configure cmake to build lapack as a shared library.
The following commands will result in a set of .so files or shared library
files installed in the path specified with CMAKE_INSTALL_LIBDIR flag :

<pre>
cd lapack
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_LIBDIR=$HOME/.local/lapack ../
make install
</pre>

After successful execution of above set of commands, a list of .so files
such as libblas.so, libblas.so.3, liblapack.so, liblapack.so.3 are
generated.
</p>

<h2>Interfacing <acronym>deal.II</acronym>
to <acronym>LAPACK</acronym></h2>

<p>
Support for <acronym>LAPACK</acronym> will be
enabled automatically if a system wide installation of
<acronym>LAPACK</acronym> can be found.
To use a self compiled version, specify
<pre>
-DLAPACK_DIR=/path/to/lapack-installation
</pre>
when invoking <code>cmake</code>, for example,

<pre>
git clone https://github.com/dealii/dealii.git
cd dealii
mkdir build
cd build
cmake -DDEAL_II_WITH_LAPACK=ON -DLAPACK_DIR=$HOME/.local/lapack/ ../
make
</pre>

</p>
<p>
You can override the autodetection by manually setting
<pre>
-DDEAL_II_WITH_LAPACK=OFF|ON
</pre>
</p>

<hr />
<div class="right">
<a href="http://validator.w3.org/check?uri=referer" target="_top">
<img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
</div>

</body>
</html>
5 changes: 2 additions & 3 deletions doc/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,8 @@ <h4>Optional interfaces to other software packages</h4>
<a href="http://www.netlib.org/blas/" target="_top">BLAS</a> (the <i>Basic Linear Algebra Subroutines</i>) and
<a href="http://www.netlib.org/lapack/" target="_top">LAPACK</a> (
<i>Linear Algebra Package</i>) are two packages that support low-level linear algebra operations on vectors and dense matrices. Both libraries should be packaged by almost all Linux distributions and found automatically whenever available.
(You might have to install development versions of the libraries for <acronym>deal.II</acronym> being able to use them). For details on how to set up <acronym>deal.II</acronym> with a non standard BLAS/LAPACK implementation, see the
<a href="users/cmake_dealii.html#advanced">advanced
setup</a> section in the CMake ReadME.
(You might have to install development versions of the libraries for <acronym>deal.II</acronym> being able to use them). For details on how to set up <acronym>deal.II</acronym> with a non standard BLAS/LAPACK implementation,
see <a href="external-libs/lapack.html" target="body">this page</a>.
</p>
</dd>

Expand Down

0 comments on commit d9ce5ac

Please sign in to comment.