Thought of the day
john_ladasky at sbcglobal.net
Thu Jan 17 08:26:20 CET 2013
On Sunday, January 13, 2013 8:16:29 PM UTC-8, Steven D'Aprano wrote:
> A programmer had a problem, and thought Now he has "I know, I'll solve
> two it with threads!" problems.
Very nice! :^)
This problem isn't exclusive to Python, however. Other multi-threaded applications can produce jumbled output like this, even when the threads (processes?) are running on independent CPU's.
I use a very well-regarded application for molecular dynamics simulation: GROMACS, which I believe is written mostly in C (but there's even a little Fortran in it? And supposedly, this is critical to performance?). The GROMACS core program, mdrun, will grab as many CPUs as you allow it to use. The output of mdrun looks exactly like your little quip as each CPU reports back that it has started its piece of mdrun.
More information about the Python-list