Hello, I am currently struggeling with a segmentation fault error. My simulation is based on the example /extended/electromagnetic/TestEm7. I modified the setup to have multiple parallel “wires”, red in attached picture. On top of the wires I placed another layer white in attached picture. Now my code works usually fine. It runs without a problem if I have up to 11 wires on a substrate of 30x30 um. The wire dimensions are then 30um/22 x 30um x 5 nm. Then a couple of interesting things happen:
-
If I have 12 wires with the wire dimensions 30um/24 x 30um x 5 nm, my program still runs but it doesn’t end properly anymore. It is able to go through all events but isn’t anymore able to write a proper output.root file and ends with a segmentation error. I’m working here with a random beam (random y,z position, momentum fixed and always in x direction). Remarkably, if I change the beam to a fixed position I no longer have this problem and the simultation runs fine.
-
If I even further increase the wires to 100 (dimensions are then 30um/200 x 30um x 5 nm) then the program is able to only simulate a couple of events before crashing. It crashes also with a segmentation fault error. I identified the corresponding line which presumable causes the crash in my stepping action to be
analysisManager->FillH1(1, x, edep);
. Although in the previous steps and events this line of code wasn’t an issue. Also, if I change here from a random beam to a fixed one the simulation runs almost through, but, similiar as in 1., it crashes at the end with a segmentation fault. However, here it managed to then write a working output.root.
Further infos:
-
I also have run the simulation previously without this wire structure, and only 2 layers, each with 5 nm thickness, on top of a substrate. Here, I didn’t have any problems.
-
I currently have a maxstepsize of 0.3 nm
-
I have also run the program with valgrind yielding me
Invalid read of size 8
when crashing