Crafty-23.2 Makefile Issue

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

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

Crafty-23.2 Makefile Issue

Post by zullil »

A heads-up to those who compile Crafty-23.2. The default definition for "objects" in the Makefile has changed (unintentionally?). See the snippet below from the 23.2 Makefile. Despite what is indicated in the comments, the default is now to compile everything into one "large glob." Compiling sources separately produces a significantly faster binary, at least on my Mac Pro using gcc-4.4 and pgo.

Based on my very limited testing, Crafty-23.2 seems to examine between 5% and 10% more nps than Crafty-23.1 did. I'm hitting about 26 x 10^6 nps on my dual quad 2.26 GHz Nehalem Mac Pro (using 2GB hash).

As always, thanks to Bob Hyatt and his team for their work on Crafty, and for continuing to make Crafty available to all.

Code: Select all

#
#  one of the two following definitions for "objects" should be used.  The
#  default is to compile everything separately.  However, if you use the 
#  definition that refers to crafty.o, that will compile using the file crafty.c
#  which #includes every source file into one large glob.  This gives the
#  compiler max opportunity to inline functions as appropriate.  You should try
#  compiling both ways to see which way produces the fastest code.
#

#objects = search.o thread.o repeat.o next.o killer.o quiesce.o evaluate.o    \
       movgen.o make.o unmake.o hash.o  attacks.o swap.o boolean.o utility.o  \
       probe.o book.o data.o drawn.o edit.o epd.o epdglue.o init.o input.o    \
       interupt.o iterate.o main.o option.o output.o ponder.o preeval.o       \
       resign.o root.o learn.o setboard.o test.o time.o validate.o annotate.o \
       analyze.o evtest.o bench.o
objects = crafty.o
Togga

testing crafty

Post by Togga »

do you know which timecontrol uses the crafty team for their 40 000 games for testing on cluster? wow.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Crafty-23.2 Makefile Issue

Post by bob »

zullil wrote:A heads-up to those who compile Crafty-23.2. The default definition for "objects" in the Makefile has changed (unintentionally?). See the snippet below from the 23.2 Makefile. Despite what is indicated in the comments, the default is now to compile everything into one "large glob." Compiling sources separately produces a significantly faster binary, at least on my Mac Pro using gcc-4.4 and pgo.

Based on my very limited testing, Crafty-23.2 seems to examine between 5% and 10% more nps than Crafty-23.1 did. I'm hitting about 26 x 10^6 nps on my dual quad 2.26 GHz Nehalem Mac Pro (using 2GB hash).

As always, thanks to Bob Hyatt and his team for their work on Crafty, and for continuing to make Crafty available to all.

Code: Select all

#
#  one of the two following definitions for "objects" should be used.  The
#  default is to compile everything separately.  However, if you use the 
#  definition that refers to crafty.o, that will compile using the file crafty.c
#  which #includes every source file into one large glob.  This gives the
#  compiler max opportunity to inline functions as appropriate.  You should try
#  compiling both ways to see which way produces the fastest code.
#

#objects = search.o thread.o repeat.o next.o killer.o quiesce.o evaluate.o    \
       movgen.o make.o unmake.o hash.o  attacks.o swap.o boolean.o utility.o  \
       probe.o book.o data.o drawn.o edit.o epd.o epdglue.o init.o input.o    \
       interupt.o iterate.o main.o option.o output.o ponder.o preeval.o       \
       resign.o root.o learn.o setboard.o test.o time.o validate.o annotate.o \
       analyze.o evtest.o bench.o
objects = crafty.o
Something is wrong with how you compile. It is significantly faster to compile everything together so that the compiler can inline what it wants. Compiled separately, the compiler can't see what modules in file A can be inlined into file B.

I use the Intel compiler and can see the difference between the two. I'll post some numbers later, for reference...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: testing crafty

Post by bob »

Togga wrote:do you know which timecontrol uses the crafty team for their 40 000 games for testing on cluster? wow.
Several. Those games were 10mins+2secs. I was testing to see if a couple of time allocation changes had hurt at longer time limits with a smallish increment. I normally test at 10sec + 0.1sec.