Oliperft

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
jsgroby
Posts: 83
Joined: Mon Mar 24, 2014 12:26 am
Location: Glen Carbon, IL USA

Oliperft

Post by jsgroby »

Has anyone had any trouble compiling and running Oliperft on OSX? I compiled it today with: gcc oliperft.c -o oliperft

There were no compilation errors. When I run the app, I get the following results:

Jeffreys-MacBook-Pro:oliperft jsgroby$ ./oliperft 6 "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1"
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .

1 0 0 3
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0

Nodes: 3 cs: 0 knps: 1


I am using the following:

Jeffreys-MacBook-Pro:oliperft jsgroby$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
User avatar
jsgroby
Posts: 83
Joined: Mon Mar 24, 2014 12:26 am
Location: Glen Carbon, IL USA

Re: Oliperft

Post by jsgroby »

My next step is to tear into the code to see what the issue might be, but I wanted to ask here first in case someone had already discovered something about the code.

Thanks
Jeff
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Oliperft

Post by zullil »

jsgroby wrote:Has anyone had any trouble compiling and running Oliperft on OSX? I compiled it today with: gcc oliperft.c -o oliperft

There were no compilation errors. When I run the app, I get the following results:

Jeffreys-MacBook-Pro:oliperft jsgroby$ ./oliperft 6 "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1"
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .

1 0 0 3
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0

Nodes: 3 cs: 0 knps: 1


I am using the following:

Jeffreys-MacBook-Pro:oliperft jsgroby$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
I'm using OS X 10.7.

Compiles with clang but doesn't work correctly. Compiles with gcc-4.8 and seems to work fine.

Code: Select all

ProcyonLeo: ~/Downloads] /usr/bin/clang oliperft.c -o oliperft
ProcyonLeo: ~/Downloads] ./oliperft 6 "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" 
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .

 1     0      0           3
 2     0      0           0
 3     0      0           0
 4     0      0           0
 5     0      0           0
 6     0      0           0

Nodes: 3 cs: 0 knps: 1
ProcyonLeo: ~/Downloads] gcc oliperft.c -o oliperft
ProcyonLeo: ~/Downloads] ./oliperft 6 "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" 
 r . . . k . . r
 p . p p q p b .
 b n . . p n p .
 . . . P N . . .
 . p . . P . . .
 . . N . . Q . p
 P P P B B P P P
 R . . . K . . R

 1     0      0          48
 2     0      0        2039
 3     0      0       97862
 4     0     12     4085603
 5     0    305   193690690
 6     0  11185  8031647685

Nodes: 8229523927 cs: 11186 knps: 73569
ProcyonLeo: ~/Downloads] /usr/bin/clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
ProcyonLeo: ~/Downloads] gcc --version
gcc (MacPorts gcc48 4.8.2_0) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
User avatar
jsgroby
Posts: 83
Joined: Mon Mar 24, 2014 12:26 am
Location: Glen Carbon, IL USA

Re: Oliperft

Post by jsgroby »

Thanks. I will update my gcc version.

Jeff
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Oliperft

Post by zullil »

jsgroby wrote:Thanks. I will update my gcc version.

Jeff
gcc on an OS X system now points to clang, right? Try a gcc from Macports, for example.