Installation

  • Required

    • C++14 compiler (GNU, MSVC, Clang, Intel, PGI)

    • CMake >= 3.15

  • Optional

    • C compiler (GNU, MSVC, Clang, Intel, PGI)

    • Python libraries

    • MPI

    • UPC++

    • PAPI

    • CUDA

    • CUPTI

    • gperftools

    • CrayPAT

    • AllineaMap

    • ittnotify

    • TAU

    • Caliper

    • Dyninst

    • LIKWID

    • GOTCHA

Description Command
Clone the repository git clone https://github.com/NERSC/timemory.git timemory
Create build directory mkdir build-timemory && cd build-timemory
Run CMake cmake -DCMAKE_INSTALL_PREFIX=/opt/timemory <CMAKE_OPTIONS> ../timemory
Build and install (Windows) cmake --build . --target ALL && cmake --build . --target INSTALL
Build and install (UNIX) cmake --build . --target all && cmake --build . --target install

CMake Options

Timemory uses a standard CMake installation. Set the environment variables CC, CXX, CUDACXX before CMake is executed to define the specified compilers. By default, timemory disables all extensions and build a very minimal configuration. To enable auto-detection of packages, set TIMEMORY_REQUIRE_PACKAGES=OFF when there is no existing CMakeCache.txt in the build directory. For the various external packages, timemory will search the CMAKE_PREFIX_PATH in the environment and enable CUDA, CUPTI, PAPI, MPI, etc. if it can find those packages.

For packages which are included as submodules (Caliper, GOTCHA, pybind11, etc.), there are two options: TIMEMORY_USE_<PACKAGE> and TIMEMORY_BUILD_<PACKAGE>. The former specifies that support for the package is desired, the latter specifies that this support should be enabled via the submodule. Thus, if TIMEMORY_USE_<PACKAGE>=OFF then TIMEMORY_BUILD_<PACKAGE> is ignored. If TIMEMORY_USE_<PACKAGE>=ON and TIMEMORY_BUILD_<PACKAGE>=OFF, then timemory will search for an external installation of the package. If TIMEMORY_USE_<PACKAGE>=ON and TIMEMORY_BUILD_<PACKAGE>=ON, then timemory will use the built-in submodule to enable support for the package.

