[Python-ideas] solving multi-core Python
ethan at stoneleaf.us
Fri Jun 26 00:11:40 CEST 2015
On 06/25/2015 08:25 AM, Sturla Molden wrote:
> On 25/06/15 16:31, Nick Coghlan wrote:
>> 3. The potential for collisions between objects means it isn't an
>> embarrassingly parallel problem where the different computational
>> threads can entirely ignore the existence of the other threads
> Well, you can have a loop that updates all particles, e.g. by calling a coroutine associated with each particle, and then this loop is an embarrassingly parallel problem. You don't need to associate
> each particle with its own thread.
> It is bad to teach students to use one thread per particle anyway. Suddenly they write a system that have thousands of threads.
Speaking as a novice to this area, I do understand that what we learn with may not be (and usually isn't) production-ready code, I do see Nick's suggestion as being one that is easy to understand,
easy to measure, and good for piquing interest.
At least, I'm now interested. :) (look ma! bowling for circles!)
More information about the Python-ideas