Build DFTracer

This section describes how to build DFTracer.

There are three build options:

  • build DFTracer with pip (recommended),

  • build DFTracer with Spack, and

  • build DFTracer with cmake


Build DFTracer with Spack

One may install DFTracer with Spack. If you already have Spack, make sure you have the latest release. If you use a clone of the Spack develop branch, be sure to pull the latest changes.

Install Spack

$ git clone https://github.com/spack/spack
$ # create a packages.yaml specific to your machine
$ . spack/share/spack/setup-env.sh

Use Spack’s shell support to add Spack to your PATH and enable use of the spack command.

Build and Install DFTracer

$ spack install py-pydftracer
$ spack load py-pydftracer

If the most recent changes on the development branch (‘dev’) of DFTracer are desired, then do spack install py-pydftracer@develop.

Attention

The initial install could take a while as Spack will install build dependencies (autoconf, automake, m4, libtool, and pkg-config) as well as any dependencies of dependencies (cmake, perl, etc.) if you don’t already have these dependencies installed through Spack or haven’t told Spack where they are locally installed on your system (i.e., through a custom packages.yaml). Run spack spec -I py-dftracer-py before installing to see what Spack is going to do.


Build DFTracer with CMake

Download the latest DFTracer release from the Releases page or clone the develop branch (‘develop’) from the DFTracer repository https://github.com/LLNL/dftracer.

Build Variables

These build variables can be set with cmake as -DDISABLE_HWLOC=OFF or as environment variables export DFTRACER_DISABLE_HWLOC=OFF

Build DFTracer Dependencies

The main dependencies DFTracer are 1. cpp-logger : https://github.com/hariharan-devarajan/cpp-logger.git version: 0.0.1 2. gotcha: https://github.com/LLNL/GOTCHA.git version: develop 3. brahma: https://github.com/hariharan-devarajan/brahma.git version: 0.0.1

These dependencies can be either installed using spack or through cmake from respective respositories.

cmake . -B build -DCMAKE_INSTALL_PREFIX=<where you want to install DFTracer>
cmake --build build
cmake --install build