crafty-22.0

Discussion of chess software programming and technical issues.

Moderator: Ras

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

crafty-22.0

Post by bob »

The source is now up on the ftp box. While it is pretty clean, it is not the "finished product" yet. Additional cleanup will happen over the next few versions...

Feedback is welcome if there are any compiling issues that crop up. It works fine under gcc and intel's c compiler on linux, and a couple have compiled it on MSVC as well, so it should pose no problems...
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: crafty-22.0

Post by Denis P. Mendoza »

bob wrote:The source is now up on the ftp box. While it is pretty clean, it is not the "finished product" yet. Additional cleanup will happen over the next few versions...

Feedback is welcome if there are any compiling issues that crop up. It works fine under gcc and intel's c compiler on linux, and a couple have compiled it on MSVC as well, so it should pose no problems...
Thanks Bob for the pre-release of the code. I only tried compiling it using MSVC8 and ICC10 (w/out pgo) on windows 32-bit and works fine as you stated. I'll try 64-bit and PGO later!

But Jim (Ablett) already made a speedy ICC 32-bit compile on his homesite. For those who wants to test it. I'll post his links here:

Win32 Intel compiler 10 p.g.o build
http://www.zshare.net/download/788668066888c1/
or
http://mihd.net/xlg94c
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: crafty-22.0

Post by Denis P. Mendoza »

I'm still figuring out how to fix compiling in 64-bit mode. Here's the whole piece of compiler output during my first try:
.

Code: Select all

1>------ Rebuild All started: Project: CRAFTY22, Configuration: Release x64 ------
1>Deleting intermediate and output files for project 'CRAFTY22', configuration 'Release|x64'
1>Compiling...
1>egtb.cpp
1>..\..\egtb.cpp(5392) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5398) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5451) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5456) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5741) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5750) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5765) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5782) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5794) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5796) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5802) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5823) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5824) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5825) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5836) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5851) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5860) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5875) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5897) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5899) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5994) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6007) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6013) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6023) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6031) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6033) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6049) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6050) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6073) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6074) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6080) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6082) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6086) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6265) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1>..\..\egtb.cpp(6266) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1>..\..\egtb.cpp(6440) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
1>..\..\egtb.cpp(6526) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6601) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6602) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6605) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6606) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6626) : error C2109: subscript requires array or pointer type
1>Build log was saved at "file://c:\Documents and Settings\Administrator\Desktop\CRAFTY22\crafty-22.0\CRAFTY22\CRAFTY22\x64\Release\BuildLog.htm"
1>CRAFTY22 - 39 error(s), 3 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

The errors are redundant, so it will take a while to find a solution - I hope :wink:

Anyway, at least it is quite friendly in 32-bit mode. Here's my compile, possibly not as fast as Jim's (with the sources as well)!
http://mihd.net/6spbnd

I hope somebody gives some tips to make a 64-bit compile on ICC or MSVC. Thanks.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty-22.0

Post by bob »

Denis P. Mendoza wrote:
bob wrote:The source is now up on the ftp box. While it is pretty clean, it is not the "finished product" yet. Additional cleanup will happen over the next few versions...

Feedback is welcome if there are any compiling issues that crop up. It works fine under gcc and intel's c compiler on linux, and a couple have compiled it on MSVC as well, so it should pose no problems...
Thanks Bob for the pre-release of the code. I only tried compiling it using MSVC8 and ICC10 (w/out pgo) on windows 32-bit and works fine as you stated. I'll try 64-bit and PGO later!

But Jim (Ablett) already made a speedy ICC 32-bit compile on his homesite. For those who wants to test it. I'll post his links here:

Win32 Intel compiler 10 p.g.o build
http://www.zshare.net/download/788668066888c1/

This is not a "pre-release". It is justs 22.0. There will be no more 22.0 releases, next version will be 22.1... What I meant was that this was the first version with this rewritten engine, and I was/am not sure that it will compile cleanly everywhere as the differences are massive and it is easy enough to break something without knowing when considering all the platforms this runs on... This version has played about 100,000 games over the past week on my cluster, as well as playing online and running thousands of test positions. I'm sure it is playing solidly...

