Detect Geant4 Multithreading Capabilities and Act On Them
This fixes #219 (closed)
If G4 lacks MT capabilities, we do not call allow_multithreading()
in the GeometryBuilder, effectively switching it off for APSQ. We already properly instantiate a regular G4 RunManager and can still use APSQ in single-threaded mode.
Ref https://geant4-forum.web.cern.ch/t/definition-of-the-g4multithreaded-flag/3681/6
Errors are printed:
|13:57:25.682| (ERROR) [C:GeometryBuilderGeant4] Geant4 has been built without multithreading support, forcing multithreading off.
To allow multithreading, rebuild Geant4 with the GEANT4_BUILD_MULTITHREADED option enabled.
|13:57:25.686| (STATUS) Loaded 7 modules
|13:57:25.686| (STATUS) Initializing 27 module instantiations
|13:57:25.893| (STATUS) Initialized 27 module instantiations
|13:57:25.893| (ERROR) Multithreading disabled since the current module configuration does not support it
|13:57:25.893| (STATUS) Starting event loop
Edited by Simon Spannagel