[SciPy-User] Parallel processing
Fri Mar 4 09:57:44 CST 2011
Would recommend the multiprocess back-port to 2.5, have been playing with
example on link below.
Mobile: 07788 872118
All science is either physics or stamp collecting.
On 4 March 2011 15:34, Matthieu Brucher <firstname.lastname@example.org> wrote:
> Hi Nils,
> As you are launching subprocesses, you can always do a crude:
> import subprocess
> processes = 
> for i in range(nproc):
> for process in processes:
> retcode = process.wait()
> 2011/3/4 Nils Wagner <email@example.com>
> Hi all,
>> my question is a bit off-topic. However, I hope that I
>> will get an answer
>> I would like to parallelize a number of calls to mycmd
>> nproc denotes the number of processes .
>> for i in range(nproc):
>> retcode = call("mycmd" + " myarg", shell=True)
>> if retcode < 0:
>> print >>sys.stderr, "Child was terminated by
>> signal", -retcode
>> print >>sys.stderr, "Child returned", retcode
>> except OSError, e:
>> print >>sys.stderr, "Execution failed:", e
>> How can I manage that with python ?
>> Any pointer would be appreciated.
>> Thanks in advance
>> SciPy-User mailing list
> Information System Engineer, Ph.D.
> Blog: http://matt.eifelle.com
> LinkedIn: http://www.linkedin.com/in/matthieubrucher
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User