On Oct 4, 4:55 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message <[EMAIL PROTECTED]>, Carl Banks wrote: > > > > > On Wed, 03 Oct 2007 16:46:20 +0000, JD wrote: > > >> I want send my jobs over a whole bunch of machines (using ssh). The jobs > >> will need to be run in the following pattern: > > >> (Machine A) (Machine B) (Machine C) > > >> Job A1 Job B1 Job C1 > > >> Job A2 Job B2 etc > > >> Job A3 etc > > >> etc > > >> Jobs runing on machine A, B, C should be in parallel, however, for each > >> machine, jobs should run one after another. > > >> How can I do it with the subprocess? > > > It's not too hard if the remote jobs exit gracefully, so that ssh knows > > when the remote job is done. > > It's hard to see how an _ungraceful_ exit could stop SSH from knowing when > the remote job is done.
Clean exit might have been a better word. Various things can cause ssh to exit before the job is done; other things can make the process hang around after the job is finished. The OP needs to make sure the job, and ssh, exit reliably enough for the given use before depending on it. Otherwise, resorting to things like lockfiles and timeouts may be necessary to keep things sequential. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list