[Gate-users] Adding G4MTRunManager Support to GATE
Alex Vergara Gil
alexvergaragil at gmail.com
Wed Apr 1 14:51:52 CEST 2015
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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gateMT.patch
Type: text/x-patch
Size: 36160 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20150401/cef41f82/attachment-0001.bin>
More information about the Gate-users
mailing list