[Gate-users] Continue Gate or Geant4 Program after close the terminal

Andreas Resch andreas.resch at meduniwien.ac.at
Wed May 9 09:07:07 CEST 2018


Am 2018-05-09 06:51, schrieb Mery MB:
> Dear Maxime
> 
> I try to use your script for continue my program, the below line:
>                                    NOHUP Gate main.mac &But I get this
> line in terminal
>                                   nohup: ignoring input and appending
> output to 'nohup.out'
> and I did see any reaction on my statue file as the program is running
> 
> 
> or when I type this line: nohup Gate main.mac > OUT.LOG 2>&1 &    I
> got a number like 115509 in terminal that maybe it be the particles
> which was run before...
> 
> I wonder if you have time to help me this issue..
> 
> Best
> 
> Mery
> 
> On Thu, Apr 5, 2018 at 12:44 PM Maxime Chauvin
> <maxime.chauvin at inserm.fr> wrote:
> 
>> Dear Mery,
>> 
>> GATE like any other program launched in a terminal will be kill if
>> it receives some specific signal like SIGHUP (signal hang up) sent
>> when you close a terminal.
>> 
>> If you want your program to continue even if you close the terminal,
>> you just need to disregard the signal SIGHUP when you launch GATE
>> (or any other program). To do this you can simply use the command
>> nohup (no hang up):
>> 
>> NOHUP Gate main.mac &
>> 
>> I recommend also redirecting the standard output and error to a log
>> file so you can see what happened during the execution:
>> 
>> nohup Gate main.mac > OUT.LOG 2>&1 &
>> 
>> You can use this on your computer as well as on a server over ssh.
>> 
>> Kind regards,
>> Maxime
>> 
>>> On 5 Apr 2018, at 09:02, Mery MB <mery.mb.mph at gmail.com> wrote:
>>> 
>>> Dear Gate User
>>> 
>>> Is there any way to continue the Gate programs after closing the
>>> terminal with any reason?
>>> 
>>> Best
>>> Mery
>>> _______________________________________________
>>> Gate-users mailing list
>>> Gate-users at lists.opengatecollaboration.org
>>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users


Dear Mery,

Maxime's suggestions work as they should (at least in bash). Just all 
output is redirected to the file nohup.out instead of the terminal 
screen. Open a second terminal and use the "top" or the "ps -aux" 
command to check if it is still running. Or look at the nohup.out file, 
when it was created and what is in there.

Best,
Andreas


More information about the Gate-users mailing list