[SciPy-User] Parallel processing

Nils Wagner nwagner@iam.uni-stuttgart...
Fri Mar 4 09:19:07 CST 2011


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):

     try:
         retcode = call("mycmd" + " myarg", shell=True)
         if retcode < 0:
             print >>sys.stderr, "Child was terminated by 
signal", -retcode
         else:
             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
                                                   Nils


More information about the SciPy-User mailing list