Here's the .bat file I use for compiling windows Crafty 2014 with intel compiler.
******* crafty.bat ********
Code: Select all
cls
rem 
rem  The next options are optimizations inside Crafty that you will have
rem   test to see if they help.  on some machines, these will slow things
rem   by up to 10%, while on other machines these options will result in
rem   improving search speed up to 20%.  NOTE:  if you are running Linux
rem   system, the default configurations below will use the hand-written
rem   assembly modules.  Typical performance improvement is 5%, but this
rem   only applies to X86 machines running Linux.
rem   
rem                default
rem   -DBOOKDIR      N  path to the directory containing the book binary files.
rem                     The default for all such path values is "." if you don't
rem                     specify a path with this macro definition.
rem   -DCPUS=n       N  defines the maximum number of CPUS Crafty will be able
rem                     to use in a SMP system.  Note that this is the max you
rem                     will be able to use.  You need to use the smpmt=n command
rem                     to make crafty use more than the default 1 process.
rem   -DDGT          N  This is a unix-only option to support the DGT board.
rem   -DEPD          Y  if you want full EPD support built in.
rem   -DHASHSTATS    N  This option compiles in some of the statistics 
rem                     gathering to provide hashing statistics.
rem   -DINLINE32     N  Compiles with the Intel assembly code for FirstOne(),
rem                     LastOne() and PopCnt().  This is for gcc-style inlining
rem                     and now works with the Intel C/C++ compiler as well.
rem   -DINLINE64     N  Compiles with the Intel assembly code for FirstOne(),
rem                     LastOne() and PopCnt() for the AMD opteron, only tested
rem                     with the 64-bit opteron GCC compiler / Intel ICC compiler.
rem   -DLIMITEXT     N  limit extensions as search gets deeper
rem   -DLOGDIR       N  path to the directory where Crafty puts the log.nnn and
rem                     game.nnn files.
rem   -DNOEGTB       N  eliminates the egtb code for compilers that can't deal
rem                     with the large egtb.cpp code/templates.
rem   -DNOFUTILITY   N  disables classic futility pruning
rem   -DNUMA         N  says this system is NUMA, which is mainly used for Linux
rem                     systems, and references libnuma, needed for the NUMA calls
rem                     (crafty doesn't use many of these, it does the memory
rem                     setup stuff itself)
rem   -DPOWERPC      N  enables PPC spinlock inline function for SMP boxes only
rem   -DRCDIR        N  path to the directory where we look for the .craftyrc or
rem                     crafty.rc (windows) file.
rem   -DSMP          N  enables SMP support (not clustering).  If you choose
rem                     this option, you need to look closely at the following
rem                     two options as well.
rem   -DTBDIR        N  path to the directory where the endgame tablebase files
rem                     are found.  default = "./TB"
rem   -DTRACE        N  This enables the "trace" command so that the search tree
rem                     can be dumped while running.
rem  add  '#define inline __inline' to 'chess.h'
rem  add 'typedef unsigned long DWORD_PTR;' to 'utility.c'
rem comment out  'dgt.c' 'epd.c' 'epdglue.c' from 'crafty.c' (for speedup)
rem  smp version below
rem icl -o crafty.exe crafty.c egtb.cpp /DNT_i386 /DWIN32 /DCPUS=2 /DSMP /G7 /Ox /Qipo /QxK /MT /Qparallel /Qprof-gen
rem  single cpu version below
rem icl -o crafty.exe crafty.c egtb.cpp /DNT_i386 /DWIN32 /G7 /Ox /Qipo /QxK /MT /Qparallel /Qprof-gen
cls
del *.o
del *.obj
cls
icl -o crafty.exe main.c attacks.c book.c boolean.c data.c draw.c drawn.c edit.c enprise.c epd.c epdglue.c evaluate.c give.c history.c init.c input.c interupt.c iterate.c lookup.c make.c movegen.c next.c nextc.c nexte.c resign.c root.c search.c setboard.c store.c swap.c test.c time.c utility.c valid.c validate.c /DNT_i386 /DWIN32 /DCPUS=2 /DSMP /G7 /Ox /Qipo /QxK /MT /Qparallel /Qopenmp /Qprof-gen
Add the 'crafty.bat' + all crafty src files to 'Program Files\Intel\Compiler\C++\10.0.025\IA32\Bin' and run it.
Jim.

