Skip to content

Commit 989578c

Browse files
hjabirdnormallytangent
authored andcommitted
[Docs] Rewrite build documentation (#510)
* Rewrites build documentation * Splits documentation into several files * Adds docs for using with CMake.
1 parent 196825d commit 989578c

File tree

6 files changed

+792
-459
lines changed

6 files changed

+792
-459
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. _building_and_running_tests:
2+
3+
Building and Running Tests
4+
==========================
5+
6+
The functional tests are enabled by default, and can be enabled/disabled
7+
with the CMake build parameter ``-DBUILD_FUNCTIONAL_TESTS=True/False``. Only
8+
the tests relevant to the enabled backends and target domains will be built.
9+
10+
Building tests for BLAS and LAPACK domains requires additional libraries for
11+
reference.
12+
13+
* BLAS: Requires a reference BLAS library.
14+
* LAPACK: Requires a reference LAPACK library.
15+
16+
For both BLAS and LAPACK, shared libraries supporting both 32 and 64 bit
17+
indexing are required.
18+
19+
A reference LAPACK implementation (including BLAS) can be built as the
20+
following:
21+
22+
.. code-block:: bash
23+
24+
git clone https://github.com/Reference-LAPACK/lapack.git
25+
cd lapack; mkdir -p build; cd build
26+
cmake -DCMAKE_INSTALL_PREFIX=~/lapack -DCBLAS=True -DLAPACK=True -DLAPACKE=True -DBUILD_INDEX64=True -DBUILD_SHARED_LIBS=True ..
27+
cmake --build . -j --target install
28+
cmake -DCMAKE_INSTALL_PREFIX=~/lapack -DCBLAS=True -DLAPACK=True -DLAPACKE=True -DBUILD_INDEX64=False -DBUILD_SHARED_LIBS=True ..
29+
cmake --build . -j --target install
30+
31+
and then used in oneMKL by setting ``-REF_BLAS_ROOT=/path/to/lapack/install``
32+
and ``-DREF_LAPACK_ROOT=/path/to/lapack/install``.
33+
34+
To run the tests, either use the CMake test driver, by running ``ctest``, or run
35+
individual test binaries individually.
36+
37+
When running tests you may encounter the issue ``BACKEND NOT FOUND EXCEPTION``,
38+
you may need to add your ``<oneMKL build directory>/lib`` to your
39+
``LD_LIBRARY_PATH`` on Linux.

0 commit comments

Comments
 (0)