Page 1 of 1
Crafty source
Posted: Wed Sep 26, 2012 3:37 pm
by bob
Several have been asking about 23.5. Our FTP machine slowly went senile. I have moved everything over to our departmental web server, which can be accessed here:
http://www.cis.uab.edu/hyatt/crafty
The source stuff is in the "source" directory there, as always. This greatly simplifies maintaining this (for me). Automatic backups. This filesystem is remotely mounted so I can copy to it directly when a new version is ready, etc...
23.5 is available there. If you have any problems compiling or running, let me know. I've done a lot of cleaning up, including moving to "int64_t" or "uint64_t" rather than "long long" for 64 bit values.
Re: Crafty source
Posted: Wed Sep 26, 2012 3:57 pm
by zullil
bob wrote:Several have been asking about 23.5. Our FTP machine slowly went senile. I have moved everything over to our departmental web server, which can be accessed here:
http://www.cis.uab.edu/hyatt/crafty
The source stuff is in the "source" directory there, as always. This greatly simplifies maintaining this (for me). Automatic backups. This filesystem is remotely mounted so I can copy to it directly when a new version is ready, etc...
23.5 is available there. If you have any problems compiling or running, let me know. I've done a lot of cleaning up, including moving to "int64_t" or "uint64_t" rather than "long long" for 64 bit values.
Thanks, Bob.
Re: Crafty source
Posted: Wed Sep 26, 2012 5:31 pm
by pocopito
Thanks Robert
It compiled with some warnings on fedora 17 64b, gcc-4.7.
This is the output, just in case is of any use:
Code: Select all
$ make linux
make target=LINUX \
CC=gcc CXX=g++ \
CFLAGS=' -Wall -pipe -O3 \
-pg -fno-gcse -mpreferred-stack-boundary=8' \
CXFLAGS= \
LDFLAGS=' -pg -lpthread -lstdc++' \
opt=' -DINLINE64 -DCPUS=8' \
crafty-make
gcc -Wall -pipe -O3 \
-pg -fno-gcse -mpreferred-stack-boundary=8 -DINLINE64 -DCPUS=8 -DLINUX -c crafty.c
In file included from crafty.c:27:0:
utility.c: In function ‘Kibitz’:
utility.c:2322:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat]
utility.c:2325:13: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat]
In file included from crafty.c:27:0:
utility.c: In function ‘Trace’:
utility.c:2416:9: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat]
In file included from crafty.c:41:0:
interrupt.c: In function ‘Interrupt’:
interrupt.c:75:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat]
interrupt.c:87:11: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat]
In file included from crafty.c:45:0:
option.c: In function ‘Option’:
option.c:1822:5: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘size_t’ [-Wformat]
option.c:1825:7: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘size_t’ [-Wformat]
In file included from crafty.c:45:0:
option.c:2396:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ [-Wformat]
g++ -c -DINLINE64 -DCPUS=8 -DLINUX egtb.cpp
gcc -pg -lpthread -lstdc++ -o crafty crafty.o egtb.o -lm
Re: Crafty source
Posted: Wed Sep 26, 2012 6:04 pm
by ZirconiumX
chess.h required some changes for me:
Code: Select all
#if !defined(IPHONE)
# include <malloc.h>
#endif
should become
Code: Select all
#if !defined(__APPLE__)
# include <malloc.h>
#endif
Build log:
Code: Select all
|| make target=FreeBSD \
|| CC=gcc CXX=g++ \
|| CFLAGS='-Wall -pipe -O3' \
|| CXFLAGS='-Wall -pipe -O3' \
|| LDFLAGS= \
|| LIBS='-lstdc++' \
|| opt='' \
|| crafty-make
|| gcc -Wall -pipe -O3 -DFreeBSD -c crafty.c
|| In file included from search.c:1,
|| from crafty.c:13:
chess.h|389| warning: parameter names (without types) in function declaration
chess.h|390| warning: parameter names (without types) in function declaration
chess.h|391| warning: parameter names (without types) in function declaration
chess.h|393| warning: parameter names (without types) in function declaration
chess.h|394| warning: parameter names (without types) in function declaration
|| In file included from crafty.c:13:
|| search.c: In function 'Search':
search.c|17| warning: unused variable 'start_nodes'
|| In file included from crafty.c:14:
|| thread.c: In function 'ThreadInit':
thread.c|283| warning: cast from pointer to integer of different size
thread.c|285| warning: cast from pointer to integer of different size
thread.c|286| warning: cast from pointer to integer of different size
thread.c|289| warning: cast from pointer to integer of different size
thread.c|295| warning: cast from pointer to integer of different size
|| g++ -c -Wall -pipe -O3 -DFreeBSD egtb.cpp
|| egtb.cpp: In function 'void* PvMalloc(size_t)':
egtb.cpp|334| warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
|| egtb.cpp: In function 'void VInitEnumerations()':
egtb.cpp|1270| warning: format '%d' expects type 'int', but argument 3 has type 'ULONG'
egtb.cpp|1274| warning: format '%d' expects type 'int', but argument 3 has type 'ULONG'
egtb.cpp|1281| warning: format '%d' expects type 'int', but argument 4 has type 'ULONG'
egtb.cpp|1288| warning: format '%d' expects type 'int', but argument 4 has type 'ULONG'
egtb.cpp|1298| warning: format '%d' expects type 'int', but argument 5 has type 'ULONG'
egtb.cpp|1307| warning: format '%d' expects type 'int', but argument 5 has type 'ULONG'
egtb.cpp|1310| warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
|| egtb.cpp: In function 'int FCheckExtentExistance(char*, int, color, int)':
egtb.cpp|6303| warning: unused variable 'fWasError'
egtb.cpp|6304| warning: unused variable 'block'
egtb.cpp|6305| warning: unused variable 'rgbBuffer'
|| egtb.cpp: In static member function 'static INDEX T42<piw1, piw2, piw3, pib1>::IndCalcB(square*, square*, square, int) [with int piw1 = 5, int piw2 = 5, int piw3 = 1, int pib1 = 5]':
egtb.cpp|3248| warning: control may reach end of non-void function 'unsigned int IndEnPassant21B(square, square, square, square)' being inlined
|| tbdecode.h: At global scope:
tbdecode.h|771| warning: 'int comp_tell_blocks(decode_info*)' defined but not used
egtb.cpp|6097| warning: 'int TbtProbeTable(int, color, INDEX)' defined but not used
|| gcc -o crafty crafty.o egtb.o -lm -lstdc++
Matthew:out
Re: Crafty source
Posted: Wed Sep 26, 2012 6:53 pm
by Giorgio Medeot
I think you should use macros such as PRIu64, SCNu64 (repectively for printf and scanf family functions) and the like, when dealing with exact legth data types, while for MSVC you define:
Code: Select all
#define PRIu64 "I64u"
#define SCNu64 "I64u"
edit: sorry, I see now the warnings about data types are in egtb.cpp, so maybe not your own code?
Re: Crafty source
Posted: Wed Sep 26, 2012 7:58 pm
by Peter Skinner
bob wrote:Several have been asking about 23.5. Our FTP machine slowly went senile. I have moved everything over to our departmental web server, which can be accessed here:
http://www.cis.uab.edu/hyatt/crafty
The source stuff is in the "source" directory there, as always. This greatly simplifies maintaining this (for me). Automatic backups. This filesystem is remotely mounted so I can copy to it directly when a new version is ready, etc...
23.5 is available there. If you have any problems compiling or running, let me know. I've done a lot of cleaning up, including moving to "int64_t" or "uint64_t" rather than "long long" for 64 bit values.
I also have the source and pre-made Win32/64 exe's at
http://www.kikrtech.com.
Peter
Re: Crafty source
Posted: Thu Sep 27, 2012 1:28 pm
by Dirt
Hey, thanks for that. It seemed to want the Intel compiler by default so I had given up.