|Message: modifying geometry between run leads to segment fault||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Dear Geant4 experts and users:
I want to run a PET simulation, and I use the B3 example to achieve my gold. What I want to implement is modifying the geometry. And the modification is very simple, I change the rotation angle of the patient between runs. But I found a quite strange effect: It seems that the code is running OK in the sequential mode, but it will crash after 55 times run in the multithreading mode. I do not know why it is like this:
Here are the gdb debugging results when the code crash and lead to a segment fault. In this run, I set the thread number as 2.
Thread 2 "exampleB3a" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffea661700 (LWP 17376)] 0x00007ffff3ba6f90 in __dynamic_cast () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) where
#0 0x00007ffff3ba6f90 in __dynamic_cast () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007ffff5f89faf in G4VUserDetectorConstruction::SetSensitiveDetector(G4LogicalVolume*, G4VSensitiveDetector*) () from /home/ruirui/g4_install/lib/libG4run.so #2 0x00007ffff5f8aee5 in G4VUserDetectorConstruction::SetSensitiveDetector(G4String const&, G4VSensitiveDetector*, bool) () from /home/ruirui/g4_install/lib/libG4run.so #3 0x00000000004126d6 in B3DetectorConstruction::ConstructSDandField() () #4 0x00007ffff5f6e347 in G4WorkerRunManager::InitializeGeometry() () from /home/ruirui/g4_install/lib/libG4run.so #5 0x00007ffff5f61ad2 in G4RunManager::Initialize() () from /home/ruirui/g4_install/lib/libG4run.so #6 0x00007ffff5f62277 in G4RunManager::ConfirmBeamOnCondition() () from /home/ruirui/g4_install/lib/libG4run.so #7 0x00007ffff5f61585 in G4RunManager::BeamOn(int, char const*, int) () from /home/ruirui/g4_install/lib/libG4run.so #8 0x00007ffff5f6ef1b in G4WorkerRunManager::DoWork() () from /home/ruirui/g4_install/lib/libG4run.so #9 0x00007ffff5f7afcf in G4MTRunManagerKernel::StartThread(void*) () from /home/ruirui/g4_install/lib/libG4run.so #10 0x00007ffff33e66ba in start_thread (arg=0x7fffea661700) at pthread_create.c:333 #11 0x00007ffff311c41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Do you have any idea on why it crash like this way?
|Inline Depth:||Outline Depth:||Add message:|