1
$\begingroup$

I have a program that does some setup work, forks several times, and exits. The child processes do most of the heavy computing.

Will torque kill the child processes when it detects the parent process exiting?

$\endgroup$
1
2
$\begingroup$

http://www.clusterresources.com/torquedocs21/2.3cancelingjobs.shtml says that all processes associated with the job are killed. I believe that is true for all schedulers since it is clearly the desired behavior.

Torque will not kill the job or the child processes when the original process exists, as this would prevent a job from launch one program after another in sequence, for example, since this workflow would cause the job to terminate after the first program exited if Torque initiated cleanup and job termination upon that event.

You can, of course, verify any of this experimentally using the Torque system you intend to use.

$\endgroup$
4
  • $\begingroup$ This only answers what happens if the job is killed, not what happens if it exits normally. $\endgroup$
    – Dan
    Aug 20 '13 at 21:20
  • $\begingroup$ There seems to be some confusion here between a job and the process launched by it. If the torque job is still active, the forked processes will remain - you can run nothing during a torque job if you want and it will idle until it times out. When the job times out, any and all processes associated with the job will be killed. $\endgroup$ Aug 21 '13 at 22:18
  • $\begingroup$ Thanks for the clarification. I edited my question to correct my prior confusion. $\endgroup$
    – Dan
    Aug 21 '13 at 23:31
  • $\begingroup$ Answer amended accordingly... $\endgroup$ Aug 22 '13 at 20:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.