Compiling Crafty 21.6 to 64-bit

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Compiling Crafty 21.6 to 64-bit

Post by Denis P. Mendoza »

Hey Master Jim (Ablett) or any compiling guru, any tips to compile Crafty 21.6 to 64-bit. Compiling Crafty on 32-bit is ok on all my compilers except when I switch to 64-bit. Are there other line tweaks on the codes to fix this problem? Jim's Crafty tips works perfect on 32-bit, but this will be the first time for me to build a Crafty 64-bit version.

Here are my command lines:
/Ox /Ob2 /Oi /Ot /Oy /GT /GL /D "WIN64" /D "NDEBUG" /D "_CONSOLE" /D "EGTB6" /D "CPUS=8" /D "SMP" /D "_VC80_UPGRADE=0x0600" /D "_MBCS" /GF /FD /EHsc /MT /Zp16 /GS- /Gy /fp:fast /Fp".\Release/crafty.pch" /Fo".\Release/" /Fd".\Release/" /W3 /nologo /c /Wp64 /TP /errorReport:prompt

In MSVC 2005, here's the output compiling details/errors:


1>------ Rebuild All started: Project: crafty, Configuration: Release x64 ------
1>Deleting intermediate and output files for project 'crafty', configuration 'Release|x64'
1>Compiling...
1>egtb.cpp
1>.\egtb.cpp(5581) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(5902) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(5919) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(6274) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1>.\egtb.cpp(6275) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1>.\egtb.cpp(6360) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(74) : see declaration of 'strcpy'
1>.\egtb.cpp(6362) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
1>.\egtb.cpp(6363) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
1>.\egtb.cpp(6372) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
1>.\egtb.cpp(6374) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
1>.\egtb.cpp(6376) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(6416) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(79) : see declaration of 'strcat'
1>.\egtb.cpp(6418) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(6426) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(6435) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(6449) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
1>.\egtb.cpp(6452) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1>.\egtb.cpp(6526) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string.h(74) : see declaration of 'strcpy'
1>.\egtb.cpp(6314) : warning C4101: 'rgbBuffer' : unreferenced local variable
1>.\egtb.cpp(6312) : warning C4101: 'fWasError' : unreferenced local variable
1>.\egtb.cpp(6313) : warning C4101: 'block' : unreferenced local variable
1>Compiling...
1>crafty.c
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\lock.h(16) : error C2061: syntax error : identifier 'NumaStartThread'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\lock.h(16) : error C2059: syntax error : ';'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\lock.h(16) : error C2059: syntax error : 'type'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\lock.h(24) : warning C4114: same type qualifier used more than once
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\lock.h(24) : error C2628: 'LONG' followed by 'int' is illegal (did you forget a ';'?)
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\lock.h(24) : error C2059: syntax error : '['
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchr.c(274) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchr.c(274) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchr.c(284) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(36) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(36) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(39) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(92) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(131) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(174) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(176) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'long'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(182) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(184) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(184) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(186) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(188) : warning C4311: 'type cast' : pointer truncation from 'void *' to 'long'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(215) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(238) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(238) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(243) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(282) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(282) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(284) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(310) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(310) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(337) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(341) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(341) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(343) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(360) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(360) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(361) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(361) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(379) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\thread.c(389) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(44) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(44) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(53) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(162) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(162) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(167) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(174) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(174) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(175) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(175) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(181) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\searchmp.c(182) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\nextr.c(65) : warning C4047: 'function' : 'volatile LONG *' differs in levels of indirection from 'volatile int'
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\nextr.c(65) : warning C4024: 'Lock' : different types for formal and actual parameter 1
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\nextr.c(82) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\nextr.c(86) : warning C4244: '=' : conversion from 'BITBOARD' to 'int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\nextr.c(87) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\nextr.c(93) : error C2109: subscript requires array or pointer type
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\evaluate.c(3068) : warning C4244: 'initializing' : conversion from 'BITBOARD' to 'unsigned char', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\evaluate.c(3166) : warning C4244: 'initializing' : conversion from 'BITBOARD' to 'unsigned char', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\hash.c(83) : warning C4244: '=' : conversion from 'BITBOARD' to 'unsigned int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\hash.c(84) : warning C4244: '=' : conversion from 'BITBOARD' to 'unsigned int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\hash.c(147) : warning C4244: '=' : conversion from 'BITBOARD' to 'unsigned int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\hash.c(148) : warning C4244: '=' : conversion from 'BITBOARD' to 'unsigned int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\hash.c(290) : warning C4244: '=' : conversion from 'BITBOARD' to 'int', possible loss of data
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\swap.c(111) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
1>c:\documents and settings\administrator\desktop\crafty-21.6\crafty-21.6\utility.c(22) : fatal error C1083: Cannot open include file: 'sys/times.h': No such file or directory
1>Build log was saved at "file://c:\Documents and Settings\Administrator\Desktop\crafty-21.6\crafty-21.6\x64\Release\BuildLog.htm"
1>crafty - 24 error(s), 64 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 8:33 pm
Location: Antalya, Turkey

