From 46b065d163ba7d01169a7386608501868bf3c851 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Sep 2018 18:00:42 +0200 Subject: [PATCH] doc/requirements.rst: add some blas documentation --- doc/requirements.rst | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/doc/requirements.rst b/doc/requirements.rst index 900292c5..22308ebc 100644 --- a/doc/requirements.rst +++ b/doc/requirements.rst @@ -98,6 +98,100 @@ To enable this option, configure with ``--enable-fftw3``. The build will then fail if the required library is not found. To disable this option, configure with ``--disable-fftw3`` +blas +.... + +On macOs/iOS, `blas +`_ are made +available through the Accelerate framework. + +On Linux, they can be enabled with ``--enable-blas``. On Debian (etch), +`atlas`_, `openblas`_, and `libblas`_ have been successfully tested. + +When enabled, ``waf`` will check for the current blas configuration by running +``pkg-config --libs blas``. Depending of the library path returned by +``pkg-config``, different headers will be searched for. + +.. note:: + + On Debian systems, `multiple versions of BLAS and LAPACK + `_ can be + installed. To configure which libblas is being used: + + .. code-block:: console + + $ sudo update-alternatives --config libblas.so + +.. + Expected pkg-config output for each alternative: + /usr/lib/atlas-base/atlas/libblas.so + -L/usr/lib/atlas-base/atlas -lblas + /usr/lib/openblas-base/libblas.so + -L/usr/lib/openblas-base -lblas + /usr/lib/libblas/libblas.so + -lblas + +atlas +..... + +`ATLAS BLAS APIs `_ will be used the path +returned by ``pkg-config --libs blas`` contains ``atlas``. + +.. + ```` will be included. + +Example: + +.. code-block:: console + + $ pkg-config --libs blas + -L/usr/lib/atlas-base/atlas -lblas + $ ./waf configure --enable-atlas + [...] + Checking for 'blas' : yes + Checking for header atlas/cblas.h : yes + +openblas +........ + +`OpenBlas libraries `_ will be used when the output +of ``pkg-config --libs blas`` contains 'openblas', + +.. + ```` will be included. + +Example: + +.. code-block:: console + + $ pkg-config --libs blas + -L/usr/lib/openblas-base -lblas + $ ./waf configure --enable-atlas + [...] + Checking for 'blas' : yes + Checking for header openblas/cblas.h : yes + +libblas +....... + +`Netlib's libblas (LAPACK) `_ will be used if +no specific library path is specified by ``pkg-config`` + +.. + ```` will be included. + +Example: + +.. code-block:: console + + $ pkg-config --libs blas + -lblas + $ ./waf configure --enable-atlas + [...] + Checking for 'blas' : yes + Checking for header cblas.h : yes + + Platform notes -------------- -- 2.11.0