Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Jun 20, 2024
1 parent e0b592e commit 28c2b75
Show file tree
Hide file tree
Showing 168 changed files with 3,988 additions and 986 deletions.
39 changes: 39 additions & 0 deletions _sources/building_and_running_tests.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _building_and_running_tests:

Building and Running Tests
==========================

The functional tests are enabled by default, and can be enabled/disabled
with the CMake build parameter ``-DBUILD_FUNCTIONAL_TESTS=True/False``. Only
the tests relevant to the enabled backends and target domains will be built.

Building tests for BLAS and LAPACK domains requires additional libraries for
reference.

* BLAS: Requires a reference BLAS library.
* LAPACK: Requires a reference LAPACK library.

For both BLAS and LAPACK, shared libraries supporting both 32 and 64 bit
indexing are required.

A reference LAPACK implementation (including BLAS) can be built as the
following:

.. code-block:: bash
git clone https://github.com/Reference-LAPACK/lapack.git
cd lapack; mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX=~/lapack -DCBLAS=True -DLAPACK=True -DLAPACKE=True -DBUILD_INDEX64=True -DBUILD_SHARED_LIBS=True ..
cmake --build . -j --target install
cmake -DCMAKE_INSTALL_PREFIX=~/lapack -DCBLAS=True -DLAPACK=True -DLAPACKE=True -DBUILD_INDEX64=False -DBUILD_SHARED_LIBS=True ..
cmake --build . -j --target install
and then used in oneMKL by setting ``-REF_BLAS_ROOT=/path/to/lapack/install``
and ``-DREF_LAPACK_ROOT=/path/to/lapack/install``.

To run the tests, either use the CMake test driver, by running ``ctest``, or run
individual test binaries individually.

When running tests you may encounter the issue ``BACKEND NOT FOUND EXCEPTION``,
you may need to add your ``<oneMKL build directory>/lib`` to your
``LD_LIBRARY_PATH`` on Linux.
Loading

0 comments on commit 28c2b75

Please sign in to comment.