Re: Compiling Crafty 21.6 to 64-bit

Post by beachknight »

Hi Denis,

Have you observed a speed improvement in your 32-bit-compiles?

I'd like to give them a try as well.

Best,
hi, merhaba, hallo HT
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Compiling Crafty 21.6 to 64-bit

Post by bob »

make sure you change the -DINLINE32 to -DINLINE64, other than that, there should be no changes necessary except to choose your best compiler optimizations.
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Compiling Crafty 21.6 to 64-bit

Post by Denis P. Mendoza »

beachknight wrote:Hi Denis,

Have you observed a speed improvement in your 32-bit-compiles?

I'd like to give them a try as well.

Best,
From my experience, speed improvements depend on specific computers used. Specific compilers must generate optimized code specialized for the processor that executes your program or the architecture used. I managed to bring best results on Intel, than using MSVC 2005 (as I'm still new to it) based on results using my own pc. As an example, Shaun Brewer's speedtest on the last Toga releases will show you what I meant:

Toga 1.3.1 new compiles by Denis Mendoza
-------------------------------------------------------------

TogaII131(DM1-Compile)
TogaII131(DM2-Compile)

The TogaII131(DM1-Compile) can be used for all platforms however TogaII131(DM2-Compile) is faster on the AMD64 platforms tested.


Compile test results - for those that are interested...
-------------------------------------------------------


Please note Toga131-1st has been renamed TogaII131(DM1-Compile) and TogaII131_PIII_32bit renamed TogaII131(DM2-Compile)

All speed differences are compared to the original TogaII1.3beta1 compile by Thomas...


Intel Centrino
--------------

Test 1
1st TogaII131_PIV_32bit 3.61%
2nd Toga131-1st 3.34%
3rd TogaII131_PIII_32bit 3.32%
4th TogaII131_Core_32bit 3.16%

Test 2
1st Toga131-1st 3.65%
2nd TogaII134_Core_32bit 3.61%
3rd TogaII131_PIV_32bit 3.54%
4th TogaII131_PIII_32bit 3.43%


Intel C2D (64-bit XP)
---------------------

1st Toga131-1st 3.54%
2nd TogaII131_PIV_32bit 3.43%
3rd TogaII131_Core_32bit 2.95%
4th TogaII131_PIII_32bit 2.88%


PIV
---

1st TogaII131_PIV_32bit 2.04%
2nd Toga131-1st 1.66%
3rd TogaII131_Core_32bit 0.96%
4th Toga131-SSE2 0.58%


AMD 32-bit
----------

1st TogaII131_PIII_32bit 2.92%
2nd Toga131-1st 2.54%

(The AMD 32-bit Processor did not support the remaining compiles)


PIII
----

1st Toga131-1st 4.97%
2nd TogaII131_PIII_32bit 3.66%

(The PIII Processor did not support the remaining compiles)


AMD 64-bit (64-bit XP)
----------------------

Opteron 185 - Thank you Ray Banks

1st TogaII131_PIII_32bit 1.92%
2nd Toga131-1st 1.30%
3rd TogaII131_PIV_32bit 1.13%
4th TogaII131_Core_32bit 0.26%


XP 4600+ - Thank you Martin Thoresen

1st TogaII131_PIII_32bit 7.02%
2nd TogaII131_PIV_32bit 5.73%
3rd TogaII131_Core_32bit 5.27%
4th Toga131-1st 2.25%


As you can see, it is not always consistent on different computers. But the tests will guide us on using the all-around optimization techniques.
Pls. pm me you pc specs so that I'll build a customized Crafty binary for you. Jim Ablett already made a fast compile though, and I assume Bryan Hoffman or even Peter Skinner later!
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Compiling Crafty 21.6 to 64-bit

Post by Denis P. Mendoza »

bob wrote:make sure you change the -DINLINE32 to -DINLINE64, other than that, there should be no changes necessary except to choose your best compiler optimizations.
Sorry Bob, but I couldn't find a -DINLINE32 on the code!
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Compiling Crafty 21.6 to 64-bit

Post by bob »

Denis P. Mendoza wrote:
bob wrote:make sure you change the -DINLINE32 to -DINLINE64, other than that, there should be no changes necessary except to choose your best compiler optimizations.
Sorry Bob, but I couldn't find a -DINLINE32 on the code!
There are several #if defined(INLINE32) and #if defined(INLINE64) conditional compile tests in the code.

In 64 bit mode, you need -DINLINE64 in your Makefile, the default -DINLINE32 will not work...

look for INLINE32 in your Makefile and change it to 64.
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Compiling Crafty 21.6 to 64-bit

Post by Denis P. Mendoza »

Thanks Bob for the clarification. I'll try your advice, even though I really don't use a makefile in compiling.

But just a couple of minutes ago, I managed to compile Crafty 20.14 on 64 bit (MSVC 2005) with no problems at all. At least, there is progress in this work. I'll try also using Intel Compiler for comparison.

Many thanks again.
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: Compiling Crafty 21.6 to 64-bit

Post by Denis P. Mendoza »

bob wrote:
Denis P. Mendoza wrote:
bob wrote:make sure you change the -DINLINE32 to -DINLINE64, other than that, there should be no changes necessary except to choose your best compiler optimizations.
Sorry Bob, but I couldn't find a -DINLINE32 on the code!
There are several #if defined(INLINE32) and #if defined(INLINE64) conditional compile tests in the code.

In 64 bit mode, you need -DINLINE64 in your Makefile, the default -DINLINE32 will not work...

look for INLINE32 in your Makefile and change it to 64.
It's sad to say that it didn't work. Using "DINLINE64" seems to add more errors from my previous trials. I better review the Guidelines for 64-Bit Operating Systems on AMD64 Platforms and other related files. I'm still new using 64-bit systems and compilers as well. But I hope Bryan Hoffman reads this threads and enlighten me on this query. Thanks.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Compiling Crafty 21.6 to 64-bit

Post by bob »

Denis P. Mendoza wrote:
bob wrote:
Denis P. Mendoza wrote:
bob wrote:make sure you change the -DINLINE32 to -DINLINE64, other than that, there should be no changes necessary except to choose your best compiler optimizations.
Sorry Bob, but I couldn't find a -DINLINE32 on the code!
There are several #if defined(INLINE32) and #if defined(INLINE64) conditional compile tests in the code.

In 64 bit mode, you need -DINLINE64 in your Makefile, the default -DINLINE32 will not work...

look for INLINE32 in your Makefile and change it to 64.
It's sad to say that it didn't work. Using "DINLINE64" seems to add more errors from my previous trials. I better review the Guidelines for 64-Bit Operating Systems on AMD64 Platforms and other related files. I'm still new using 64-bit systems and compilers as well. But I hope Bryan Hoffman reads this threads and enlighten me on this query. Thanks.
Are you running linux or windows? For linux, if you have intel's compiler installed, "make" will need a few tweaks on the "linux-icc" and "linux-icc-profile" targets to change the compiler options to work for 64 bits. I can post the changes if you need them. For windows, I am not sure what is needed, except the -DINLINE64 is an absolute MUST if you compile for a 64 bit target. The 32 bit code will be a problem (-DINLINE32).
User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 8:33 pm
Location: Antalya, Turkey

Re: Compiling Crafty 21.6 to 64-bit

Post by beachknight »

Hi Denis,

Thanks for the detailed answer.

Your compile, TogaII134_PIV_32bit, is
performing well in my tests.
As you can see, it is not always consistent on different computers. But the tests will guide us on using the all-around optimization techniques.
Pls. pm me you pc specs so that I'll build a customized Crafty binary for you.
My computer is Intel Dual P4 Prescott.
Fritz Bench: 2; Axon Bench: 5.8
A little slow, I know.

I'd be interested in your intel- and ms-compiles
for crafty.

All the best & good luck with compiling x64 ones.
hi, merhaba, hallo HT