[Halld-offline] [EXTERNAL] multi-threaded hdgeant4 now working

Richard Jones richard.t.jones at uconn.edu
Wed Jul 1 14:44:09 EDT 2020

Dear colleagues,

The bug reported by Jon Zarling showing how energy deposition in the bcal
was different when hdgeant4 was run with multiple threads vs single has
been found and fixed. It was caused by a pair of substantial pieces of code
in the G4 base library tracking classes, one of which required a
substantial revision, and the other which just involved resetting a set of
parameters at the start of each new track.

The fixes are now in the master branch on github. I developed them on
G4.10.06.p01, and then back-ported the fixes to G4.10.04.p02 and
G4.10.02.p02 (current working version). Whichever of these you are
currently running, if you git pull master and do "make clean;make" and link
against one of these 3 G4 releases with MT enabled, you should get a MT
version that gives the same answers when run with any number of threads.I
tested 1, 2, 4, 8, 25, and 100 threads. The base memory (resident set) for
a single thread is 1GB, with an additional 300MB per additional worker
thread, so if you run with 64 threads make sure you have enough memory
allocated for it. The memory allocation went up quite a bit following these

Please be aware that any results generated using prior releases of hdgeant4
and run with MT>1 is probably affected by this bug, and may not be

-Richard Jones
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20200701/05e51def/attachment.html>

More information about the Halld-offline mailing list