Page 1 of 1
Compiling Stockfish MSVS 2010
Posted: Sat Nov 05, 2011 8:38 pm
by Webkikr
Anyone have a working makefile for Stockfish under MS Visual Studio 2010? Any special options I should be using?
I compiled Stockfish 1.8 at one time, but I lost the makefile I used.
Re: Compiling Stockfish MSVS 2010
Posted: Sun Nov 06, 2011 1:31 am
by gaard
Webkikr wrote:Anyone have a working makefile for Stockfish under MS Visual Studio 2010? Any special options I should be using?
I compiled Stockfish 1.8 at one time, but I lost the makefile I used.
Stockfish is pretty easy to make at the command line with the MS compiler.
cl /Festockfish /Ox /DNDEBUG /DIS_64BIT /DUSE_POPCNT /DUSE_PREFETCH *.cpp
of course only use /DIS_64BIT and /DUSE_POPCNT if you can
to do a PGO attach /GL /link /LTCG:PGI
then
stockfish bench 32 1 10 default depth
and re-link: link /LTCG:PGO /OUT:stockfish.exe *.obj
Re: Compiling Stockfish MSVS 2010
Posted: Mon Nov 07, 2011 1:06 pm
by HumbleProgrammer
An excellent reply: succinct, helpful, and accurate. Wish there was a way to applaud...oh, wait...I just did.
Re: Compiling Stockfish MSVS 2010
Posted: Thu Dec 22, 2011 12:26 am
by dbxuau
How does this compare to using the ICC compiler for POPCNT? Does the MS compiler do popcnt enabling as well? Curious which one runs better once compiled. Cheers
Re: Compiling Stockfish MSVS 2010
Posted: Fri Dec 23, 2011 6:54 am
by kingliveson
dbxuau wrote:How does this compare to using the ICC compiler for POPCNT? Does the MS compiler do popcnt enabling as well? Curious which one runs better once compiled. Cheers
Both ICC and MSVC have built-in intrinsic functions
_mm_popcnt_u64 and
__popcnt64 respectively. There should be no difference in speed because they map to CPU specific instructions.
As far as ICC vs MSVC, personal experience is ICC produces faster x86_64 binaries and MSVC, faster x86 binaries.