22.1 will have some further cleanup as I am going thru every module, line by line, cleaning up, rewriting where appropriate, and looking for things that don't seem to do what they claim...

or
http://mihd.net/xlg94c
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty-22.0

Post by bob »

Denis P. Mendoza wrote:I'm still figuring out how to fix compiling in 64-bit mode. Here's the whole piece of compiler output during my first try:
.

Code: Select all

1>------ Rebuild All started: Project: CRAFTY22, Configuration: Release x64 ------
1>Deleting intermediate and output files for project 'CRAFTY22', configuration 'Release|x64'
1>Compiling...
1>egtb.cpp
1>..\..\egtb.cpp(5392) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5398) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5451) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5456) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5741) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5750) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5765) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5782) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5794) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5796) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5802) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5823) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5824) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5825) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5836) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5851) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5860) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5875) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5897) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(5899) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(5994) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6007) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6013) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6023) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6031) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6033) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6049) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6050) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6073) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6074) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6080) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6082) : error C2664: 'Lock' : cannot convert parameter 1 from 'volatile int' to 'volatile LONG *'
1>        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\egtb.cpp(6086) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6265) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1>..\..\egtb.cpp(6266) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1>..\..\egtb.cpp(6440) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
1>..\..\egtb.cpp(6526) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6601) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6602) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6605) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6606) : error C2109: subscript requires array or pointer type
1>..\..\egtb.cpp(6626) : error C2109: subscript requires array or pointer type
1>Build log was saved at "file://c:\Documents and Settings\Administrator\Desktop\CRAFTY22\crafty-22.0\CRAFTY22\CRAFTY22\x64\Release\BuildLog.htm"
1>CRAFTY22 - 39 error(s), 3 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

The errors are redundant, so it will take a while to find a solution - I hope :wink:

Anyway, at least it is quite friendly in 32-bit mode. Here's my compile, possibly not as fast as Jim's (with the sources as well)!
http://mihd.net/6spbnd

I hope somebody gives some tips to make a 64-bit compile on ICC or MSVC. Thanks.
what compiler are you using? That is Eugene's code (egtb.cpp) and since he is involved heavily with the compiler, I'm surprised it is producing those errors... it works fine here on both 32 and 64 bit linux platforms, and has been run on a 32 bit windows platform.
jarkkop
Posts: 198
Joined: Thu Mar 09, 2006 2:44 am
Location: Helsinki, Finland

Re: crafty-22.0

Post by jarkkop »

Change

# define lock_t "volatile int"

to

# define lock_t volatile int


in lock.h
User avatar
Jim Ablett
Posts: 2122
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: crafty-22.0

Post by Jim Ablett »

Hi Denis,
hope somebody gives some tips to make a 64-bit compile on ICC or MSVC. Thanks.
The Important Switches you need to use for 64-bit Windows MSVC/Intel are >

Code: Select all

/DNT_i386 /DWIN64 /DNT_INTEREX 
The rest are optional. The problem is you can compile and run x64
successfully (non-smp) with low optimization switches only i.e
go any higher than

Code: Select all

/O1 or /Os
and compiled exe will crash.

Jim.
Guetti

Re: crafty-22.0

Post by Guetti »

Doesn't compile under linux 64-bit amd64:

Code: Select all

%make linux-amd64
make target=LINUX \
                CC=gcc CXX=g++ \
                CFLAGS=' -Wall -pipe \
                -fbranch-probabilities -fomit-frame-pointer -O3 -march=k8' \
                CXFLAGS= \
                LDFLAGS=' -lstdc++' \
                opt=' -DINLINE64 -DCPUS=1' \
                crafty-make
