From: Stefan Behnel on
Martin P. Hellwig, 08.03.2010 03:08:
> I did read, two years or so ago, that AMD was looking in to something
> that does just what you say on a cpu level, that is present itself as
> one logical cpu but underneath there are multiple physical ones. I
> wouldn't hold my breath though waiting for it.

Many (desktop/server) CPUs actually do the opposite today - they present
themselves as one physical CPU per core with more than one (commonly two)
logical CPUs. This was introduced because modern CPUs have so many
independent parts (integer arithmetic, floating point, SSE, memory access)
that it's hard to keep all of them busy with a single process (which
usually does either integer arithmetic *or* floating point, for example,
rarely both in parallel). With multiple processes running on the same core,
it becomes a lot easier to find independent operations that can be sent to
different parts of the core in parallel.

Automatically splitting single-threaded code over multiple cores is
something that compilers (that see the full source code) should be able to
do a lot better than hardware (which only sees a couple of basic operations
at a time).

http://en.wikipedia.org/wiki/Vectorization_%28computer_science%29

Expecting this to work for an interpreted Python program is somewhat
unrealistic, IMHO. If you need data parallel execution, use something like
map-reduce or Copperhead instead of relying on the CPU to figure out what's
happening inside of a virtual machine.

http://fperez.org/py4science/ucb/talks/20091118_copperhead_bcatanzaro.pdf

Stefan

From: Processor-Dev1l on
On Mar 8, 1:18 am, Paweł Banyś <moc.li...(a)synabp.reverse_the_string>
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?
>
> Best regards,
>
> Paweł

I can suggest you to try some .NET language (like c#, Boo <-- python-
like, or maybe even IronPython). Reason is that .NET languages do
analyze the code and split them into logical parts that run across
threads.