iamLovingJerk / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Pychess engine uses only one core #190

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Pychess on dual-or multicore CPU's
2.
3.

What is the expected output? What do you see instead?
Pychess engine will most of the time only use one core of the CPU

What version of the product are you using?
0.6.0.final

Did you use an installed version of PyChess or did you run in from a
tarball/svn?
Installed

Please provide any additional information below.

Original issue reported on code.google.com by andreas...@gmail.com on 16 Aug 2007 at 6:49

GoogleCodeExporter commented 9 years ago
http://mail.python.org/pipermail/python-list/2004-October/285689.html

Original comment by gbtami on 16 Aug 2007 at 8:35

GoogleCodeExporter commented 9 years ago
Yeah, the GIL won't let us do it. At least not with threads.
However, the GIL has already forced us to put PyChess Engine in a separate 
process,
so I guess splitting it in multiple processes would be possible as well.
It does cut some performance of course to talk between processes, but I guess 
it is
doable.

Original comment by lobais on 17 Aug 2007 at 12:44

GoogleCodeExporter commented 9 years ago
I think it's not a big problem. Pychess is an entertainment program, not a 
scientific
or like.

Original comment by gbtami on 17 Aug 2007 at 5:59

GoogleCodeExporter commented 9 years ago
Indeed, but perhaps somebody would find it interesting to implement.
There is a guide on parallel tree search on
http://www.cis.uab.edu/info/faculty/hyatt/search.html (The fourth link in Wiki 
->
Links -> On Chess Programming.

Original comment by lobais on 18 Aug 2007 at 10:32

GoogleCodeExporter commented 9 years ago
An open letter to Guido van Rossum: Mr Rossum, tear down that
GIL!(http://blog.snaplogic.org/?p=94)

Guido's answare: It isn't Easy to Remove the GIL
(http://www.artima.com/weblogs/viewpost.jsp?thread=214235)

And a free lib if someone want to work on paralellizing pychess:
http://www.parallelpython.com/

Original comment by gbtami on 11 Sep 2007 at 8:07

GoogleCodeExporter commented 9 years ago
If we wanted to implement it using processes, we would have to send a lot of 
data
through and from, in order to talk with the transpositiontable.
Do you think this could in any way be made efficient?

Original comment by lobais on 11 Sep 2007 at 2:44

GoogleCodeExporter commented 9 years ago
You are right. Maybe paralellizing and running the pychess engine in IronPython 
is
the way to go.

Original comment by gbtami on 22 Sep 2007 at 1:39

GoogleCodeExporter commented 9 years ago
Yeah.. Ironpython/Jython would be interesting indeed, but it would open for a 
lot of
temptations in the direction of using more and more C#/Java features..

What about having the transpos in a database.. Couldn't that actually be fairly
efficient..

Original comment by lobais on 22 Sep 2007 at 1:56

GoogleCodeExporter commented 9 years ago
Uh, just found out, that Rybka uses processes rather than threads:
http://rybkachess.com/index.php?auswahl=FAQ+for+v+2.x

Original comment by lobais on 31 Dec 2007 at 1:47

GoogleCodeExporter commented 9 years ago
These are some interesting libraries: 
http://wiki.python.org/moin/ParallelProcessing

Original comment by lobais on 31 Dec 2007 at 12:36

GoogleCodeExporter commented 9 years ago
Especially this library, POSH - http://poshmodule.sourceforge.net/ - which 
places
objects in shared memory, seems to do exactly what we need.

Original comment by lobais on 1 Jan 2008 at 10:37