make[1]: Entering directory `/home/andreas/crafty-22.0'
make[2]: Entering directory `/home/andreas/crafty-22.0'
gcc -Wall -pipe \
                -fbranch-probabilities -fomit-frame-pointer -O3 -march=k8 -DINLINE64 -DCPUS=1 -DLINUX -c crafty.c
In file included from chess.h:132,
                 from searchr.c:1,
                 from crafty.c:1:
lock.h:121:1: warning: "lock_t" redefined
In file included from searchr.c:1,
                 from crafty.c:1:
chess.h:131:1: warning: this is the location of the previous definition
In file included from searchr.c:1,
                 from crafty.c:1:
chess.h:353: error: expected specifier-qualifier-list before string constant
chess.h:393: error: expected specifier-qualifier-list before string constant
In file included from crafty.c:1:
searchr.c: In function 'SearchRoot':
searchr.c:179: error: 'SHARED' has no member named 'draw_score'
In file included from crafty.c:2:
search.c: In function 'Search':
search.c:51: error: 'TREE' has no member named 'thread_id'
search.c:52: error: 'SHARED' has no member named 'next_time_check'
search.c:53: error: 'SHARED' has no member named 'next_time_check'
search.c:53: error: 'SHARED' has no member named 'nodes_between_time_checks'
search.c:73: error: 'SHARED' has no member named 'draw_score'
search.c:156: error: 'SHARED' has no member named 'draw_score'
search.c:245: error: 'TREE' has no member named 'stop'
search.c:282: error: 'TREE' has no member named 'stop'
search.c:289: error: 'TREE' has no member named 'stop'
search.c:335: error: 'TREE' has no member named 'stop'
search.c:358: error: 'TREE' has no member named 'stop'
search.c:368: error: 'TREE' has no member named 'stop'
search.c:389: error: 'TREE' has no member named 'stop'
search.c:391: error: 'SHARED' has no member named 'smp_idle'
search.c:392: error: 'SHARED' has no member named 'min_thread_depth'
search.c:393: error: 'TREE' has no member named 'alpha'
search.c:394: error: 'TREE' has no member named 'beta'
search.c:395: error: 'TREE' has no member named 'value'
search.c:396: error: 'TREE' has no member named 'wtm'
search.c:397: error: 'TREE' has no member named 'ply'
search.c:398: error: 'TREE' has no member named 'depth'
search.c:399: error: 'TREE' has no member named 'mate_threat'
search.c:401: error: 'TREE' has no member named 'stop'
search.c:403: error: 'TREE' has no member named 'thread_id'
search.c:429: error: 'SHARED' has no member named 'draw_score'
In file included from crafty.c:3:
thread.c: In function 'Thread':
thread.c:34: error: 'SHARED' has no member named 'max_threads'
thread.c:35: error: 'SHARED' has no member named 'max_threads'
thread.c:35: error: 'TREE' has no member named 'stop'
thread.c:63: error: 'SHARED' has no member named 'splitting'
thread.c:64: error: 'SHARED' has no member named 'parallel_splits'
thread.c:65: error: 'TREE' has no member named 'thread_id'
thread.c:66: error: 'TREE' has no member named 'nprocs'
thread.c:68: error: 'SHARED' has no member named 'max_threads'
thread.c:68: error: 'SHARED' has no member named 'max_thread_group'
thread.c:70: error: 'TREE' has no member named 'siblings'
thread.c:76: error: 'TREE' has no member named 'siblings'
thread.c:77: error: 'TREE' has no member named 'thread_id'
thread.c:78: error: 'TREE' has no member named 'parent'
thread.c:79: error: 'TREE' has no member named 'nprocs'
thread.c:85: error: 'TREE' has no member named 'siblings'
thread.c:87: error: 'TREE' has no member named 'value'
thread.c:90: error: 'TREE' has no member named 'thread_id'
thread.c:91: error: 'SHARED' has no member named 'splitting'
thread.c:103: error: 'SHARED' has no member named 'max_threads'
thread.c:104: error: 'TREE' has no member named 'siblings'
thread.c:105: error: 'TREE' has no member named 'siblings'
thread.c:106: error: 'SHARED' has no member named 'splitting'
thread.c:129: error: 'TREE' has no member named 'thread_id'
thread.c: In function 'CopyFromSMP':
thread.c:150: error: 'TREE' has no member named 'stop'
thread.c:151: error: 'TREE' has no member named 'ply'
thread.c:151: error: 'TREE' has no member named 'ply'
thread.c:173: error: 'TREE' has no member named 'root_move_text'
thread.c:173: error: 'TREE' has no member named 'root_move_text'
thread.c:174: error: 'TREE' has no member named 'used'
thread.c: In function 'CopyToSMP':
thread.c:193: error: 'SHARED' has no member named 'max_threads'
thread.c:195: error: 'TREE' has no member named 'used'
thread.c:200: error: 'TREE' has no member named 'used'
thread.c:209: error: 'TREE' has no member named 'used'
thread.c:211: error: 'SHARED' has no member named 'max_split_blocks'
thread.c:211: error: 'SHARED' has no member named 'max_split_blocks'
thread.c:211: error: 'SHARED' has no member named 'max_split_blocks'
thread.c:213: error: 'TREE' has no member named 'used'
thread.c:214: error: 'TREE' has no member named 'stop'
thread.c:215: error: 'SHARED' has no member named 'max_threads'
thread.c:216: error: 'TREE' has no member named 'siblings'
thread.c:218: error: 'TREE' has no member named 'ply'
thread.c:218: error: 'TREE' has no member named 'ply'
thread.c:219: error: 'TREE' has no member named 'ply'
thread.c:219: error: 'TREE' has no member named 'ply'
thread.c:220: error: 'TREE' has no member named 'ply'
thread.c:220: error: 'TREE' has no member named 'ply'
thread.c:221: error: 'TREE' has no member named 'ply'
thread.c:221: error: 'TREE' has no member named 'ply'
thread.c:222: error: 'TREE' has no member named 'ply'
thread.c:222: error: 'TREE' has no member named 'ply'
thread.c:228: error: 'TREE' has no member named 'ply'
thread.c:229: error: 'TREE' has no member named 'ply'
thread.c:229: error: 'TREE' has no member named 'ply'
thread.c:230: error: 'TREE' has no member named 'ply'
thread.c:256: error: 'TREE' has no member named 'alpha'
thread.c:256: error: 'TREE' has no member named 'alpha'
thread.c:257: error: 'TREE' has no member named 'beta'
thread.c:257: error: 'TREE' has no member named 'beta'
thread.c:258: error: 'TREE' has no member named 'value'
thread.c:258: error: 'TREE' has no member named 'value'
thread.c:259: error: 'TREE' has no member named 'wtm'
thread.c:259: error: 'TREE' has no member named 'wtm'
------ snip---------
etc, etc
Guetti

Re: crafty-22.0

Post by Guetti »

Apparently line 121-124 in lock.h have to be changed:

Code: Select all

#  define lock_t volatile int
//#  define pthread_attr_t  HANDLE
//#  define pthread_t       HANDLE
//#  define thread_t        HANDLE
Furthermore, in line 33 chess.h the "=" in define CPUS=1 is not accpeted in a macro directive

compiles now
Uri Blass
Posts: 10792
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: crafty-22.0

Post by Uri Blass »

bob wrote:The source is now up on the ftp box. While it is pretty clean, it is not the "finished product" yet. Additional cleanup will happen over the next few versions...

Feedback is welcome if there are any compiling issues that crop up. It works fine under gcc and intel's c compiler on linux, and a couple have compiled it on MSVC as well, so it should pose no problems...
looking at the move generator I see the following part repeats again and again and I wonder if you plan to replace it or something bigger by a function as part of the additional cleanup.

Code: Select all

while (moves) {
      to = Advanced(wtm, moves);
      *move++ = temp | (to << 6) | (Abs(PcOnSq(to)) << 15);
      Clear(to, moves);
    }
    Clear(from, piecebd);
Uri