Skip to content

Commit

Permalink
Fix for Cygwin's environment build-profile
Browse files Browse the repository at this point in the history
The Cygwin environment has two g++ compilers, each with a different problem
for compiling  Stockfish at the moment:

(a) g++.exe : full posix build compiler, linked to cygwin dll.

    => This one has a problem embedding the net.

(b) x86_64-w64-mingw32-g++.exe : native Windows build compiler.

    => This one manages to embed the net, but has a problem related to libgcov
       when we use the profile-build target of Stockfish.

This patch solves the problem for compiler (b), so that our recommended command line
if you want to build an optimized version of Stockfish on Cygwin becomes something
like the following (you can change the ARCH value to whatever you want, but note
the COMP and CXX variables pointing at the right compiler):

```
   make -j profile-build ARCH=x86-64-modern COMP=mingw CXX=x86_64-w64-mingw32-c++.exe
```

closes #3463

No functional change
  • Loading branch information
proukornew authored and snicolet committed Jun 16, 2021
1 parent 8ec9e10 commit 68bf362
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -23,6 +23,7 @@ Alfredo Menezes (lonfom169)
Ali AlZhrani (Cooffe)
Andrew Grant (AndyGrant)
Andrey Neporada (nepal)
Andreï Vetrov (proukornew)
Andy Duplain
Antoine Champion (antoinechampion)
Aram Tumanian (atumanian)
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Expand Up @@ -884,13 +884,13 @@ clang-profile-use:

gcc-profile-make:
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
EXTRACXXFLAGS='-fprofile-generate' \
EXTRACXXFLAGS='-fprofile-generate="./"' \
EXTRALDFLAGS='-lgcov' \
all

gcc-profile-use:
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
EXTRACXXFLAGS='-fprofile-use -fno-peel-loops -fno-tracer' \
EXTRACXXFLAGS='-fprofile-use="./" -fno-peel-loops -fno-tracer' \
EXTRALDFLAGS='-lgcov' \
all

Expand Down

28 comments on commit 68bf362

@SFisGOD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snicolet There is some issue with make clean now

$ make clean
rm: cannot remove 'C~': Is a directory
make: *** [Makefile:767: clean] Error 1

@vondele
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are on which OS (windows, linux) and what toolchain (mingw...)?

@SFisGOD
Copy link
Contributor

@SFisGOD SFisGOD commented on 68bf362 Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MinGW gcc version 9.2.0 Windows 10

@snicolet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SFisGOD

can you try to comment each line in lines 799-804 of Makefile in turn, and tell us which one (if any) is giving the error?

