Message: Define regions in multi-threding mode Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Define regions in multi-threding mode 

Forum: Physics List
Date: Mar 04, 07:09
From: <fceraudo>

Hello,

I defined a region with cuts in Geant4 10-04-patch-02, used in multi-threading mode. The cuts are applied in DetectorConstruction.cc, where the G4Region is defined as well. I am using G4MTRunManager.

When I run my code I get

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomMgt1001
      issued by : G4Region::G4Region()
The region has NOT been registered !
          Region detRegion already existing in store !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

for every thread except one. I understand it is because every thread tries to create a region, but only the first one succeeds, since the region itself is a shared resource.

My question is: how can I solve this? Can I force the creation of the region in the master thread only?

Thank you for your help.

Francesco

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Define regions in multi-threding mode   (Makoto Asai - Mar 04, 07:19)
(_ Question: Re: Define regions in multi-threding mode   (fceraudo - Mar 04, 07:24)
(_ None: Re: Define regions in multi-threding mode   (Makoto Asai - Mar 04, 07:53)
(_ Ok: Re: Define regions in multi-threding mode   (fceraudo - Mar 04, 08:23)
 Add Message Add Message
to: "Define regions in multi-threding mode"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]