1
0
Fork 0
Commit Graph

172 Commits (526499f3ee74da96f29f3715d7f0f0672275901b)

Author SHA1 Message Date
Marco Costalba 526499f3ee TB debug framework
Call both new and reference functions in parallel
and verify return values match.

Log to file any difference to allow debugging while
playing real games.
2016-05-26 18:58:30 +02:00
Krgp 8f934dff9a Remove useless -mbmi flag in Makefile
I could not find anything documented that is necessary that prepending -mbmi to -mbmi2 gives some benefit.
Instead at
https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions

The following built-in functions are available when -mbmi is used. All of them generate the machine instruction that is part of the name.
unsigned int __builtin_ia32_bextr_u32(unsigned int, unsigned int);
unsigned long long __builtin_ia32_bextr_u64 (unsigned long long, unsigned long long);

The following built-in functions are available when -mbmi2 is used. All of them generate the machine instruction that is part of the name.
unsigned int _bzhi_u32 (unsigned int, unsigned int)
unsigned int _pdep_u32 (unsigned int, unsigned int)
unsigned int _pext_u32 (unsigned int, unsigned int)
unsigned long long _bzhi_u64 (unsigned long long, unsigned long long)
unsigned long long _pdep_u64 (unsigned long long, unsigned long long)
unsigned long long _pext_u64 (unsigned long long, unsigned long long)

and at
https://gcc.gnu.org/ml/gcc/2014-02/msg00204.html

