Newbie compile & run issue with stockfish

Discussion of chess software programming and technical issues.

Moderator: Ras

Michiel Koorn

Newbie compile & run issue with stockfish

Post by Michiel Koorn »

I just managed to get stockfish to compile in VS 2008 express. For me that is a first success. I ran it vs the downloaded version in arena. Nodes per second is lower by a factor 3-4. Clearly something is wrong, probably in compiler settings or else in arena. Anybody any suggestions?
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Newbie compile & run issue with stockfish

Post by jwes »

Michiel Koorn wrote:I just managed to get stockfish to compile in VS 2008 express. For me that is a first success. I ran it vs the downloaded version in arena. Nodes per second is lower by a factor 3-4. Clearly something is wrong, probably in compiler settings or else in arena. Anybody any suggestions?
Are you compiling a release version?
User avatar
Eelco de Groot
Posts: 4671
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Newbie compile & run issue with stockfish

Post by Eelco de Groot »

Michiel Koorn wrote:I just managed to get stockfish to compile in VS 2008 express. For me that is a first success. I ran it vs the downloaded version in arena. Nodes per second is lower by a factor 3-4. Clearly something is wrong, probably in compiler settings or else in arena. Anybody any suggestions?
Hello Michiel,

Possibly you are running a debug version that includes all the Asserts in the code? At the top of the Visual C++ interface on the Toolbar after the green triangle (I have Visual C++ 2005 but should be similar) you can choose to build a Debug, or Release version. The Release version I estimated much faster though, I thought more than the factor three or four? But this is for Visual C++ 2005 and it is some time ago I made a Debug version.

Regards, Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Michiel Koorn

Re: Newbie compile & run issue with stockfish

Post by Michiel Koorn »

I tried, both debug and release have the same issue.
Edit: ponder is off for both
Joost Buijs
Posts: 1641
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: Newbie compile & run issue with stockfish

Post by Joost Buijs »

Michiel Koorn wrote:Nodes per second is lower by a factor 3-4. Clearly something is wrong, probably in compiler settings or else in arena. Anybody any suggestions?
Maybe it has something to do with 32 vs 64 bit?
According to the MS website the express version of C++ only supports 32 bits code generation.
I can also imagine that the optimizer of the express compiler is not as good as the one from the commercial compiler.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Newbie compile & run issue with stockfish

Post by jwes »

I'm using visual studio 2005 express and my release version using all defaults is ~ 20% slower.
Michiel Koorn

Re: Newbie compile & run issue with stockfish

Post by Michiel Koorn »

Using a different compiler seems to have solved this. Either the compiler itself or the settings, who knows. I don't care
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: Newbie compile & run issue with stockfish

Post by Desperado »

Michiel Koorn wrote:Using a different compiler seems to have solved this. Either the compiler itself or the settings, who knows. I don't care
Which compiler do you use now ?
Michiel Koorn

Re: Newbie compile & run issue with stockfish

Post by Michiel Koorn »

2005
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: Newbie compile & run issue with stockfish

Post by Desperado »

thx for reply.

By the way. it is possible to get 64-bit target compiles with
vs express 2008. but not by default.

you can find the information here:

http://jenshuebel.wordpress.com/2009/02 ... t-targets/

- first you need the windows sdk (download,install)
- second the registry entries must be updated (you can also find a
batch file to download (link above) which is doing the job).

michael