When using a scoring mesh in Geant4 10.0 as a multithread, dumping data to a file results in a csv file with repeats of numbers, appears to be multiple individual thread outputs, and missing breaks as shown below. However, when applications are compiled to run on a Geant4 10.0 that is only a single thread, the csv files come out correctly. # mesh name: box # primitive scorer name: eDep # iX, iY, iZ, value [MeV] 0,0,0,0.8460794531511607 ... 1,7,3,0 1,7,4,0.3076904911 1,7,4,1 1,8,0,0.122794357 1,8,0,0. 1,8,1,0.1929819291,8,1,0.1,8,2,2.98386946261,8,2,1,8,3,1.886026472411,8,31,8,4,0.13818003400771,8,1,9,0,0.24805065272991,9,0,0.1414818536883083 1,9,1,0.1110863914426777 1,9,2,1.192699907930878 1,9,3,0.001328198764895205 1,9,4,0.00153431176840968
Thank you for reporting. Could you please be more specific to your OS and compiler versions so that we would try to reproduce the problem? Makoto
Apple OS-X 10.9.1 Clang Compiller- Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix CMake- 2.8.12.1 Geant4 10.0 with Multithreading, QT, OpenGL_XL, data, GDML, inventor, raytracer, XM, and expat CMAKE options on.
Created attachment 252 [details] PrimitiveScorer Output
I tried to reproduce your situation by using examples/extended/runAndEvent/RE03/. However, it isn’t reproduced by it. It is run on the same configuration and Mac as yours almost all. Akinori Kimura
I also examined it with RE03 example on similar platform, but I could not reproduce the problem. T.Aso
Dear Matthew, Do you still see the same problem? Several Geant4 developers tried to reproduce your issue with the configuration you specified, but none of us could succeed. Kind regards, Makoto
No response from the user while we could not reproduce the issue.
Reporter responded. "The error occurs when running a scoring mesh, dumping results, and then running another run on top of the previous results. With just a single run of the scoring mesh there is no error." We will try to reproduce it.
I can also confirm having encountered this particular problem. As mentioned in comment #8, I have only seen it when doing multiple runs on top of each other. The following text is from two macro files which induce the bug: #============== run1.mac================ /run/verbose 1 /score/create/boxMesh detMesh /score/mesh/boxSize 25. 1500. 50. mm /score/mesh/nBin 1 60 1 /score/mesh/translate/xyz 0.0 -1.0 -1.37 m /score/quantity/energyDeposit eDep MeV /score/close /scanner/particle/useNeutron /scanner/detector/useScint /control/loop loop_neutron.mac pos -305 305 5 #============== loop_neutron.mac================ /scanner/container/containerPosition {pos} cm /run/beamOn 100 /score/dumpQuantityToFile detMesh eDep neutron_{pos}.txt
Thanks again for reporting this. We identified the problem. The fix is now under our test and will be included in the patch-02 release that should come out very soon. Makoto