| Summary: | Deeply nested solids with G4VNestedParameterisation appears to "hang" Geant4 when simulating photons | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Jonas Nilsson <jonas.nilsson> |
| Component: | geometry/navigation | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | jonas.nilsson |
| Priority: | P5 | ||
| Version: | 10.0 | ||
| Hardware: | Apple | ||
| OS: | Mac OS X | ||
| Attachments: | Geant4 project used to (re)produce the bug. | ||
Can you please specify if using multi-threaded or sequential build ? Compiling using the command "make" or "make -j5" (the processor in my computer has 4 logical cores) appears to make no difference. Sorry, I didn't mean the 'make' command for building the libraries... In release 10.0 you have the possibility to choose for a multi-threaded or sequential version for the installation; choice that you can do at configuration time. These are two inherently different modalities involving completely different models for memory allocation and execution. It would be useful to know what configuration setup you're exercising in this sense. (In reply to comment #3) Ah, of course. :-) The GEANT4 library on my computer has been compiled with multi-threading support. Can you please verify in a separate 'sequential' installation if the problem still appears ? I verified that the provided application works properly when using a sequential build of Geant4. The application is making use of the neutron_hp extensions which is known to be not yet ready/optimised for multi-threading, especially in terms of memory consumption. As such, it is recommended to build/use the application only in sequential mode. |
Created attachment 268 [details] Geant4 project used to (re)produce the bug. This problem might be caused by the use of an unsupported compiler (clang-503.0.40, LLVM 5.1). When using G4VNestedParameterisation to create a phantom from geometry that is three levels deep, the run time of a single event using a photon as the primary particle was more than 1 hour on my system and consumed at most more than 3 GB of RAM (the application was forced to quit after the hour had passed). Using G4VNestedParameterisation with geometry that had a depth of only 1 level allowed me to simulate 1 million photons in 4 minutes using around 1 GB of RAM. Simulating protons or electrons with geometry that was three levels deep was also "fast". I have attached a project that can be used to illustrate the problem. In the file "DetectorConstruction.cc", simply change line 256 from: GenerateFugitivesAlt2(containerVolumeLogical); to GenerateFugitivesAlt1(containerVolumeLogical); The last line is the one exhibiting the bug.