[Gate-users] Geant4 10.0 MT and GATE

Marc Verderi verderi at in2p3.fr
Mon Dec 2 14:37:46 CET 2013


Dear Ian,

     Just a few words to let you know about some feature of the Geant4 
10.0 MT, and to partly answer your question. Geant4 10.0, which includes 
this MT capability, will be released in a few days. The MT scheme 
adopted is to process events (in Geant4 sense) in parallel, each thread 
dealing with a set of events, and sharing geometry and physics tables 
among the threads, to minimize the memory footprint.

     GATE will certainly need an adaptation. This is of course critical, 
but requires only a few lines of code. The G4RunManager as to be 
replaced by the G4MTRunManager. Users' actions (primary generator 
action, stepping action, event action, and run action if needed) become 
thread local actions : one instance of each of these actions is 
instantiated per thread. Sensitive detectors and fields become also 
thread local, and have to be instantiated in a new method of the 
detector construction : ConstructSDandField() which is executed once for 
each thread. In this way, events can be processed independently, in 
parallel. The overall mechanics is controlled by a master thread, the 
one launched at the application startup, and which then spawn the slave 
threads at event loop start.

     What will be needed also is an examination of the "static" data 
members in the GATE classes : some of them would be static as known in 
the master and slave threads, some others will be static but with a 
thread local scope and will need some adaptation. Helper classes in the 
Geant4 MT version exist to help doing an easy transformation of, for 
example, a singleton to a thread-local singleton.
     All these transformations are compatible with a sequential 
processing (the up-to-now processing), and a MT-compliant code can be 
compiled as is for a sequential processing (provided the G4RunManager 
has been chosen).

     For information, tests performed on a 61 cores Intel Xeon Phi board 
allowed to go up to 244 threads (maximum possible number on this 
platform) for a single realistic application !

     Hoping I just whet your appetite ! ;)

Best regards,
Marc



On 11/26/2013 03:07 PM, Porter Ian (RBV) NHS Christie Tr wrote:
> Hello All,
>    My understanding is that the next version of Geant4 (v10.0) will
> support multi-threading and will be released to production soon.  We are
> keen to move over to this to avoid using multiple instances of GATE (1
> per CPU core) on our cluster.  Can anyone tell me whether GATE will
> require an upgrade in order to work with Geant4 MT?  If so, is there a
> timescale for the release of the new version?  The last newsletter
> mentions GATE v7.0 with GPU support, which was due out by now but has
> not yet appeared.  Is this being rewritten with a view to supporting
> Geant4 10.0 MT?
>
> Many Thanks,
>    -- Ian.
> To download our 20:20 Vision strategy, please visit http://www.christie.nhs.uk/2020
>
> This e-mail and any files transmitted with it are confidential and solely for the use of the intended recipient.
> If you have received this e-mail in error you should not disseminate, distribute or copy it.
> Please notify the sender immediately and delete this e-mail from your system.
>
> _______________________________________________
> 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