profileclean:
	@rm -rf profdir
	@rm -f bench.txt *.gcda *.gcno ./syzygy/*.gcda ./nnue/*.gcda ./nnue/features/*.gcda *.s
	@rm -f stockfish.profdata *.profraw
	@rm -f stockfish.exe.lto_wrapper_args
	@rm -f stockfish.exe.ltrans.out
	@rm -f ./-lstdc++.res

@SFisGOD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried but error is still there.

@SFisGOD
Copy link
Contributor

@SFisGOD SFisGOD commented on 68bf362 Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EXTRACXXFLAGS='-fprofile-generate="./"' \

Creates a folder with same path with stockfish src files so it's something like this

C:\Users\User\Stockfish\src\C~\Users\User\Stockfish\src

And this is where all the gcda files go. Previously, all gcda files are created in

C:\Users\User\Stockfish\src

The problem is that make clean can't get rid of this C~ folder

@ppigazzini
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same error with gcc version 10.3.0 (Rev2, Built by MSYS2 project).
Sorry to have missed the make clean test :(

@snicolet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll revert the patch

@ppigazzini
Copy link
Contributor

@ppigazzini ppigazzini commented on 68bf362 Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm reinstalling cygwin to help testing another possible fix.

@snicolet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Pasquale!

@ppigazzini
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same problem in msys2 with:

  • EXTRACXXFLAGS='-fprofile-generate="."' \
  • mingw32-make.exe instead that make.exe (the former is Windows native but can have some compatibility problems)

@snicolet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we will not escape writing platform-specific code in the Makefile.. Any way to test in the Makefile that we are compiling on CygWin?

@ppigazzini
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cygwin installed, I'll be home in 2 hours. Feel free to suggest fixes to be tested.

@gvreuls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you set the profile directory with -fprofile-dir instead?

diff --git a/src/Makefile b/src/Makefile
index 33a270f..2d2ba13 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -884,13 +884,13 @@
 
 gcc-profile-make:
 	$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
-	EXTRACXXFLAGS='-fprofile-generate' \
+	EXTRACXXFLAGS='-fprofile-dir="." -fprofile-generate' \
 	EXTRALDFLAGS='-lgcov' \
 	all
 
 gcc-profile-use:
 	$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
-	EXTRACXXFLAGS='-fprofile-use -fno-peel-loops -fno-tracer' \
+	EXTRACXXFLAGS='-fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer' \
 	EXTRALDFLAGS='-lgcov' \
 	all 

If that doesn't work either we could try specifying a separate subdirectory for the profile data, but that's a larger change.

@snicolet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice to test, probably, yes.

I note that Andreï suggests another solution (or maybe the same, unclear) in one comment of the PR:

Resolution: use mangling paths via -fprofile-*=path option

@ppigazzini
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you set the profile directory with -fprofile-dir instead?

-fprofile-dir="." creates the "C~" folder on msys2.

@gvreuls
Copy link
Contributor

@gvreuls gvreuls commented on 68bf362 Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppigazzini Does it make any difference if you omit the double quotes? -fprofile-dir=.

Edit: if that doesn't work we can use the intel compiler profile directory: -fprofile-dir=profdir (make profileclean removes this directory already, so no more changes are needed).

@ppigazzini
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gvreuls unfortunately no.

g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir=. -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp

$ make clean
rm: cannot remove 'C~': Is a directory
make: *** [Makefile:767: clean] Error 1

@gvreuls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppigazzini Could you try one last time with -fprofile-dir=profdir please?

I suspect this one is going to work but it puts the profiling data in an different directory than master so it's up to the maintainers if this is acceptable. The same directory is used by ICC though, so it isn't an outlandish change.

@ppigazzini
Copy link
Contributor

@ppigazzini ppigazzini commented on 68bf362 Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gvreuls @snicolet -fprofile-dir=profdir works fine w/ msys2 and cygwin, no problem w/ a second build w/o make clean, no problem w/ make clean.
EDIT_000: works fine also on WSL2.
EDIT_001: the "profdir" folder is automatically deleted when the Makefile stops. On msys2 the "profdir" folder contains the "C~" tree of folders, msys2 correctly deals w/ any space in folder names.

@SFisGOD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-fprofile-dir=profdir works fine here and indeed the profdir directory gets deleted during step 4 (profileclean)

@vondele
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works also on linux, I would be fine with a PR along those lines.

@gvreuls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll wait a few hours for @proukornew to respond, if he doesn't I'll make a PR.

@proukornew
Copy link
Contributor Author

@proukornew proukornew commented on 68bf362 Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you set the profile directory with -fprofile-dir instead?

-fprofile-dir="." creates the "C~" folder on msys2.

It's not true. Try to refresh msys2. I have 0 problems with msys2 and dot.
@ALL But, as i said on issue page, we can use any combination of profile-generate=path or profile-dir=path. I've tested at cygwin and msys2 "." path. The folder for gcda files is good idea

@gvreuls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@proukornew The dot solution might work for your system but it doesn't work on other people's machines. Can you confirm that the -fprofile-dir=profdir solution works for you? If it does you can make a new Pull Request with that solution and everybody's happy.

@proukornew
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gvreuls little later

@ppigazzini
Copy link
Contributor

@ppigazzini ppigazzini commented on 68bf362 Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-fprofile-dir="." creates the "C~" folder on msys2.

It's not true. Try to refresh msys2. I have 0 problems with msys2 and dot.

@proukornew feel free to ask me other tests :)

[EDIT_001]: ops , sorry, you asked for -fprofile-dir=".", here is the result:

$ rm -rf C~/ && make clean && make -j profile-build ARCH=x86-64-modern COMP=mingw && ./stockfish.exe compiler && make clean
Default net: nn-33c9d39e5eb6.nnue
Already available.

Config:
debug: 'no'
sanitize: 'none'
optimize: 'yes'
arch: 'x86_64'
bits: '64'
kernel: 'MINGW64_NT-10.0-19043'
os: 'Windows_NT'
prefetch: 'yes'
popcnt: 'yes'
pext: 'no'
sse: 'yes'
mmx: 'no'
sse2: 'yes'
ssse3: 'yes'
sse41: 'yes'
avx2: 'no'
avx512: 'no'
vnni256: 'no'
vnni512: 'no'
neon: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17  -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2
LDFLAGS:  -static

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 '/home/Pasquale Pigazzini/_git/Stockfish/src'
make ARCH=x86-64-modern COMP=mingw \
EXTRACXXFLAGS='-fprofile-dir="." -fprofile-generate' \
EXTRALDFLAGS='-lgcov' \
all
make[2]: Entering directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o evaluate.o evaluate.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o movegen.o movegen.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o pawns.o pawns.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o psqt.o psqt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o ucioption.o ucioption.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o tune.o tune.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o tbprobe.o syzygy/tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o evaluate_nnue.o nnue/evaluate_nnue.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp
g++ -o stockfish.exe 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 thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o -lgcov -static
make[2]: Leaving directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
make[1]: Leaving directory '/home/Pasquale Pigazzini/_git/Stockfish/src'

Step 2/4. Running benchmark for pgo-build ...
./stockfish.exe bench > /dev/null

Position: 1/47 (rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1)

Position: 2/47 (r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 10)

Position: 3/47 (8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 11)

Position: 4/47 (4rrk1/pp1n3p/3q2pQ/2p1pb2/2PP4/2P3N1/P2B2PP/4RRK1 b - - 7 19)

Position: 5/47 (rq3rk1/ppp2ppp/1bnpN3/3N2B1/4P3/7P/PPPQ1PP1/2KR3R b - - 0 14)

Position: 6/47 (r1bq1r1k/1pp1n1pp/1p1p4/4p2Q/4PpP1/1BNP4/PPP2P1P/3R1RK1 b - g3 0 14)

Position: 7/47 (r3r1k1/2p2ppp/p1p1bn2/8/1q2P3/2NPQN2/PPP3PP/R4RK1 b - - 2 15)

Position: 8/47 (r1bbk1nr/pp3p1p/2n5/1N4p1/2Np1B2/8/PPP2PPP/2KR1B1R w kq - 0 13)

Position: 9/47 (r1bq1rk1/ppp1nppp/4n3/3p3Q/3P4/1BP1B3/PP1N2PP/R4RK1 w - - 1 16)

Position: 10/47 (4r1k1/r1q2ppp/ppp2n2/4P3/5Rb1/1N1BQ3/PPP3PP/R5K1 w - - 1 17)

Position: 11/47 (2rqkb1r/ppp2p2/2npb1p1/1N1Nn2p/2P1PP2/8/PP2B1PP/R1BQK2R b KQ - 0 11)

Position: 12/47 (r1bq1r1k/b1p1npp1/p2p3p/1p6/3PP3/1B2NN2/PP3PPP/R2Q1RK1 w - - 1 16)

Position: 13/47 (3r1rk1/p5pp/bpp1pp2/8/q1PP1P2/b3P3/P2NQRPP/1R2B1K1 b - - 6 22)

Position: 14/47 (r1q2rk1/2p1bppp/2Pp4/p6b/Q1PNp3/4B3/PP1R1PPP/2K4R w - - 2 18)

Position: 15/47 (4k2r/1pb2ppp/1p2p3/1R1p4/3P4/2r1PN2/P4PPP/1R4K1 b - - 3 22)

Position: 16/47 (3q2k1/pb3p1p/4pbp1/2r5/PpN2N2/1P2P2P/5PP1/Q2R2K1 b - - 4 26)

Position: 17/47 (6k1/6p1/6Pp/ppp5/3pn2P/1P3K2/1PP2P2/3N4 b - - 0 1)

Position: 18/47 (3b4/5kp1/1p1p1p1p/pP1PpP1P/P1P1P3/3KN3/8/8 w - - 0 1)

Position: 19/47 (2K5/p7/7P/5pR1/8/5k2/r7/8 w - - 4 3)

Position: 20/47 (8/6pk/1p6/8/PP3p1p/5P2/4KP1q/3Q4 w - - 0 1)

Position: 21/47 (7k/3p2pp/4q3/8/4Q3/5Kp1/P6b/8 w - - 0 1)

Position: 22/47 (8/2p5/8/2kPKp1p/2p4P/2P5/3P4/8 w - - 0 1)

Position: 23/47 (8/1p3pp1/7p/5P1P/2k3P1/8/2K2P2/8 w - - 0 1)

Position: 24/47 (8/pp2r1k1/2p1p3/3pP2p/1P1P1P1P/P5KR/8/8 w - - 0 1)

Position: 25/47 (8/3p4/p1bk3p/Pp6/1Kp1PpPp/2P2P1P/2P5/5B2 b - - 0 1)

Position: 26/47 (5k2/7R/4P2p/5K2/p1r2P1p/8/8/8 b - - 0 1)

Position: 27/47 (6k1/6p1/P6p/r1N5/5p2/7P/1b3PP1/4R1K1 w - - 0 1)

Position: 28/47 (1r3k2/4q3/2Pp3b/3Bp3/2Q2p2/1p1P2P1/1P2KP2/3N4 w - - 0 1)

Position: 29/47 (6k1/4pp1p/3p2p1/P1pPb3/R7/1r2P1PP/3B1P2/6K1 w - - 0 1)

Position: 30/47 (8/3p3B/5p2/5P2/p7/PP5b/k7/6K1 w - - 0 1)

Position: 31/47 (5rk1/q6p/2p3bR/1pPp1rP1/1P1Pp3/P3B1Q1/1K3P2/R7 w - - 93 90)

Position: 32/47 (4rrk1/1p1nq3/p7/2p1P1pp/3P2bp/3Q1Bn1/PPPB4/1K2R1NR w - - 40 21)

Position: 33/47 (r3k2r/3nnpbp/q2pp1p1/p7/Pp1PPPP1/4BNN1/1P5P/R2Q1RK1 w kq - 0 16)

Position: 34/47 (3Qb1k1/1r2ppb1/pN1n2q1/Pp1Pp1Pr/4P2p/4BP2/4B1R1/1R5K b - - 11 40)

Position: 35/47 (4k3/3q1r2/1N2r1b1/3ppN2/2nPP3/1B1R2n1/2R1Q3/3K4 w - - 5 1)

Position: 36/47 (8/8/8/8/5kp1/P7/8/1K1N4 w - - 0 1)

Position: 37/47 (8/8/8/5N2/8/p7/8/2NK3k w - - 0 1)

Position: 38/47 (8/3k4/8/8/8/4B3/4KB2/2B5 w - - 0 1)

Position: 39/47 (8/8/1P6/5pr1/8/4R3/7k/2K5 w - - 0 1)

Position: 40/47 (8/2p4P/8/kr6/6R1/8/8/1K6 w - - 0 1)

Position: 41/47 (8/8/3P3k/8/1p6/8/1P6/1K3n2 b - - 0 1)

Position: 42/47 (8/R7/2q5/8/6k1/8/1P5p/K6R w - - 0 124)

Position: 43/47 (6k1/3b3r/1p1p4/p1n2p2/1PPNpP1q/P3Q1p1/1R1RB1P1/5K2 b - - 0 1)

Position: 44/47 (r2r1n2/pp2bk2/2p1p2p/3q4/3PN1QP/2P3R1/P4PP1/5RK1 w - - 0 1)

Position: 45/47 (8/8/8/8/8/6k1/6p1/6K1 w - - 0 1)

Position: 46/47 (7k/7P/6K1/8/3B4/8/8/8 b - - 0 1)

Position: 47/47 (bb1n1rkr/ppp1Q1pp/3n1p2/3p4/3P4/6Pq/PPP1PP1P/BB1NNRKR w HFhf - 0 5)

===========================
Total time (ms) : 5371
Nodes searched  : 5629669
Nodes/second    : 1048160

Step 3/4. Building optimized executable ...
make ARCH=x86-64-modern COMP=mingw objclean
make[1]: Entering directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
make[1]: Leaving directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
make ARCH=x86-64-modern COMP=mingw gcc-profile-use
make[1]: Entering directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
make ARCH=x86-64-modern COMP=mingw \
EXTRACXXFLAGS='-fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer' \
EXTRALDFLAGS='-lgcov' \
all
make[2]: Entering directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o evaluate.o evaluate.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o movegen.o movegen.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o pawns.o pawns.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o psqt.o psqt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o ucioption.o ucioption.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o tune.o tune.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o tbprobe.o syzygy/tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o evaluate_nnue.o nnue/evaluate_nnue.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -fprofile-dir="." -fprofile-use -fno-peel-loops -fno-tracer -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp
g++ -o stockfish.exe 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 thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o -lgcov -static
make[2]: Leaving directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
make[1]: Leaving directory '/home/Pasquale Pigazzini/_git/Stockfish/src'

Step 4/4. Deleting profile data ...
make ARCH=x86-64-modern COMP=mingw profileclean
make[1]: Entering directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
make[1]: Leaving directory '/home/Pasquale Pigazzini/_git/Stockfish/src'
Stockfish 180621 by the Stockfish developers (see AUTHORS file)

Compiled by g++ (GNUC) 10.3.0 on MinGW64
Compilation settings include:  64bit SSE41 SSSE3 SSE2 POPCNT
__VERSION__ macro expands to: 10.3.0

rm: cannot remove 'C~': Is a directory
make: *** [Makefile:767: clean] Error 1

@gvreuls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, @proukornew has created a new PR #3569 to correct the error.

Please sign in to comment.