running a program on many processors
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Sun Mar 7 20:08:32 EST 2010
On Mon, 08 Mar 2010 01:18:13 +0100, Paweł Banyś wrote:
> Hello,
>
> I have already read about Python and multiprocessing which allows using
> many processors. The idea is to split a program into separate tasks and
> run each of them on a separate processor. However I want to run a Python
> program doing a single simple task on many processors so that their
> cumulative power is available to the program as if there was one huge
> CPU instead of many separate ones. Is it possible? How can it be
> achieved?
Try Parallel Python.
http://www.parallelpython.com/
I haven't used it, but it looks interesting.
However, the obligatory warning against premature optimization: any sort
of parallel execution (including even lightweight threads) is hard to
build and much harder to debug. You should make sure that the potential
performance benefits are worth the pain before you embark on the job: are
you sure that the naive, single process version isn't fast enough?
--
Steven
More information about the Python-list
mailing list