Life In 19x19 http://prod.lifein19x19.com/ |
|
Kombilo 0.7 released http://prod.lifein19x19.com/viewtopic.php?f=9&t=5715 |
Page 1 of 2 |
Author: | ugoertz [ Sun Mar 25, 2012 1:27 am ] |
Post subject: | Kombilo 0.7 released |
After a long break, a new Kombilo release is available. It is overall faster and has several new features (search for move sequences, search in variations, date profile, tags for games, use of multi-core processors ...). On the downside, at the moment it will work only on Linux out of the box. While Kombilo was developped with cross-platform tools and in principle should work on Windows and Mac OS X, I was not able to test this, and experience tells that some fiddling will be required to get going. Reports from Pythonistas who succeed in building it on Windows/Mac will be appreciated (as well as reports from Linux people, of course). See http://www.u-go.net/kombilo/ for further details and instructions. The documentation is also available online at http://dl.u-go.net/kombilo/doc/. Best regards Ulrich |
Author: | RBerenguel [ Sun Mar 25, 2012 3:47 am ] |
Post subject: | Re: Kombilo 0.7 released |
Hi Ulrich, Mac OS here. After wrestling with my Pythons (I have 2.6, 7, 3 and 3.1), I end up with Code: Traceback (most recent call last): File "src/kombilo.py", line 47, in <module> from kombiloNG import * File "/Users/ruben/Downloads/ZIPS/kombilo/src/kombiloNG.py", line 46, in <module> import libkombilo as lk File "/Users/ruben/Downloads/ZIPS/kombilo/src/libkombilo.py", line 25, in <module> _libkombilo = swig_import_helper() File "/Users/ruben/Downloads/ZIPS/kombilo/src/libkombilo.py", line 17, in swig_import_helper import _libkombilo ImportError: No module named _libkombilo This does not look like a fault in my pythons... Edit: forgot the last error line... the relevant one ![]() |
Author: | ugoertz [ Sun Mar 25, 2012 4:33 am ] |
Post subject: | Re: Kombilo 0.7 released |
Hi, RBerenguel wrote: Hi Ulrich, Mac OS here. After wrestling with my Pythons (I have 2.6, 7, 3 and 3.1), I end up with Code: Traceback (most recent call last): ImportError: No module named _libkombilo This does not look like a fault in my pythons... The right Python version for Kombilo is 2.7. I guess I should state this somewhere explicitly ... About the ImportError: The libkombilo extension is missing so far. This is the C++ extension module which handles the pattern search. Did you try to compile it? In the lk subdirectory, you could try Code: python setup.py build_ext This will depend on (at least) the presence of the g++ compiler, the python development and sqlite3-dev libraries. I do not know much about Mac OS X, but since it is unix based, all these might be available without too much pain. (If you cloned the mercurial repository rather than using the tar.gz archive, you will have to use SWIG before.) See the notes in the documentation starting at http://dl.u-go.net/kombilo/doc/manual.html#libkombilo for a few more details. If the python setup.py build_ext did run through, the only thing left to do is to copy the _libkombilo.so in lk/build/lib.SOMETHING/ to the src subdirectory (and also copying lk/libkombilo.py to src/ if you cloned the repository and ran SWIG yourself). It would be great if you made this work! One more note: see http://dl.u-go.net/kombilo/doc/manual.html#the-kombilo-cfg-configuration-file how to deal with the situation of having only one mouse button. Best, Ulrich |
Author: | amnal [ Sun Mar 25, 2012 6:25 am ] |
Post subject: | Re: Kombilo 0.7 released |
Quote: This will depend on (at least) the presence of the g++ compiler, the python development and sqlite3-dev libraries. I do not know much about Mac OS X, but since it is unix based, all these might be available without too much pain. Apple's 'developer tools', which most obviously is their IDE 'xcode', include the gcc and g++ compilers, plus other stuff you tend to need like make. Without these, it's a massive pain trying to do anything, but it should be possible to download xcode via the app store if you're on OSX 10.7. If you're still on 10.6 and don't already have them, xcode should be available on your original install cds/dvds, but otherwise it's annoyingly difficult to get it. Also, Apple's gcc/g++ are a little different to the pure GNU ones, and I don't know enough to know how important the difference is (other than that it breaks my code...). There are GNU versions are available at http://hpc.sourceforge.net/, which may work better. And finally, kombilo is excellent, thanks for the new release ![]() |
Author: | RBerenguel [ Sun Mar 25, 2012 7:53 am ] |
Post subject: | Re: Kombilo 0.7 released |
Almost... got it. Compiled the .so correctly (needed to copy the header files for boost, since I was totally unable to find them). After compiling libkombilo and copying the .so, I replaced the libkombilo.py in src/ for the one in lk, since I had run swig and I had some swig complaint. Then I ran kombilo... X11 started... And segmentation fault. Oh well. Almost there... |
Author: | ugoertz [ Sun Mar 25, 2012 11:08 am ] |
Post subject: | Re: Kombilo 0.7 released |
RBerenguel wrote: Almost... got it. Compiled the .so correctly (needed to copy the header files for boost, since I was totally unable to find them). After compiling libkombilo and copying the .so, I replaced the libkombilo.py in src/ for the one in lk, since I had run swig and I had some swig complaint. Then I ran kombilo... X11 started... And segmentation fault. Oh well. Almost there... Hmmm ... that's too bad. To narrow down the problem, you could try, in a directory where you have libkombilo.py and _libkombilo.so, to start python and do: Code: Python 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import libkombilo >>> gl = libkombilo.GameList('abc') >>> Here abc should be a non-existing file name. (This should create the file abc.) If this works, then it looks as if the segfault is not related to the libkombilo extension but to something else. Another thing you could try, if you are willing to dig into this, is to compile only the C++ program. In the lk/examples directory, there is a program cpptest.cpp. You will have to edit the path in line 11. This should be the name of a directory containing some sgf files. Then compile using: Code: g++ -Wall -g -O0 -o cpptest cpptest.cpp ../search.cpp ../sgfparser.cpp ../algos.cpp ../abstractboard.cpp ../pattern.cpp -lsqlite3 -lboost_system -lboost_filesystem You will need the boost-system and boost-filesystem libraries for this. You could also use the Makefile to compile, but the above line leaves out the parallelization of the code - this is probably a good idea for testing. You can then run Code: ./cpptest -p to "process" the games in the specified directory and run some searches on it. In fact, maybe it is worth trying to discard the parallelization for the Python extension as well. To do this, in the lk/setup.py delete the '-fopenmp' item in line 8, and delete line 9 (extra_link_args ...) entirely. Then run python setup.py build_ext again, and copy the new _libkombilo.so to src/. Best Ulrich |
Author: | RBerenguel [ Sun Mar 25, 2012 11:42 am ] |
Post subject: | Re: Kombilo 0.7 released |
Libkombilo passed the first test, so I assume the .so is correct (on first try at least...) It generated abc, abc1 and abc2 files in the directory, only one of them has anything (abc), it's an sqlite database (I guess you knew). I can't read very well Apple Crash reports, but the last "thing" going around is related to Tkinter: Code: Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 Tk 0x000000010225eccd Tk_GetImageMasterData + 18 There are a few more threads in this list (40) I guess now we could go the crappy way and add "prints" to the code trying to pinpoint the faulty function... With C I'd just use the gnu debugger or valgrind... |
Author: | ugoertz [ Mon Mar 26, 2012 2:07 am ] |
Post subject: | Re: Kombilo 0.7 released |
Hello, RBerenguel wrote: Libkombilo passed the first test, so I assume the .so is correct (on first try at least...) It generated abc, abc1 and abc2 files in the directory, only one of them has anything (abc), it's an sqlite database (I guess you knew). That sounds good. Quote: I can't read very well Apple Crash reports, but the last "thing" going around is related to Tkinter: Code: Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 Tk 0x000000010225eccd Tk_GetImageMasterData + 18 There are a few more threads in this list (40) I guess now we could go the crappy way and add "prints" to the code trying to pinpoint the faulty function... With C I'd just use the gnu debugger or valgrind... Let's first try whether the basic Tkinter functionality is there. Could you try the following in a python interpreter, in the src directory? Code: Python 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from Tkinter import * >>> from ttk import * >>> from PIL import Image, ImageTk >>> import Pmw >>> root = Tk() >>> f = Frame(root) >>> im = ImageTk.PhotoImage(file='./src/icons/mouse.png') >>> b = Button(image=im) >>> b.pack() >>> root.destroy() >>> The root = Tk() line should bring up a new window. The b.pack() line should display a button inside the window (and probably shrink the window to the size of the button). Best, Ulrich |
Author: | RBerenguel [ Mon Mar 26, 2012 2:43 am ] |
Post subject: | Re: Kombilo 0.7 released |
Gotcha, everything was fine until Code: >>> im=ImageTk.PhotoImage(file='./icons/mouse.png') Segmentation fault PS: Since I was already in ./src I removed that from the path PPS: Kombilo05 no longer works, too. PIL to blame? |
Author: | RBerenguel [ Mon Mar 26, 2012 7:57 am ] |
Post subject: | Re: Kombilo 0.7 released |
An addition is the fact that googling for this particular problem returns a ton of results... And looks like a "known bug", spread across *NIX flavours... |
Author: | crux [ Mon Mar 26, 2012 10:40 am ] |
Post subject: | Re: Kombilo 0.7 released |
The previous version had the three GUI areas in separate windows, which worked better for me. Now, with a 4:3 monitor, you get a tiny board in the middle with wasted space beneath it, with two vertical panels on either side. The only information of value on the left side is the display of previous searches. If that could move into one of the tabs on the right (or even be duplicated there), I could hide the left entirely and I'd be happy. |
Author: | ugoertz [ Mon Mar 26, 2012 11:34 am ] |
Post subject: | Re: Kombilo 0.7 released |
RBerenguel wrote: Gotcha, everything was fine until Code: >>> im=ImageTk.PhotoImage(file='./icons/mouse.png') Segmentation fault OK, so now we know more precisely what causes this problem ... I also found some reports about this, but no solution ... Quote: PPS: Kombilo05 no longer works, too. PIL to blame? Maybe there is one more thing we could try. In Kombilo05, in the file board1.py, could you delete line 35 (import ImageTk) and try whether it works? You will not get the nice stones, but if ImageTk is the only problem, then for the icons I could work around it. Best, Ulrich |
Author: | ugoertz [ Mon Mar 26, 2012 11:38 am ] |
Post subject: | Re: Kombilo 0.7 released |
crux wrote: The previous version had the three GUI areas in separate windows, which worked better for me. Now, with a 4:3 monitor, you get a tiny board in the middle with wasted space beneath it, with two vertical panels on either side. The only information of value on the left side is the display of previous searches. If that could move into one of the tabs on the right (or even be duplicated there), I could hide the left entirely and I'd be happy. Thanks for the feedback. I am still not sure which window layout works best for me, so this comment is very helpful. For some reason I had problems with the separate windows, in particular saving the size and position of the "data window". So it seems better to move the search history to the middle column, below the board? That would be easy to do. Best, Ulrich |
Author: | RBerenguel [ Mon Mar 26, 2012 11:42 am ] |
Post subject: | Re: Kombilo 0.7 released |
After a full system (system=MacPorts) upgrade, no luck. The image part coming from PIL causes a segmentation fault ![]() |
Author: | ugoertz [ Mon Mar 26, 2012 12:26 pm ] |
Post subject: | Re: Kombilo 0.7 released |
ugoertz wrote: RBerenguel wrote: PPS: Kombilo05 no longer works, too. PIL to blame? Maybe there is one more thing we could try. In Kombilo05, in the file board1.py, could you delete line 35 (import ImageTk) and try whether it works? You will not get the nice stones, but if ImageTk is the only problem, then for the icons I could work around it. One more suggestion which should avoid the use of PIL entirely: If in Kombilo05, in the file board1.py you delete not only line 35, but all of lines 32 to 38 (try: ... pass), and then start the v.py script - does it work and can you place stones on the board? Best regards Ulrich |
Author: | RBerenguel [ Mon Mar 26, 2012 1:19 pm ] |
Post subject: | Re: Kombilo 0.7 released |
ugoertz wrote: ugoertz wrote: RBerenguel wrote: PPS: Kombilo05 no longer works, too. PIL to blame? Maybe there is one more thing we could try. In Kombilo05, in the file board1.py, could you delete line 35 (import ImageTk) and try whether it works? You will not get the nice stones, but if ImageTk is the only problem, then for the icons I could work around it. One more suggestion which should avoid the use of PIL entirely: If in Kombilo05, in the file board1.py you delete not only line 35, but all of lines 32 to 38 (try: ... pass), and then start the v.py script - does it work and can you place stones on the board? Best regards Ulrich This does the trick for kombilo05! ![]() ![]() |
Author: | crux [ Mon Mar 26, 2012 2:15 pm ] |
Post subject: | Re: Kombilo 0.7 released |
ugoertz wrote: So it seems better to move the search history to the middle column, below the board? That would be easy to do. I was thinking move it into the tabs area (where you have Statistics/Options/Game Info etc. already). If I shrink the left column to zero, the board already occupies the full height of the screen (which is how I like it). |
Author: | crux [ Mon Mar 26, 2012 3:03 pm ] |
Post subject: | Re: Kombilo 0.7 released |
Another suggestion: double clicking on a game in the game list should switch focus to the board display so you can navigate the game using cursor keys. |
Author: | ugoertz [ Tue Mar 27, 2012 12:16 am ] |
Post subject: | Re: Kombilo 0.7 released |
RBerenguel wrote: This does the trick for kombilo05! ![]() ![]() Fine, that's good news. I will make a new version which optionally does not use PIL. (Might take a few days.) Best regards Ulrich |
Author: | ugoertz [ Tue Mar 27, 2012 12:19 am ] |
Post subject: | Re: Kombilo 0.7 released |
crux wrote: ugoertz wrote: So it seems better to move the search history to the middle column, below the board? That would be easy to do. I was thinking move it into the tabs area (where you have Statistics/Options/Game Info etc. already). If I shrink the left column to zero, the board already occupies the full height of the screen (which is how I like it). I see. I will add an option to have the search history as another tab (or should it be below the tabs?). The other suggestion (double-click takes focus to the board) is also very good. Best regards Ulrich |
Page 1 of 2 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |