The multitheading it set by the core geant4 installation, so you need to use -DGEANT4_BUILD_MULTITHREADED=ON when configuring and compiling geant4 itself.
You can’t turn it on/off like that for individual simulations.
Thanks for the clarification. I am using a 10 core (20 thread) CPU for simulation and I am configuring it using " -DGEANT4_BUILD_MULTITHREADED=ON". But I am not observing any difference in simulation time using 10 core CPU compared to the earlier 4 core CPU.
If not, you are probably still using one single core.
Did you use the flag -DGEANT4_BUILD_MULTITHREADED=ON when building Geant4 itself?
You do not need to use the flag -DGEANT4_BUILD_MULTITHREADED=ON when building example B1.
Yes I am seeing outputs like G4WT0, G4WT1…upto G4WT29 when running the code on 10-core computer.
When I am running the code on quad core computer I am sseeing outputs like G4WT0, … upto G4WT10.
But I was expecting 10 core cpu should be quicker compared to quad core to complete the simulations but both are taking same time. I am using 10^8 primaries and both cpu’s are taking 1 hr 20 mins.
I am using the flag -DGEANT4_BUILD_MULTITHREADED=ON to configure.
Did you rerun make? Adding these lines into B1 on my machine print the appropriate line.
Wasn’t at a geant4 machine yesterday, and have just realised that the initial text printed tells you what mode you compiled the core components of geant4 in
$ ./exampleB1 run1.mac
**************************************************************
Geant4 version Name: geant4-10-05-patch-01 [MT] (17-April-2019)
<< in Multi-threaded mode >>
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/
**************************************************************
Multithreaded
<<< Reference Physics List QBBC
Visualization Manager instantiating with verbosity "warnings (3)"...
.
.
.