( "... The real optimization comes from being able to use pext
(parallel bit extract), which can implement several bextr expressions in
parallel.")

Apart from that we don't use all -msse -msse2 -msse3 -msse4.2 etc. but just -msse3 (or -msse4.2) only.

As regards to the speedup within noise level - this pull request is actually reversal of mcostalba#198 wherein prepending -mbmi to -mbmi2 was claimed to be 0.3% faster and here (removing -mbmi) gives 0.4% speed gain.
2016-05-01 14:11:28 +02:00
erbsenzaehler 4048bae47b Use -O3 for all compilers (including ICC)
There seems to be no benefit from using -fast over -O3 with icc.
So use -O3 everywhere.

No functional change

Resolves #652
2016-04-24 00:55:56 +01:00
lucasart 900279a06f 32-bit/64-bit Makefile fix
Counter intuitively, make build ARCH=x86-32 does NOT produce a 32-bit compile
when running a 64-bit OS. Nor would ARCH=x86-64 produce a 64-bit compile when
running a 32-bit OS (assuming it compiled w/o errors).

No functional change

Resolves #621
2016-04-08 18:47:31 +01:00
Marco Costalba db4b0d8b7d Rewrite bsfq management
Use compiler intrinsics when possible to
avoid writing platform specific asm code.

Tested on Windows 7 with MSVC 2013 and mingw 4.8.3 (32 and 64 bit)
and on Linux Mint with g++ 4.8.4 and clang 3.4 (32 and 64 bit).

No functional change

Resolves #609
2016-03-28 15:46:55 +01:00
Joona Kiiski ebec2fa48e Remove redundant -std=c++0x flag
This flag is functionally identical to '-std=c++11' flag which
is part of standard flags.

No functional change

Resolves #571
2016-01-18 21:54:40 +00:00
Joona Kiiski 552b3ccb66 Makefile: Allow specifying compiler executable
No functional change

Resolves #570
2016-01-18 21:47:52 +00:00
ppigazzini d4af15f682 Update AUTHORS and copyright notice
No functional change

Resolves #555
2016-01-02 09:43:51 +00:00
Marco Costalba 9742fb10fd Update Copyright year
No functional change.

Resolves #554
2016-01-01 10:17:36 +00:00
Marco Costalba 90f5937373 Revert "Fix compiling of 32 bit binary on 64-bit Windows"
This reverts commit 1e8836d921

Broken compile on mingw under Windows:

Config:
debug: 'yes'
optimize: 'yes'
arch: 'i386'
bits: '32'
prefetch: 'yes'
bsfq: 'no'
popcnt: 'no'
sse: 'yes'
pext: 'no'

Flags:
CXX: i686-w64-mingw32-c++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11  -Wextra -Wshadow -g -O3 -msse
LDFLAGS:  -static

Testing config sanity. If this fails, try 'make help' ...

mingw32-make[1]: Leaving directory 'C:/stockfish/src'
c:/MinGw/bin/mingw32-make ARCH=x86-32 COMP=mingw all
mingw32-make[1]: Entering directory 'C:/stockfish/src'
sh: C:\Program: No such file or directory
i686-w64-mingw32-c++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11  -Wextra -Wshadow -g -O3 -msse   -c -o benchmark.o benchmark.cpp
<builtin>: recipe for target 'benchmark.o' failed
process_begin: CreateProcess(NULL, i686-w64-mingw32-c++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 -Wextra -Wshadow -g -O3 -msse -c -o benchmark.o benchmark.cpp, ...) failed.
make (e=2): Impossibile trovare il file specificato.

mingw32-make[1]: *** [benchmark.o] Error 2
mingw32-make[1]: Leaving directory 'C:/stockfish/src'
makefile:401: recipe for target 'build' failed
mingw32-make: *** [build] Error 2

No functional change.
2015-12-23 09:41:56 +01:00
braich 1e8836d921 Fix compiling of 32 bit binary on 64-bit Windows
Two versions of mingw-w64 (targeting Win64 and Win32)
can be installed on Windows too.

No functional change

Resolves #532
2015-12-22 19:07:10 +00:00
mstembera 5d077bb482 Proper Makefile for cross compiling 64 or 32 bit PGO + LTO + static Windows binaries under Linux.
No functional change

Resolves #511
2015-12-03 14:01:38 +00:00
Joona Kiiski 5339ab57d8 Revert "Allow cross compilation of Windows binaries on a Linux system"
This reverts commit 388630ae28.

Confuses fishtest build system
2015-11-24 17:24:45 -08:00
mstembera 388630ae28 Allow cross compilation of Windows binaries on a Linux system
that are PGO, LTO, and statically linked.
Credit: pasquale....@gmail.com

No functional change

Resolves #505
2015-11-23 17:06:14 -08:00
Ken T Takusagawa 27ca89d479 Do not conceal the invocation of the benchmark program
It is better to be able to see what arguments it is being called with.

No functional change

Resolves #497
2015-11-15 20:34:37 -08:00
Marco Costalba 5f4d9309c8 Travis CI: add clang and osx
Extend builds to clang and osx platforms.

And check bench numbers.

No functional change.
2015-10-06 12:35:42 +02:00
lucasart 00563be5cc Retire -Wno-long-long
long long is part of the C++11 standard.

No functional change.

Resolves #364
2015-06-13 16:59:50 +01:00
Joona Kiiski 80a759d544 Resolve build failure for Mac
Remove '-Wl' switch from gcc arguments when compiling for Mac

No functional change

Resolves #353
2015-05-24 13:07:15 +01:00
Marco Costalba 578b21bbee Split PSQT init from Position init
Easier for tuning psq tables:

TUNE(myParameters, PSQT::init);

Also move PSQT code in a new *.cpp file, and retire the
old and hacky psqtab.h that required to be included only
once to work correctly, this is not idiomatic for a header
file.

Give wide visibility to psq tables (previously visible only
in position.cpp), this will easy the use of psq tables outside
Position, for instance in move ordering.

Finally trivial code style fixes of the latest patches.

Original patch of Lucas Braesch.

No functional change.
2015-05-03 20:07:15 +02:00
Vince Negri bae4679de2 Fix dependency generation for MacOSX
No functional change

Resolves #290
2015-03-15 20:31:43 +00:00
Joona Kiiski a3943b2aa7 Fix dependency generation for C++11
No functional change

Resolves #291
2015-03-15 20:26:08 +00:00
Marco Costalba e5da0e4b79 Link with -static in mingw
Fixes reported startup error about missing libwinpthread-1.dll
when the dll is not in the path.

The current -static-xxxx flags, introduced with:

https://github.com/official-stockfish/Stockfish/commit/373503f4a9a990054b5

Only take in account standard libraries, but not thread
library.

No functional change.

Resolves #289
2015-03-14 19:23:54 +00:00
Joona Kiiski 558b0c848c Remove check for gcc version from Makefile.
This check is obsolete.
very old gcc versions can't compile c++11 code.

No functional change

Resolves #285
2015-03-13 20:29:28 +00:00
Stéphane Nicolet 8fcaa78a04 Update Makefile for Mac OS X compilation
This change in the Makefile restores the possibility to compile
Stockfish on Mac OS X 10.9 and 10.10 after the C++11 has been merged.

To use the default (fastest) settings, compile with:

make build ARCH=x86-64-modern

To test the clang settings, compile with

make build ARCH=x86-64-modern COMP=clang

Beware that the clang settings may provide a slightly slower (6%)
executable.

Backported from master.

No functional change

Resolves #275
2015-03-07 08:39:21 +01:00
Marco Costalba 29ff925fd8 Fix build under OS X
Reported by Vince Negri

No functional change.
2015-02-22 16:33:24 +01:00
Marco Costalba 1277a42823 Sync with master
bench: 7696257
2015-02-07 10:32:28 +01:00
mstembera f4136c5434 Profile build options
I went through all the individual compile options that differ between
-fprofile-generate/-fprofile-use  and  -fprofile-arcs/-fbranch-probabilities
and distilled the speed difference down to only turning off
-fno-peel-loops and -fno-tracer.  Using this we still get the full speedup
(maybe a bit more because other optimizations stay on) and it's also much cleaner
because we can get rid of the "@rm -f ucioption.gc*" hack for all versions of gcc.

No functional change.

Resolves #237
2015-02-03 11:09:37 +08:00
Joona Kiiski ec36b8dea9 Revert "Fix profile build for gcc on Mac OSX"
Seems to be a performance regression for standard build.

For SF6 people compiling on Mac OSX using profile-build option
just need to make necessary adjustments manually...

No functional change

Resolves #223
2015-01-25 21:51:09 +00:00
Joona Kiiski 1b62b47b62 Fix profile build for gcc on Mac OSX
Switch back to using -fprofile-generate and
-fprofile-use flags

No functional change

Resolves #219
Resolves #210
2015-01-18 14:42:30 +00:00
Marco Costalba f53aea45e3 Add syzygy support
bench: 8080602
2015-01-18 08:27:46 +01:00
Marco Costalba 3c07603dac Import C++11 branch
Import C++11 branch from:

https://github.com/mcostalba/Stockfish/tree/c++11

The version imported is teh last one as of today:
6670e93e50

Branch is fully equivalent with master but syzygy
tablebases that are missing (but will be added with
next commit).

bench: 8080602
2015-01-18 08:00:50 +01:00
Stefano80 17bcdb9212 Higher movetime resolution for benchmarks
Use a millisecond movetime precision for benchmarks

No functional change

Resolves #198
2015-01-11 20:07:11 +00:00
Marco Costalba 202a78e8e4 Fix compile for Android 5
Android 5 can only run position independent executables.

Note that this breaks Android 4.0 and earlier.

See here for more info:
http://stackoverflow.com/questions/24818902/running-a-native-library-on-android-l-error-only-position-independent-executab

Thanks to Peter Osterlund for the support.

No functional change
2015-01-11 10:52:42 +01:00
Marco Costalba 42b48b08e8 Update copyright year
No functional change.
2015-01-10 11:46:28 +01:00
Joona Kiiski e5c7b44f7a Use "rm -f" instead of "rm" for gcc profiling hack in Makefile
In some UNIX systems "rm" prompts user for confirmation.
However "rm -f" is always a guaranteed forced deletion.

Also move gcc profiling hack under the correct target

No Functional change

Resolves #168
2014-12-20 17:55:18 +00:00
mstembera 46d5fff01f Change profile-build options to produce 1% to 2% faster executables.
The "@rm ucioption.gc*" line is necessary to avoid a gcc 4.7.x bug.
Confirmed for gcc 4.7.4, 4.8.1, and 4.9.1
Suggested by Kiran Panditrao on fishcooking forum.
https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/AY8gN53nG18

No functional change.

Resolves #160
2014-12-19 03:57:04 +08:00
Joona Kiiski b15dcd9774 Fix profile build for syzygy
Touch source files under syzygy directory to force recompilation
after collecting profile data.

No functional change

Resolves #149
2014-12-10 17:59:41 +00:00
Joona Kiiski 94dd204c3b Retire 'os' flag from Makefile
Appears to be unused

No functional change

Resolves #147
2014-12-10 17:57:55 +00:00
Joona Kiiski 35c1ccef39 Retire support for Haiku installation directory from Makefile
- It is out of the scope of the project.
- It is the responsibility of Haiku package maintainer to
  configure this.

No functional change

Resolves #143
2014-12-06 14:23:08 +00:00
Joona Kiiski 0935dca9a6 Retire hackish support for aCC and HP-UX from Makefile
- It is out of scope of the project.
- We have no way to verify that it even works anymore

No functional change

Resolves #142
2014-12-06 14:19:39 +00:00
Rodrigo Exterckötter Tjäder 9b4e123fbe Cleaning Syzygy profiling data
Updating the makefile so that the clean and gcc-profile-clean targets also
remove the profiling data files in the syzygy directory.

No functional change.

Resolves #136
2014-11-30 19:53:04 +00:00
Marco Costalba 66f5cd3f9d Retire #ifdef SYZYGY macro
It just clutters the code for no
real reason.

No functional change.

Resolves #139
2014-11-30 19:23:17 +00:00
Ronald de Man 7caa6cd338 Syzygy tablebases
Adds support for Syzygy tablebases to Stockfish.  See
the Readme for information on using the tablebases.

Tablebase support can be enabled/disabled at the Makefile
level as well, by setting syzygy=yes or syzygy=no.

Big/little endian are both supported.

No functional change (if Tablebases are not used).

Resolves #6
2014-11-26 07:49:58 +08:00
lucasart c6d45c60b5 Profile Build with Hash=16
16MB for 1" searches is more comensurate with the average use case.

And 16 is the default used by stockfish bench, so it makes sense to be
consistent, if only to have the same minimum memory requirement for using
SF and compiling it with PGO.

No functional change.

Resolves #109
2014-11-10 23:06:12 +00:00
Marco Costalba 9ba391c5cb Retire notation.cpp
Now we can finally retire notation.cpp
and move UCI helpers under uci.cpp

No functional change.
2014-10-26 19:40:13 +00:00
Marco Costalba c97b702f4d Fix some warnings with Intel C++ compiler
No functional change.
2014-10-12 20:34:54 +01:00
lucasart 85b08ce3ad Use compiler intrinsic instead of assembly for popcnt
This time, do not break compatibility with some AMD machines that have SSE3 and popcnt, but do
not have SSE4.2.

No functional change.
2014-07-03 18:22:53 +08:00
Gary Linscott b9a88da4ab Revert "Use compiler intrinsic instead of assembly for popcnt"
This reverts commit a69f1d7c20.
2014-07-01 17:01:54 -04:00
lucasart a69f1d7c20 Use compiler intrinsic instead of assembly for popcnt
No functional change.
2014-07-01 20:50:33 +08:00
Joseph R. Prostko e4e423bb05 Change the install prefix for Haiku
* /boot/common was removed from Haiku
* The equivalent path now that package management has been implemented is /boot/system/non-packaged

No functional change

Bench: 8759681
2014-06-29 15:15:10 +01:00