Problem 1853

Summary: G4HadronElasticPhysicsPHP fail in multi-threaded application.
Product: Geant4 Reporter: John Watts <john.w.watts>
Component: physics_listsAssignee: Alberto.Ribon
Status: RESOLVED FIXED    
Severity: trivial CC: Alberto.Ribon, Gunter.Folger, Vladimir.Ivantchenko
Priority: P5    
Version: 10.2   
Hardware: All   
OS: All   
Attachments: G4HadronElasticPhysicsPHP tar ball

Description John Watts 2016-04-08 15:17:47 CEST
Created attachment 395 [details]
G4HadronElasticPhysicsPHP tar ball

When G4HadronElasticPhysicsPHP is used in a multi-threaded application it fails with the message:

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Run0035
issued by : G4RunManagerKernel::G4RunManagerKernel()
Size of G4ProcessVector is inconsistent between master and worker threads
for the particle <B+>.
size of G4ProcessVector for worker thread is 4 while master thread is 5.
*** Fatal Exception *** core dump ***
----------------------------------------------------
By comparing it with G4HadronElasticPhysicsHP I concluded the the variables:
wasActivated, and mainElasticBuilder were not used correctly and modified the code based on how these variables are used in G4HadronElasticPhysicsHP.
Attached is the modified source.
Comment 1 Alberto.Ribon 2016-05-31 17:54:36 CEST
Yes, you are right. The problem has been fixed in our development line, and will be included in the coming beta release, G4 10.3beta, expected by the end of June.

Thanks!