Stop work when runnuing

I work in GEANT4 via this GUI.

After two runs (each one with number of primary gammas equals to one biliion) when I want to do one more run it stops to work. What is the problem ?

Could you post the output from the bottom of the ā€œOutputā€ window please? I wouldnā€™t have expected ā€œ### ā€” Ignore cuts flag: 1ā€ to be the last line of output here. Also, could you post the exact sequence of commands you used, or the macro run, please?

10^9 primaries is quite close to the maximum number of events per run which is 2^31 (2147483648), but multiple runs below this shouldnā€™t be an issue even if the total events overflow the events-per-run limit.

Does the problem occur if you do the two runs of 10^9, then another run with 1 event? What about after two runs of, say, 10^8 (or lower)?

Yes it is last line of output. But the problem is more serious. I restarted the PC. Then ran program again with 10^9 primaries. Now it was the first run, and itā€™s dumped again. But when I set number of primaries equal to 10^8 there is no problems after three runs. I just need in maximal big statistics thatā€™s why I want to use 10^9 particles. By the way the problem arosed when I start work in this GUI. Earilier, when I worked only in terminal anything was right.

Thanks! I would guess (and itā€™s really that) given the difference between the GUI and terminal behaviour this is related to some memory/caching limit or issue in Qt or our Vis implementation. What memory/CPU use are you seeing during runs? I canā€™t recall the specific limits on memory for Vis here, but @Allison can advise better.

Certainly, runs with high statistics would be in the territory of non-interactive (i.e. no Vis) local or task farm compute jobs.

25% overloading of CPU and 192Mb for RAM

Is there a way just turn off this GUI and work in terminal ?

Several points hereā€¦

For such a large number of events, you should aim to run in ā€œbatch modeā€, i.e., execute a macro without any GUI and visualisation.

Butā€¦if you want to execute in ā€œinteractive modeā€, i.e., where commands can be entered on a Geant4 command line, then:

  1. Turn off visualisation (/vis/disable).
  2. Suppress at compilation time all output from individual events. Itā€™s a feature of the Qt GUI that it buffers all output to the end of run and even if you have only one line per event, thatā€™s an awful lot of buffer space, and it can run you out of memory.

I think thatā€™s it. Let us know if this explains your experience.

1 Like

Tell please where I should enter /vis/disable ?

The /vis/disable command can be entered as a command in the GUI in the Session: text entry box, or it can be added as a line in a Geant4 macro file.

Iā€™ve tried both ways: adding in Session and in vis.mac file. It doesnā€™t help.

Did you suppress/remove all G4cout output during the run?

There is no any G4cout during the run. All information outed only at the end of run.

OK.Letā€™s think again.

If you have built with a GUI you do not need to use it. You can control this with environment variables or ~/.g4session (a configuration file in your home directory). See
How to Set Up an Interactive Session ā€” Book For Application Developers 11.2 documentation.

For example, if exampleB1 is your application name, a line in ~/.g4session like this

exampleB1 tcsh

will force the UI Executive to use the terminal with tcsh-like syntax as your user interface.

Excellent! Itā€™s work. Thank you very much.