Error compiling with TiMemory support

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version: 10.7.4 and 11.2.1
Operating System: Ubuntu 22.04
Compiler/Version: 11.4.0
CMake Version: 3.22.1


I am attempting to compile the geant4 toolkit with support for the TiMemory timing and memory analysis tool. I used -DGEANT4_USE_TIMEMORY=ON in my initial cmake command.

I have cloned the GitHub - NERSC/timemory: Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools. repository and compiled timemory from source.

For both v10.7.4 and v11.2.1, the following error stops the make.

from /usr/local/geant4/geant4-v11.2.1-src/source/global/management/src/G4Profiler.cc:32:
/usr/local/timemory/timemory/include/timemory/variadic/types.hpp:96:7: error: partial specialization ‘class tim::auto_bundle<ApiT, Types ...>’ does not specialize any template arguments; to define the primary template, remove the template argument list
   96 | class auto_bundle<ApiT, Types...>;
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/geant4/geant4-v11.2.1-src/source/global/management/src/G4Profiler.cc:31:
/usr/local/geant4/geant4-v11.2.1-src/source/global/management/include/G4Profiler.hh:220:9: note: primary template here
  220 |   class auto_bundle;
      |         ^~~~~~~~~~~

I’m afraid that TiMemory is no longer supported as the time/expertise to do so is no longer available (and TiMemory use will actually be removed in the upcoming 11.3 release because of this). My only suggestion is to try previous TiMemory tags until you find one that works.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.