Compiling and running Scorpio in Linux 64 bit

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Re: Compiling and running Scorpio in Linux 64 bit

Postby Volker Pittlik » 21 Sep 2008, 13:19

Ilari Pihlajisto wrote:...let's hope Daniel Shawul uploads the patched version on his website. Does he frequent these forums?


From time to time yes. I'll also inform him by e-mail.

...me and my friend (who's not a chess player, but a brilliant software designer) are developing a free cross-platform chess gui for Xboard and Uci engines.


:!:

We already have the basics done, and can run games between two engines,


:!: :!:

... But stay tuned, ...


I certainly will. If feature requests are still accepted: I would like an comfortably option to run test suites from epd files.

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Compiling and running Scorpio in Linux 64 bit

Postby Ilari Pihlajisto » 21 Sep 2008, 14:49

Volker Pittlik wrote:I certainly will. If feature requests are still accepted: I would like an comfortably option to run test suites from epd files.

Volker


Requests will always be accepted. They are assigned a priority based on relevance and estimated man-hours. Our design is very flexible, so it allows new features and big changes to be implemented with ease. For example adding support for Chess960 and Capablanca chess was pretty straightforward.
User avatar
Ilari Pihlajisto
 
Posts: 78
Joined: 18 Jul 2005, 06:58

Re: Compiling and running Scorpio in Linux 64 bit

Postby Daniel Shawul » 22 Sep 2008, 09:13

Hi all
I have checked this thread some time ago but my limited knowledge on platform dependent issues prevents me from making any contribution. I checked some time ago that scorpio works on linux 32bit but never had the chance to see if it worked on 64bit machines. I know I can depend on the compiler guru to do that for me:)

I should mention that there is a time failure issue if you use 4men bitbases only. That problem and Ilari's fix will be uploaded tommorrow.

To Ilari: Thanks a lot for the fix! Few programmers rarely do fix other people's engines. I admire your work on Sloppy and good luck with the new GUI.

best to all
Daniel
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: Compiling and running Scorpio in Linux 64 bit

Postby Ilari Pihlajisto » 22 Sep 2008, 10:37

Daniel Shawul wrote:Hi all
I have checked this thread some time ago but my limited knowledge on platform dependent issues prevents me from making any contribution. I checked some time ago that scorpio works on linux 32bit but never had the chance to see if it worked on 64bit machines. I know I can depend on the compiler guru to do that for me:)


Actually there weren't any platform-dependent issues, but compiler-dependent and standards-conformance issues. You can eliminate most of these even on Windows if you use the MinGW port of GCC in addition to any compilers you're already using. The biggest issue was obeying the ISO C++ standard (using the types in inttypes.h instead of "long long", etc.), about witch g++ nags a lot if you turn compiler warnings up.

g++ also warned about code that wouldn't make sense on any platform, like the "commands[command_num++];" lines in scorpio.cpp.

To Ilari: Thanks a lot for the fix! Few programmers rarely do fix other people's engines. I admire your work on Sloppy and good luck with the new GUI.

best to all
Daniel


Thanks, I don't usually patch other people's programs because I don't fully understand them. But this was a relatively easy fix. And if you're wondering how to apply patches on Windows, there's the GnuWin build of patch.exe: http://sourceforge.net/project/showfile ... e_id=32165

And thank you for the excellent free EGBB library, which I also use in Sloppy. I'm so glad I didn't have to write something like that myself.
User avatar
Ilari Pihlajisto
 
Posts: 78
Joined: 18 Jul 2005, 06:58

Re: Compiling and running Scorpio in Linux 64 bit

Postby Daniel Shawul » 24 Sep 2008, 19:32

Most of the warning messages appear also using MSVC 98 with higher warning level. I usually use "level 2" which hides these warnings. I am used to some bad styles like if(x = y) than if((x = y) != 0) which I don't want to compiler to spot. Anyway I tried to use the patch but I get this error message
Code: Select all
patching file attack.cpp
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I instaled the first package for windows. Do you know what the problem is?
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: Compiling and running Scorpio in Linux 64 bit

Postby Ilari Pihlajisto » 24 Sep 2008, 20:30

Daniel Shawul wrote:Most of the warning messages appear also using MSVC 98 with higher warning level. I usually use "level 2" which hides these warnings. I am used to some bad styles like if(x = y) than if((x = y) != 0) which I don't want to compiler to spot.


Ah yes, MSVC gives a ton of warnings for Sloppy as well, mostly because it doesn't like the ANSI C functions that I'm using.

Anyway I tried to use the patch but I get this error message
Code: Select all
patching file attack.cpp
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I instaled the first package for windows. Do you know what the problem is?


Wow, that's obviously a bug in the program (otherwise an assert wouldn't fail). It's probably the line break issue, which can be solved by applying the patch in binary mode: "patch < scorpio_202_fix.patch --verbose --binary"

I could have also just given you the modified sources, but I think patches are better because they're small, can often be applied to multiple revisions of the source tree, and it's easier to see what was changed.
User avatar
Ilari Pihlajisto
 
Posts: 78
Joined: 18 Jul 2005, 06:58

Re: Compiling and running Scorpio in Linux 64 bit

Postby Daniel Shawul » 24 Sep 2008, 20:58

That worked. You are indeed a solutions person:) I actually went on removing the - lines and adding + lines manually and finished. I also took care of some other compiler warnings spotted by msvc so I am going to keep this since the result looks the same. Thanks!
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: Compiling and running Scorpio in Linux 64 bit

Postby Daniel Shawul » 24 Sep 2008, 21:44

It is uploaded now. Download here http://dshawul.googlepages.com/home
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: Compiling and running Scorpio in Linux 64 bit

Postby Ilari Pihlajisto » 24 Sep 2008, 23:10

Cool, thanks. That's a great chess engine you've got there.

Btw, have you ever considered maintaining Scorpio with a version control system? I started using the Git vcs with Sloppy (http://repo.or.cz/w/Sloppy.git) a couple of months ago, and it has given a huge improvement to my work flow. It allows me to push fixes easily and apply them to any revision, have as many branches (development versions) as needed, merge said branches easily, view all the changes (commits) I've ever made to the code, and revert those changes if needed. For example, I now have separate branches for evaluation, parallel search, UCI protocol, and bugfixes, and when I have something release-worthy in any branch I can merge said branch with the main branch.
User avatar
Ilari Pihlajisto
 
Posts: 78
Joined: 18 Jul 2005, 06:58

Re: Compiling and running Scorpio in Linux 64 bit

Postby Daniel Shawul » 25 Sep 2008, 04:21

As I have not been using unix systmes, I am not much famililar with the many of the tools it offers for program developement. Well I learned the hard way the advantages of this tools and "software developemtn guidlines" . Once I worte a big project (about 30 000 lines of code) without proper documentation and I have had difficulties to continue after 2 months of suspension. It was not like developing a chess engine where you might remember most of the highly discussed concepts by heart.

I will use git like you do after I figured how it works.

Daniel
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Previous

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 30 guests