Skip to content

Latest commit

 

History

History
76 lines (62 loc) · 8.23 KB

INSTALL.md

File metadata and controls

76 lines (62 loc) · 8.23 KB

synopsis

$ git clone https://github.com/TESSEorg/ttg.git
$ cmake -S ttg -B ttg/build -DCMAKE_INSTALL_PREFIX=/path/to/ttg/install [optional cmake args]
$ cmake --build ttg/build
(optional, but recommended): $ cmake --build ttg/build --target check-ttg
$ cmake --build ttg/build --target install

prerequisites

TTG is usable only on POSIX systems.

mandatory prerequisites

  • CMake, version 3.14 or higher; version 3.21 or higher is required to support execution on HIP/ROCm-capable devices.
  • C++ compiler with support for the C++20 standard, or a more recent standard. This includes the following compilers:
    • GNU C++, version 10.0 or higher; GCC is the only compiler that can be used for accelerator programming.
    • Clang, version 10 or higher
    • Apple Clang, version 10.0 or higher
    • Intel C++ compiler, version 2021.1 or higher
  • one or more of the following runtimes:
    • PaRSEC: this distributed-memory runtime is the primary runtime intended for high-performance implementation of TTG
    • MADNESS: this distributed-memory runtime is to be used primarily for developmental purposes

While the list of prerequisites is short, note that the runtimes have many more mandatory prerequisites; these are discussed under transitive prerequisites below. Also: it is strongly recommended that the runtimes are built as parts of the TTG build process (this requires some of the optional prerequisites, listed below). This will make sure that the correct versions of the runtimes are used.

optional prerequisites

  • Git: needed to obtain the source code for any prerequisite built from source code as part of TTG, such as PaRSEC or MADNESS runtimes
  • Boost version 1.81 or later. If the Boost package is not detected TTG can download and build Boost as part of its build process, but this is NOT recommended, you should obtain Boost via the system or third-party package manager. Experts may try to build Boost from source as part of TTG by configuring it with the CMake cache variable TTG_FETCH_BOOST set to ON (e.g., by adding -DTTG_FETCH_BOOST=ON to the CMake executable command line). The following primary Boost libraries/modules (and their transitive dependents) are used:
    • (required) Boost.CallableTraits: used to introspect generic callables given to make_tt. P.S. TTG has a bundled copy of Boost.CallableTraits which is used and installed if Boost is not found or built from source. To avoid the installation and use of the bundled Boost.CallableTraits configure TTG with the CMake cache variable TTG_IGNORE_BUNDLED_EXTERNALS set to ON.
    • (optional) Boost.Serialization: needed to use TTG with classes serializable by the Boost.Serialization library. Note that Boost.Serialization is not header-only, i.e., it must be compiled. This is only required if TTG is configured with CMake cache variable TTG_PARSEC_USE_BOOST_SERIALIZATION set to ON.
  • (Doxygen, version 1.8.12 or later: needed for building documentation.
  • for execution on GPGPUs and other accelerators, the following are required:

transitive prerequisites

PaRSEC

see here

MADNESS

  • An implementation of Message Passing Interface version 2 or 3, with support for MPI_THREAD_MULTIPLE.
  • a Pthreads library
  • (optional) Intel Thread Building Blocks (TBB), available in a commercial or an open-source form

prerequisites for building examples

TTG includes several examples that may require additional prerequisites. These are listed here:

  • SPMM: (block-)sparse matrix multiplication example
    • Eigen library, version 3
    • BTAS library: for the block-sparse case only
      • BTAS' prerequisites are listed here

build

  • configure: cmake -S /path/to/ttg/source/directory -B /path/to/ttg/build/directory <cmake args>
  • build+test: cmake --build /path/to/ttg/build/directory --target check-ttg
  • generate HTML dox: cmake --build /path/to/ttg/build/directory --target html-ttg
  • install: cmake --build /path/to/ttg/build/directory --target install

useful cmake cache variables:

Variable Default Description
TTG_ENABLE_CUDA OFF whether to enable CUDA device support
TTG_ENABLE_HIP OFF whether to enable HIP/ROCm device support
TTG_ENABLE_LEVEL_ZERO OFF whether to enable Intel oneAPI Level Zero device support
BUILD_TESTING ON whether target check-ttg and its relatives will actually build and run unit tests
TTG_EXAMPLES OFF whether target check-ttg and its relatives will actually build and run examples; setting this to ON will cause detection of several optional prerequisites, and (if missing) building from source
TTG_ENABLE_TRACE OFF setting this to ON will enable the ability to instrument TTG code for tracing (see ttg::trace(), etc.); if this is set to OFF, ttg::trace() is a no-op
TTG_PARSEC_USE_BOOST_SERIALIZATION OFF whether to use Boost.Serialization for serialization for the PaRSEC backend; if this is set to OFF, PaRSEC backend will only be able to use trivially-copyable data types or, if MADNESS backend is available, MADNESS-serializable types.
TTG_FETCH_BOOST ON whether to download and build Boost automatically, if missing
TTG_IGNORE_BUNDLED_EXTERNALS OFF whether to install and use bundled external dependencies (currently, only Boost.CallableTraits)