Option Description
BUILD_SHARED_LIBS Build shared libraries
BUILD_STATIC_LIBS Build static libraries
CMAKE_BUILD_TYPE Build type (Debug, Release, RelWithDebInfo, MinSizeRel)
CMAKE_CUDA_EXTENSIONS CUDA language standard (e.g. gnu++14)
CMAKE_CUDA_STANDARD_REQUIRED Require C++ language standard
CMAKE_CUDA_STANDARD CUDA language standard
CMAKE_CXX_EXTENSIONS C++ language standard (e.g. gnu++14)
CMAKE_CXX_STANDARD_REQUIRED Require C++ language standard
CMAKE_CXX_STANDARD C++ language standard
CMAKE_C_EXTENSIONS C language standard extensions (e.g. gnu11)
CMAKE_C_STANDARD_REQUIRED Require C language standard
CMAKE_C_STANDARD C language standard
CMAKE_INSTALL_PREFIX Installation prefix
CMAKE_INSTALL_RPATH_USE_LINK_PATH Embed RPATH using link path
TIMEMORY_BUILD_AVAIL Build the timemory-avail tool
TIMEMORY_BUILD_CALIPER Enable building Caliper submodule (set to OFF for external)
TIMEMORY_BUILD_COMPILER_INSTRUMENTATION Enable building compiler instrumentation libraries
TIMEMORY_BUILD_C Build the C compatible library
TIMEMORY_BUILD_DEVELOPER Enable building with developer flags
TIMEMORY_BUILD_DOCS Make a doc make target
TIMEMORY_BUILD_DYNINST_TOOLS Build the timemory-run dynamic instrumentation tool
TIMEMORY_BUILD_DYNINST_TPLS Enable building Dyninst third-party library dependencies (TBB, Boost, elfutils, libiberty). See also: DYNINST_BUILD_ options
TIMEMORY_BUILD_DYNINST Enable building Dyninst submodule (set to OFF for external)
TIMEMORY_BUILD_ERT Build ERT library
TIMEMORY_BUILD_EXAMPLES Build the examples
TIMEMORY_BUILD_EXCLUDE_FROM_ALL When timemory is a subproject, ensure only your timemory target dependencies are built
TIMEMORY_BUILD_EXTRA_OPTIMIZATIONS Add extra optimization flags
TIMEMORY_BUILD_FORTRAN Build the Fortran compatible library
TIMEMORY_BUILD_GOOGLE_TEST Enable GoogleTest
TIMEMORY_BUILD_GOTCHA Enable building GOTCHA (set to OFF for external)
TIMEMORY_BUILD_KOKKOS_CONFIG Build various connector configurations
TIMEMORY_BUILD_KOKKOS_TOOLS Build the kokkos-tools libraries
TIMEMORY_BUILD_LTO Enable link-time optimizations in build
TIMEMORY_BUILD_MALLOCP_LIBRARY Build the mallocP library
TIMEMORY_BUILD_MPIP_LIBRARY Build the mpiP library
TIMEMORY_BUILD_NCCLP_LIBRARY Build the ncclP library
TIMEMORY_BUILD_OMPT_LIBRARY Build the OMPT library
TIMEMORY_BUILD_OMPT Enable building OpenMP-Tools from submodule
TIMEMORY_BUILD_PORTABLE Disable arch flags which may cause portability issues (e.g. AVX-512)
TIMEMORY_BUILD_PYTHON_HATCHET Build internal Hatchet distribution
TIMEMORY_BUILD_PYTHON_LINE_PROFILER Build customized Python line-profiler
TIMEMORY_BUILD_PYTHON Build Python bindings with internal pybind11
TIMEMORY_BUILD_TESTING Enable testing
TIMEMORY_BUILD_TIMEM Build the timem tool
TIMEMORY_BUILD_TOOLS Enable building tools
TIMEMORY_FORCE_GPERFTOOLS_PYTHON Enable gperftools + Python (may cause termination errors)
TIMEMORY_INSTALL_ALL 'install' target depends on 'all' target. Set to OFF to only install artifacts which were explicitly built
TIMEMORY_INSTALL_CONFIG Install the cmake package config files, i.e. timemory-config.cmake, etc.
TIMEMORY_INSTALL_HEADERS Install the header files
TIMEMORY_PRECOMPILE_HEADERS Pre-compile headers where possible
TIMEMORY_REQUIRE_PACKAGES All find_package(...) use REQUIRED
TIMEMORY_SKIP_BUILD Disable building any libraries
TIMEMORY_UNITY_BUILD Same as CMAKE_UNITY_BUILD but is not propagated to submodules
TIMEMORY_USE_ALLINEA_MAP Enable control for AllineaMAP sampler
TIMEMORY_USE_ARCH Enable architecture flags
TIMEMORY_USE_CALIPER Enable Caliper
TIMEMORY_USE_CLANG_TIDY Enable running clang-tidy
TIMEMORY_USE_COMPILE_TIMING Enable -ftime-report for compilation times
TIMEMORY_USE_COVERAGE Enable code-coverage
TIMEMORY_USE_CRAYPAT Enable CrayPAT support
TIMEMORY_USE_CUDA_HALF Enable half/half2 if CUDA_ARCH >= 60
TIMEMORY_USE_CUDA Enable CUDA option for GPU measurements
TIMEMORY_USE_CUPTI Enable CUPTI profiling for NVIDIA GPUs
TIMEMORY_USE_DEPRECATED Enable deprecated code
TIMEMORY_USE_DYNINST Enable dynamic instrumentation
TIMEMORY_USE_GOTCHA Enable GOTCHA
TIMEMORY_USE_GPERFTOOLS Enable gperftools
TIMEMORY_USE_HIP Enable HIP option for GPU roofline
TIMEMORY_USE_LIBUNWIND Enable libunwind
TIMEMORY_USE_LIKWID_NVMON Enable LIKWID support for nvidia (GPU)
TIMEMORY_USE_LIKWID_PERFMON Enable LIKWID support for perf (CPU)
TIMEMORY_USE_LIKWID Enable LIKWID marker forwarding
TIMEMORY_USE_MPI_INIT Enable MPI_Init and MPI_Init_thread wrappers
TIMEMORY_USE_MPI Enable MPI usage
TIMEMORY_USE_NCCL Enable NCCL support for NVIDIA GPUs
TIMEMORY_USE_NVML Enable support for NVIDIA Management Library
TIMEMORY_USE_NVTX Enable NVTX marking API
TIMEMORY_USE_OMPT Enable OpenMP tooling
TIMEMORY_USE_PAPI Enable PAPI
TIMEMORY_USE_PERFETTO Enable Perfetto
TIMEMORY_USE_PYTHON Enable Python
TIMEMORY_USE_SANITIZER Enable -fsanitize flag (=leak)
TIMEMORY_USE_STATISTICS Enable statistics by default
TIMEMORY_USE_TAU Enable TAU marking API
TIMEMORY_USE_UPCXX Enable UPCXX usage (MPI support takes precedence)
TIMEMORY_USE_VTUNE Enable VTune marking API
TIMEMORY_USE_XML Enable XML serialization support
TIMEMORY_USE_XRAY Enable XRay instrumentation
TIMEMORY_gperftools_COMPONENTS gperftool components

CMake Example

mkdir build-timemory
cd build-timemory
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTIMEMORY_USE_PAPI=ON -DTIMEMORY_USE_CUDA=ON ..