|Message: Re: Geant4 error propagation package in MT Frameworks||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Dear Andrea, thank you very much for your explanations and the pointers to the documentation. Following your suggestions, I did a first test: I compiled Geant4 version 10.00.p01 in MT mode and adapted the erropropagation example coming with the release to use multiple threads. You can find the adapted example on my github page . It can be compiled & run with: git clone https://github.com/ThomasHauth/G4e-MT.git cd G4e-MT mkdir build/ cd build/ cmake -DGeant4_DIR=<path to G4 install> .. make ./errprop As C++11 threads are used, the c++11 standard must be enabled in the compile. Furthermore, you can set the number of used threads via ( in bash ): export G4ERROR_THREAD_NUM=<N> While the changed code works fine with N=1, going to more threads ( I tried N=6 ) results in either segfaults  and/or warnings that a region is defined multiple times . If I add a lock around the Initialization part ( so only one thread is calling G4ErrorPropagatorManager::InitGeant4e at the same time ), the problem is that the particles are defined multiple times . The std::lock_guard line is commented out in the errprop.c on github. My understanding from looking at the G4 source is that both G4ParticleTable and G4Region are both not thread-local but shared among all. Is that correct? Furthermore, the G4ErrorPropagatorManager is using ( via G4ErrorRunManagerHelper ) the G4RunManagerKernel ( sequential ) and not the MT-enabled version. Do you think, the G4MTRunManagerKernel can be used here instead? And will it take care of the correct (one-time) initialization of G4Region & G4ParticleTable ? Thanks, Thomas  https://github.com/ThomasHauth/G4e-MT  -------- WWWW ------- G4Exception-START -------- WWWW ------- *** G4Exception : GeomMgt1001 issued by : G4Region::G4Region() The region has NOT been registered ! Region DefaultRegionForParallelWorld already existing in store ! *** This is just a warning message. *** -------- WWWW -------- G4Exception-END --------- WWWW -------  #0 0x00007ffff3587036 in G4Region::G4Region (this=0x7fffe4099b60, pName=...) at /build/hauth/dev/geant4.10.00.p01/source/geometry/management/src/G4Region.cc:74 #1 0x00007ffff5c60df3 in G4RunManagerKernel::G4RunManagerKernel (this=0x7fffe4000940) at /build/hauth/dev/geant4.10.00.p01/source/run/src/G4RunManagerKernel.cc:116 #2 0x00007ffff638cfb5 in G4ErrorRunManagerHelper::G4ErrorRunManagerHelper (this=0x7fffe4000910) at /build/hauth/dev/geant4.10.00.p01/source/error_propagation/src/G4ErrorRunManagerHelper.cc:69 #3 0x00007ffff638c205 in G4ErrorPropagatorManager::StartG4ErrorRunManagerHelper (this=0x7fffe40008c0) at /build/hauth/dev/geant4.10.00.p01/source/error_propagation/src/G4ErrorPropagatorManager.cc:126 #4 0x00007ffff638c280 in G4ErrorPropagatorManager::G4ErrorPropagatorManager (this=0x7fffe40008c0) at /build/hauth/dev/geant4.10.00.p01/source/error_propagation/src/G4ErrorPropagatorManager.cc:96 #5 0x00007ffff638c318 in G4ErrorPropagatorManager::GetErrorPropagatorManager () at /build/hauth/dev/geant4.10.00.p01/source/error_propagation/src/G4ErrorPropagatorManager.cc:72 #6 0x000000000040ed58 in Initialize() ()  -------- EEEE ------- G4Exception-START -------- EEEE ------- *** G4Exception : Run0002 issued by : G4RunManagerKernel::G4RunManagerKernel() !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! G4RunManagerKernel fatal exception -- Following particles have already been registered before G4RunManagerKernel is instantiated. e+ e- gamma geantino mu+ mu- pi+ pi- proton !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *** Fatal Exception *** core dump ***
|Inline Depth:||Outline Depth:||Add message:|