[Gate-users] Adding G4MTRunManager Support to GATE
Alex Vergara Gil
alexvergaragil at gmail.com
Wed Apr 1 16:56:14 CEST 2015
Dear Yann
In my patch you can see that there is indeed a
GateActionInitialization class that inherits from
G4VUserActionInitialization and implements all of the methods
required. Marc Verderi (member of G4 team) points me out that the
class looks fine for him. However any question is welcome since we
require as many neurons as we can get ;) perhaps you see something we
don't, so you are welcome to contribute.
Regards
Alex
2015-04-01 9:28 GMT-04:00, Yann PERROT <perrot at clermont.in2p3.fr>:
> Dear Alex,
>
> Seeing the error message:
> "For multi-threaded version, define G4UserEventAction in
> G4VUserActionInitialization"
> I have a naive question: do you have an ActionInitialization class which
> is mandatory to define user action classes?
>
> Bests,
>
> Yann
>
>
> Date: Wed, 1 Apr 2015 08:51:52 -0400
> From: alexvergaragil at gmail.com
> To: verderi at in2p3.fr
> CC: gate-users at lists.opengatecollaboration.org
> Subject: Re: [Gate-users] Adding G4MTRunManager Support to GATE
>
> Dear Marc
>
> I have updated a lot of code adding support for G4MTRunManager, but in
> several places gate code uses pointer casts to get G4RunManager
> singleton instance to manage the run like the line
>
> G4RunManager* runManager = G4RunManager::GetRunManager();
>
> Is it correct my update to
>
> #ifdef G4MULTITHREADED
> G4MTRunManager* runManager = G4MTRunManager::GetMasterRunManager();
> #else
> G4RunManager* runManager = G4RunManager::GetRunManager();
> #endif
> ??
>
> In other cases there is a typecast like
> const G4Run* currentRun = G4RunManager::GetRunManager()->GetCurrentRun();
>
> So again, Is it correct my update to
>
> #ifdef G4MULTITHREADED
> const G4Run* currentRun =
> G4MTRunManager::GetRunManager()->GetCurrentRun();
> #else
> const G4Run* currentRun =
> G4RunManager::GetRunManager()->GetCurrentRun();
> #endif
> ??
>
> I feel I am missing something here, however the code compiles fine but the
> error
>
> [G4-cerr]
> -------- EEEE ------- G4Exception-START -------- EEEE -------
> *** G4Exception : Run3011
> issued by : G4MTRunManager::SetUserAction()
> For multi-threaded version, define G4UserEventAction in
> G4VUserActionInitialization.
> *** Fatal Exception *** core dump ***
> -------- EEEE -------- G4Exception-END --------- EEEE -------
>
> [G4-cerr]
> [G4-cerr] *** G4Exception: Aborting execution ***
>
> remains on launching Gate
>
> Regards
> Alex
>
> 2015-04-01 3:49 GMT-04:00, Marc Verderi <verderi at in2p3.fr>:
>> Hi Alex,
>>
>> The part you wrote in the GateActionInitialization class in fine to me.
>> I suspect that the problem (please remember I don't know GATE code) may
>> come from:
>>
>> new GateUserActions( runManager, myRecords );
>>
>> given the runManager is passed to the class, it may set the event action
>> internally, using the non-MT methods ?
>>
>> Cheers,
>> Marc
>>
>
>
> _______________________________________________ Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
>
More information about the Gate-users
mailing list