[Gate-users] Continue Gate or Geant4 Program after close the terminal
Boersma David
david.boersma at medaustron.at
Thu Apr 5 09:45:21 CEST 2018
Hi Mery,
In principle not: typically, closing the terminal causes the shell that runs in it to terminate and if Gate runs in that shell then it will be killed as well, sadly. If this happens unplanned, then usually your best option is to accept the loss of time and just start over.
However, that said:
(1) Some actors (e.g. DoseActor) can save their results periodically. These actors have options that let you configure what “periodically” means, maybe every few seconds, or maybe whenever a certain amount of new data is accumulated. This can be an option if your simulation ran for many hours, but the drawback is that you need to invest time to figure out how to use this partial result correctly. That takes time, and you can introduce new mistakes that will cost you even more time.
(2) You could consider using “screen” or “tmux” (they are very similar, choice is mostly a matter of taste, I am using “screen” out of long term habit, but “tmux” may be the tool for the future). You run this tool on the computer on which you want to run Gate (e.g. if you ssh from your laptop into a more powerful server, then you first ssh from your lapt into that server and then start “tmux” on that server, not the other way round). This changes almost nothing to your terminal session, except that it will stay “alive” unless you explicitly terminate it. When you run Gate inside a screen (or tmux) session and you accidentally close your terminal (or your ssh connection dies) then the screen/tmux session will stay alive in a “detached” way, that is, it keeps running even though the text output cannot be displayed on any terminal. You can “reattach” such a session and continue working with that session, see the text output that was “printed” while it was detached, etc. This can be extremely handy, but it also takes a bit of time to learn how to use it. It also requires some discipline, because if you forget about a screen/tmux session then it will still continue to use resources (cpu time, RAM).
(3) The best solution for long jobs (many hours of simulation time) is to use a cluster, with job management software (like SLURM, OpenPBS, Condor,…). Then you never lose your work due to accidentally closed terminals. ☺
HTH,
David
From: Gate-users [mailto:gate-users-bounces at lists.opengatecollaboration.org] On Behalf Of Mery MB
Sent: Thursday, April 5, 2018 9:02 AM
To: gate-users at lists.opengatecollaboration.org
Subject: [Gate-users] Continue Gate or Geant4 Program after close the terminal
Dear Gate User
Is there any way to continue the Gate programs after closing the terminal with any reason?
Best
Mery
Disclaimer:
Please notice our E-Mail Disclaimer http://www.medaustron.at/email-disclaimer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20180405/0fb8fd8e/attachment-0001.html>
More information about the Gate-users
mailing list