Message: Strange Segmentation fault Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Strange Segmentation fault  

Forum: Multithreading
Date: Nov 15, 10:10
From: Volodymyr Rodin <Volodymyr Rodin>

Hello everyone,

I have discovered the very strange behaviour of my program when I tried to run a few particles just for a check with visualisation.

With G4MULTITHREADED if the number of events is very small, Geant4 splits work in the following way for 4 threads:

 G4WT3 > ### Run 0 starts on worker thread 3.
 ....
 G4WT0 > ### Run 0 starts on worker thread 0.
 G4WT3 > Going to create slave ntuples from main
 ....
 G4WT0 > Going to create slave ntuples from main
 G4WT3 > Thread-local run terminated.
 ....
 G4WT0 > Thread-local run terminated.
 G4WT3 > Run Summary
 G4WT1 > Run Summary
 G4WT2 > Run Summary
 G4WT2 >   Number of events processed : 0
 G4WT2 >   User=0s Real=0s Sys=0s
 G4WT1 >   Number of events processed : 4
 G4WT0 > Run Summary
 G4WT3 >   Number of events processed : 1
 G4WT3 >   User=0s Real=0s Sys=0s
 G4WT1 >   User=0s Real=0s Sys=0s
 G4WT0 >   Number of events processed : 0
 G4WT0 >   User=0s Real=0s Sys=0s
 G4VIS > G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory 
 model.
 G4VIS > See commands in /vis/modeling/trajectories/ for other options.

As a result:

 Segmentation fault (core dumped)

Without output like this:

 Run terminated.
 Run Summary
 Number of events processed : 600
 User=0.09s Real=0.6s Sys=0.08s

Usually, it happens for Nevents<500 during the first run. Further, it works correctly: #1 Run - 1000 #2 Run - 50(No segmentation fault)

With G4RunManager instead of G4MTRunManager, it doesn't happen. Quite interesting to know the reason. Maybe something with short processing times?

 G4WT1 >   User=0s Real=0s Sys=0s 

Best regards,

Volodymyr

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Strange Segmentation fault   (Makoto Asai - Nov 15, 10:24)
(_ None: Re: Strange Segmentation fault   (Volodymy Rodin - Nov 15, 12:58)
(_ None: Re: Strange Segmentation fault   (Makoto Asai - Nov 15, 13:21)
(_ None: Re: Strange Segmentation fault   (Volodymy Rodin - Nov 15, 14:36)
1 None: Re: Strange Segmentation fault   (Garnier Laurent - Nov 16, 02:37)
1 Ok: Re: Strange Segmentation fault   (Volodymy Rodin - Nov 16, 02:47)
2 None: Re: Strange Segmentation fault   (Volodymy Rodin - Nov 16, 02:39)
1 None: Re: Strange Segmentation fault   (John Allison - Nov 19, 05:56)
 Add Message Add Message
to: "Strange Segmentation fault "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews