Closed Denzwell closed 6 years ago
Something is wrong with your compile.
Ok i see the problem the makefile has changed since. You have added other flags. Example - D__USE_MINGW_ANSI_STDIO = 1
Ok when i make compile without this flag -D__USE_MINGW_ANSI_STDIO = 1 there are a lot of Warning but nodes/second is very high (It is ok) .
This flag produces a decrease of nodes/second. The speed is divided by two
I use x86_64-w64-mingw32 and gcc version 7.2.0
I have the same in command prompt but i ignore it - speed is OK in GUI or Build Tester.
Aha, that is bad. I'll remove the flag later today and I'll just switch off the warnings. Thanks for investigating!
I revert "Fix warning when compiling with MinGW." and there are no warnings with comp=mingw. I have warnings only with comp=gcc, MinGW 7.3.0/7.2.0. Also lto = yes is not working with comp=mingw (i don't see -flto in output and exe size is smaller). BTW: Cfish is a bit faster without "Fix warning when compiling with MinGW.", but it can be a noise.
Config: debug: 'no' optimize: 'yes' arch: 'x86_64' bits: '64' prefetch: 'yes' popcnt: 'yes' sse: 'yes' pext: 'no'
Flags: CC: gcc CFLAGS: -Wall -std=c11 -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT LDFLAGS: -lm
Testing config sanity. If this fails, try 'make help' ...
Step 1/4. Building instrumented executable ...
make ARCH=x86-64-modern COMP=mingw gcc-profile-make
make[1]: Entering directory /g/MinGW/CFish/Test_22/Cfish-master_160218/Cfish-master/src' make ARCH=x86-64-modern COMP=mingw \ EXTRACFLAGS='-fprofile-generate' \ EXTRALDFLAGS='-lgcov' \ all make[2]: Entering directory
/g/MinGW/CFish/Test_22/Cfish-master_160218/Cfish-master/src'
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o benchmark.o benchmark.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o bitbase.o bitbase.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o bitboard.o bitboard.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o endgame.o endgame.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o evaluate.o evaluate.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o main.o main.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o material.o material.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o misc.o misc.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o movegen.o movegen.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o movepick.o movepick.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o pawns.o pawns.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o position.o position.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o psqt.o psqt.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o search.o search.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o tbprobe.o tbprobe.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o thread.o thread.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o timeman.o timeman.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o tt.o tt.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o uci.o uci.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o ucioption.o ucioption.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o numa.o numa.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o settings.o settings.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -c -o polybook.o polybook.c
gcc -o cfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o numa.o settings.o polybook.o -lgcov -lm
make[2]: Leaving directory /g/MinGW/CFish/Test_22/Cfish-master_160218/Cfish-master/src' make[1]: Leaving directory
/g/MinGW/CFish/Test_22/Cfish-master_160218/Cfish-master/src'
Step 2/4. Running benchmark for pgo-build ... ./cfish bench 16 1 15 > /dev/null
Position: 1/42
The speed loss should be undone now.
I don't think I can do much about LTO not working with MinGW on Windows (it works with MinGW on Linux).
I tested latest Cfish sources (as of now, last commit 2018-02-15).
With single thread benches I found out, that lto = yes
, extra = yes
and activation of black magic in config.h
works best for me.
PCs: Xeon 40 Core, Opteron 64 Core (both are non bmi2) under Windows msys2 gcc7.3:
Opteron: bench 1024 64 24 (10 runs) avg: 57.7 MN/s
Xeon: bench 1024 80 24 (10 runs) avg: 68.0 MN/s
But what was surprising, I made also a multi-core on Opteron run with a compilation with extra = no
,
and it was only 52.0 MN/s on 10 runs 1024 64 24
When writing that, I saw that @syzygy1 again updated Cfish, I have to redo the benches, arrrggghhhhh Please note also that those multi-thread runs with so many threads are very noisy.
LTO is working with comp=mingw if add -flto manually, let say here: "CFLAGS += -flto -Wall -std=c11 $(EXTRACFLAGS)" or in another place.
@ChessMan3 I tried only to compile with COMP=gcc
with msys2.
i fail to build a x86 binary.
make profile-build ARCH=x86-32-modern COMP=mingw COMPCXX=i686-w64-mingw32-g++
Config: debug: 'no' optimize: 'yes' arch: 'x86_64' bits: '64' prefetch: 'yes' popcnt: 'yes' sse: 'yes' pext: 'no' Flags: CC: gcc CFLAGS: -Wall -std=c11 -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -march=native -DNUMA LDFLAGS: -lm
this then builds 64 bit here. what am i doing wrong?
The Makefile was broken for 32-bit builds. It should work now.
@ChessMan3 To compile with LTO, add lto=yes to the make command. So "make profile-build lto=yes".
@syzygy1 thanks it is working well, same as before for comp=gcc and lto=yes. But lto=yes still not working for comp=mingw on Windows. Can you change "ifeq ($(comp),$(filter $(comp),gcc clang))" to "ifeq ($(comp),$(filter $(comp),gcc mingw clang))"? With this changes lto=yes is working with "make profile-build ARCH=x86-32 COMP=mingw"
make profile-build ARCH=x86-32 lto=yes -j 1 COMP=mingw (original makefile)
Config: debug: 'no' optimize: 'yes' arch: 'i386' bits: '32' prefetch: 'yes' popcnt: 'no' sse: 'yes' pext: 'no'
Flags: CC: gcc CFLAGS: -Wall -std=c11 -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA LDFLAGS: -lm
Testing config sanity. If this fails, try 'make help' ...
Step 1/4. Building instrumented executable ...
make ARCH=x86-32 COMP=mingw gcc-profile-make
make[1]: Entering directory /g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src' make ARCH=x86-32 COMP=mingw \ EXTRACFLAGS='-fprofile-generate' \ EXTRALDFLAGS='-lgcov' \ all make[2]: Entering directory
/g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src'
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o benchmark.o benchmark.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o bitbase.o bitbase.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o bitboard.o bitboard.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o endgame.o endgame.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o evaluate.o evaluate.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o main.o main.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o material.o material.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o misc.o misc.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o movegen.o movegen.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o movepick.o movepick.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o pawns.o pawns.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o position.o position.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o psqt.o psqt.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o search.o search.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o tbprobe.o tbprobe.c
In file included from tbprobe.c:19:0:
tbcore.c: In function 'map_file':
tbcore.c:108:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*mapping = (uint64_t)map;
^
tbcore.c: In function 'unmap_file':
tbcore.c:130:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
CloseHandle((HANDLE)mapping);
^
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o thread.o thread.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o timeman.o timeman.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o tt.o tt.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o uci.o uci.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o ucioption.o ucioption.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o numa.o numa.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o settings.o settings.c
gcc -Wall -std=c11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -msse -DNUMA -c -o polybook.o polybook.c
gcc -o cfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o numa.o settings.o polybook.o -lgcov -lm
make[2]: Leaving directory /g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src' make[1]: Leaving directory
/g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src'
Step 2/4. Running benchmark for pgo-build ... ./cfish bench 16 1 15 > /dev/null
Position: 1/42
make profile-build ARCH=x86-32 lto=yes -j 1 COMP=gcc (original makefile)
Config: debug: 'no' optimize: 'yes' arch: 'i386' bits: '32' prefetch: 'yes' popcnt: 'no' sse: 'yes' pext: 'no'
Flags: CC: gcc CFLAGS: -Wall -std=c11 -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto LDFLAGS: -lm -m32 -Wl,--no-as-needed -lpthread -Wall -std=c11 -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto
Testing config sanity. If this fails, try 'make help' ...
Step 1/4. Building instrumented executable ...
make ARCH=x86-32 COMP=gcc gcc-profile-make
make[1]: Entering directory /g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src' make ARCH=x86-32 COMP=gcc \ EXTRACFLAGS='-fprofile-generate' \ EXTRALDFLAGS='-lgcov' \ all make[2]: Entering directory
/g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src'
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o benchmark.o benchmark.c
benchmark.c: In function 'benchmark':
benchmark.c:204:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
fprintf(stderr, "\n==========================="
^~~~~~~
benchmark.c:204:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
benchmark.c:204:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
benchmark.c:204:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
benchmark.c:204:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
benchmark.c:204:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o bitbase.o bitbase.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o bitboard.o bitboard.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o endgame.o endgame.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o evaluate.o evaluate.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o main.o main.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o material.o material.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o misc.o misc.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o movegen.o movegen.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o movepick.o movepick.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o pawns.o pawns.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o position.o position.c
position.c: In function 'print_pos':
position.c:129:10: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
printf("\nFen: %s\nKey: %16"PRIX64"\nCheckers: ", fen, pos_key());
^~~~~
position.c:129:10: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o psqt.o psqt.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o search.o search.c
search.c: In function 'perft':
search.c:212:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
printf("%s: %"PRIu64"\n", uci_move(buf, m->move, is_chess960()), cnt);
^~~
search.c:212:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
search.c: In function 'uci_print_pv':
search.c:831:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
printf(" nodes %"PRIu64" nps %"PRIu64, nodes_searched,
^~~~~~
search.c:831:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
search.c:831:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
search.c:831:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
search.c:837:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
printf(" tbhits %"PRIu64" time %"PRIi64" pv", tbhits, elapsed);
^~~
search.c:837:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
search.c:837:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
search.c:837:12: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o tbprobe.o tbprobe.c
In file included from tbprobe.c:19:0:
tbcore.c: In function 'map_file':
tbcore.c:108:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
*mapping = (uint64_t)map;
^
tbcore.c: In function 'unmap_file':
tbcore.c:130:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
CloseHandle((HANDLE)mapping);
^
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o thread.o thread.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o timeman.o timeman.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o tt.o tt.c
tt.c: In function 'tt_allocate':
tt.c:142:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
fprintf(stderr, "Failed to allocate %"PRIu64"MB for "
^~~~~~
tt.c:142:19: warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat=]
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o uci.o uci.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o ucioption.o ucioption.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o numa.o numa.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o settings.o settings.c
gcc -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto -c -o polybook.o polybook.c
gcc -o cfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o numa.o settings.o polybook.o -lgcov -lm -m32 -Wl,--no-as-needed -lpthread -Wall -std=c11 -fprofile-generate -pedantic -Wextra -Wshadow -m32 -DNDEBUG -O3 -msse -DNUMA -flto
make[2]: Leaving directory /g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src' make[1]: Leaving directory
/g/MinGW/CFish/Test_22/Cfish-master_180218/Cfish-master/src'
Step 2/4. Running benchmark for pgo-build ... ./cfish bench 16 1 15 > /dev/null
Position: 1/42
$ make build ARCH=x86-32-old COMP=mingw COMPCXX=g++
Config: debug: 'no' optimize: 'yes' arch: 'i386' bits: '32' prefetch: 'no' popcnt: 'no' sse: 'no' pext: 'no'
Flags: CC: gcc CFLAGS: -Wall -std=c11 -Wextra -Wshadow -DNDEBUG -O3 -DNO_PREFETCH -march=native -DNUMA LDFLAGS: -lm
still i get a x64 build.maybe it's my mingw setup.
GCC: (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.2.0
ok, i tried some gcc from another source, with that one i'm only able to build a x86 binary, despite the following output:
$ make build ARCH=x86-64-modern COMP=mingw COMPCXX=x86_64-w64-mingw32-g++
Config: debug: 'no' optimize: 'yes' arch: 'x86_64' bits: '64' prefetch: 'yes' popcnt: 'yes' sse: 'yes' pext: 'no'
Flags: CC: gcc CFLAGS: -Wall -std=c11 -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -march=native -DNUMA LDFLAGS: -lm
it doesn't worry me personally, changing the gcc is only a few clicks.
@mausalimi try disable -march=native in makefile set native = no
ok, i'm a complete idiot. the correct make line for a x64 build is something like
make profile-build ARCH=x86-64-modern COMP=mingw COMPCC=x86_64-w64-mingw32-gcc
and for x86 it would be
make profile-build ARCH=x86-32 COMP=mingw COMPCC=i686-w64-mingw32-gcc
sorry for the mess. :(
I've finally updated the README ;-)
The problem existed but was solved. So closing.
Cfish : Src of 2018/02/15
Total time (ms) : 4365 Nodes searched : 5006365 Nodes/second : 1 146 933
Stockfish 9
Total time (ms) : 2445 Nodes searched : 5006365 Nodes/second : 2 047 593