Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Optimized (BMI2+PGO) builds for Linux+Windows.
See Makefile.bmi2 and use:
    make -f Makefile.bmi2 gull.syzygy.linux
    make -f Makefile.bmi2 gull.syzygy.windows

For Windows cross compilation is not supported.  Instead use MSYS2 configured
for 64-bit compilation.

Linux results (self-play versus old non-syzygy non-BMI2 Gull.linux):

LTC (60"+0.6", 1-thread, 6-man syzygy):

    Score: +1728-1351=6921
    Number of games: 10000
    Winning fraction: 0.51885
    Elo difference: +13.1045
    LOS: 1

STC (10"+0.1", 1-thread, 6-man syzygy):

    Score: +2040-1791=6169
    Number of games: 10000
    Winning fraction: 0.51245
    Elo difference: +8.65293
    LOS: 0.999971

Windows build has not yet been tested.
  • Loading branch information
basil00 committed Jun 7, 2016
1 parent b18be60 commit 1fa4e5a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Gull.cpp
Expand Up @@ -11,10 +11,10 @@
#define _WIN32_WINNT 0x0501
#endif

#ifndef W32_BUILD
#define HNI
#undef HNI
#endif
// #ifndef W32_BUILD
// #define HNI
// #undef HNI
// #endif

#define CPU_TIMING
#undef CPU_TIMING
Expand Down
32 changes: 32 additions & 0 deletions src/Makefile.bmi2
@@ -0,0 +1,32 @@
UNAME=$(shell uname -s)
ifeq ($(UNAME),Linux)
TARGET_SYZYGY=gull.syzygy.linux
endif
ifeq ($(UNAME),Darwin)
TARGET_SYZYGY=gull.syzygy.macosx
endif
CC=g++
STRIP=strip
CFLAGS=-m64 -msse4.2 -mavx2 -mbmi -mbmi2 -mpopcnt -fno-exceptions -fno-rtti -Wno-parentheses -O3 -D HNI

main: $(TARGET)

gull.syzygy.linux:
rm -f *.gcda
$(CC) $(CFLAGS) -fprofile-generate -D LINUX -D TB Gull.cpp tbprobe.c -o Gull
./Gull bench 16 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
$(CC) $(CFLAGS) -fprofile-use -fno-peel-loops -fno-tracer -D LINUX -D TB -D HNI Gull.cpp tbprobe.c -o Gull
$(STRIP) Gull
cp Gull Gull.syzygy.linux

gull.syzygy.windows: CC=x86_64-w64-mingw32-g++
gull.syzygy.windows:
rm -f *.gcda
$(CC) $(CFLAGS) -static -fprofile-generate -D WINDOWS -D TB Gull.cpp tbprobe.c -o Gull.exe
./Gull.exe bench 16 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
$(CC) $(CFLAGS) -fprofile-use -fno-peel-loops -fno-tracer -D WINDOWS -D TB Gull.cpp tbprobe.c -o Gull.exe
$(STRIP) Gull.exe

clean:
rm -f Gull

0 comments on commit 1fa4e5a

Please sign in to comment.