Skip to content

Commit 1fa4e5a

Browse files
committed
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.
1 parent b18be60 commit 1fa4e5a

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

src/Gull.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#define _WIN32_WINNT 0x0501
1212
#endif
1313

14-
#ifndef W32_BUILD
15-
#define HNI
16-
#undef HNI
17-
#endif
14+
// #ifndef W32_BUILD
15+
// #define HNI
16+
// #undef HNI
17+
// #endif
1818

1919
#define CPU_TIMING
2020
#undef CPU_TIMING

src/Makefile.bmi2

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
UNAME=$(shell uname -s)
2+
ifeq ($(UNAME),Linux)
3+
TARGET_SYZYGY=gull.syzygy.linux
4+
endif
5+
ifeq ($(UNAME),Darwin)
6+
TARGET_SYZYGY=gull.syzygy.macosx
7+
endif
8+
CC=g++
9+
STRIP=strip
10+
CFLAGS=-m64 -msse4.2 -mavx2 -mbmi -mbmi2 -mpopcnt -fno-exceptions -fno-rtti -Wno-parentheses -O3 -D HNI
11+
12+
main: $(TARGET)
13+
14+
gull.syzygy.linux:
15+
rm -f *.gcda
16+
$(CC) $(CFLAGS) -fprofile-generate -D LINUX -D TB Gull.cpp tbprobe.c -o Gull
17+
./Gull bench 16 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
18+
$(CC) $(CFLAGS) -fprofile-use -fno-peel-loops -fno-tracer -D LINUX -D TB -D HNI Gull.cpp tbprobe.c -o Gull
19+
$(STRIP) Gull
20+
cp Gull Gull.syzygy.linux
21+
22+
gull.syzygy.windows: CC=x86_64-w64-mingw32-g++
23+
gull.syzygy.windows:
24+
rm -f *.gcda
25+
$(CC) $(CFLAGS) -static -fprofile-generate -D WINDOWS -D TB Gull.cpp tbprobe.c -o Gull.exe
26+
./Gull.exe bench 16 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
27+
$(CC) $(CFLAGS) -fprofile-use -fno-peel-loops -fno-tracer -D WINDOWS -D TB Gull.cpp tbprobe.c -o Gull.exe
28+
$(STRIP) Gull.exe
29+
30+
clean:
31+
rm -f Gull
32+

0 commit comments

Comments
 (0)