In message <[EMAIL PROTECTED]>, 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?
You could do it with SSH. A command like ssh machine_a run_job_a1.py will not terminate until the execution of run_job_a1.py on the remote machine has terminated. So you end up with a lot of "proxy" subprocesses, if you like, on the master machine, each one waiting for a remote process on some master machine to terminate. As the controlling process notices the termination of each proxy process, it looks to see which slave machine that maps to, and sends another command to start the next job on that machine. -- http://mail.python.org/mailman/listinfo/python-list