Thanks to Antonio Arias there is now a couple of Linux version included in the distribution.
For those interested you can download them here:
http://www.chessprogramming.net/downloads/
FYI it looks as if Maverick 1.5 is playing at around 2550 ELO on the CCRL scale
- Steve
Linux Version of Maverick 1.5
Moderator: Ras
-
- Posts: 1262
- Joined: Wed Mar 08, 2006 8:28 pm
- Location: Florida, USA
Linux Version of Maverick 1.5
http://www.chessprogramming.net - Maverick Chess Engine
-
- Posts: 4889
- Joined: Thu Mar 09, 2006 6:34 am
- Location: Pen Argyl, Pennsylvania
Re: Linux Version of Maverick 1.5
Had to add this define to bittwiddle.hSteve Maughan wrote:Thanks to Antonio Arias there is now a couple of Linux version included in the distribution.
For those interested you can download them here:
http://www.chessprogramming.net/downloads/
FYI it looks as if Maverick 1.5 is playing at around 2550 ELO on the CCRL scale
- Steve
Code: Select all
#if defined (OSX)
#include <pmmintrin.h>
#else
#include <intrin.h>
#endif
Code: Select all
In file included from bitboards.cpp:17:
./bittwiddle.h:85:5: error: use of undeclared identifier '_BitScanForward64'
_BitScanForward64(&index, b);
^
./bittwiddle.h:94:5: error: use of undeclared identifier '_BitScanForward64'
_BitScanForward64(&index, *b);
^
./bittwiddle.h:119:12: error: use of undeclared identifier '__popcnt64'
return __popcnt64(b);
Anyone else have any other suggestions?
-
- Posts: 1262
- Joined: Wed Mar 08, 2006 8:28 pm
- Location: Florida, USA
Re: Linux Version of Maverick 1.5
Hi Mike,
Thanks,
Steve
It would be great to have a Mac version. Anyone else able to chip in to get it to compile?MikeB wrote:(...)And with that - we almost have a Mac version, down to three errors.
Code: Select all
In file included from bitboards.cpp:17: ./bittwiddle.h:85:5: error: use of undeclared identifier '_BitScanForward64' _BitScanForward64(&index, b); ^ ./bittwiddle.h:94:5: error: use of undeclared identifier '_BitScanForward64' _BitScanForward64(&index, *b); ^ ./bittwiddle.h:119:12: error: use of undeclared identifier '__popcnt64' return __popcnt64(b);
Anyone else have any other suggestions?
Thanks,
Steve
http://www.chessprogramming.net - Maverick Chess Engine
-
- Posts: 22
- Joined: Thu Dec 11, 2014 6:34 am
- Location: Cupertino, California
Re: Linux Version of Maverick 1.5
On OSX both _BitScanForward64 and __popcnt64 are defined in Intrin.h (comes with Xcode/clang 6.0).
I should be able to take closer look tomorrow.
Best,
Michael
-- http://www.dvorkin.net
I should be able to take closer look tomorrow.
Best,
Michael
-- http://www.dvorkin.net
-
- Posts: 2036
- Joined: Fri Jul 14, 2006 7:56 am
- Location: London, England
- Full name: Jim Ablett
Re: Linux Version of Maverick 1.5
Can replace with intrinsics >
Jim.
Code: Select all
__inline int FirstBit(U64 val) { // LSB // FirstBit // FirstOne // BitScanForward // BSF
return __builtin_ffsll(val) - 1;
}
__inline int LastBit(U64 val) { // MSB // LastBit // LastOne // BitScanReverse // BSR
return 63 - __builtin_clzll(val);
}
__inline int BitCount(U64 b)
{
return __builtin_popcountll(b);
}
-
- Posts: 22
- Joined: Thu Dec 11, 2014 6:34 am
- Location: Cupertino, California
Re: Linux Version of Maverick 1.5
Hi Steve,
Made it compile on OSX: https://github.com/michaeldv/maverick-1.5-osx
To see the changes check out https://github.com/michaeldv/maverick-1 ... its/master -- second pair of eyes would be good.
Clang threw tons of warnings, you might want to check them out as well:
HTH,
Michael
-- http://www.dvorkin.net
Made it compile on OSX: https://github.com/michaeldv/maverick-1.5-osx
To see the changes check out https://github.com/michaeldv/maverick-1 ... its/master -- second pair of eyes would be good.

Clang threw tons of warnings, you might want to check them out as well:
HTH,
Michael
-- http://www.dvorkin.net
-
- Posts: 4889
- Joined: Thu Mar 09, 2006 6:34 am
- Location: Pen Argyl, Pennsylvania
Re: Linux Version of Maverick 1.5
Steve/Michael:mid wrote:Hi Steve,
Made it compile on OSX: https://github.com/michaeldv/maverick-1.5-osx
To see the changes check out https://github.com/michaeldv/maverick-1 ... its/master -- second pair of eyes would be good.
Clang threw tons of warnings, you might want to check them out as well:
HTH,
Michael
-- http://www.dvorkin.net
Very good. Ok for gcc compile on OSX - I made these changes:
Code: Select all
uci.cpp ->removed "__stdcall"
line 41:
/*unsigned __stdcall engine_loop(void* pArguments) delete __stdcall for OSX)*/
unsigned engine_loop(void* pArguments)
proca.h ->removed "__stdcall"
line 11:
/*unsigned __stdcall engine_loop(void* pArguments); delete __stdcall for OSX */
unsigned engine_loop(void* pArguments);
Code: Select all
# Makefile to build Maverick 1.5 on OS X.
# type "make" ; for subsequent builds, type "make clean" , then "make"
#comment in/out the depending on the build you are making
# make first build with -fprofile-generate flag
# run a few test positions
# make final build with -fprofile-use flag
# at this point , very little pickup using PGO, clang is a fraction slower on my machine (20ms)
CC = g++ -pipe -O3 -Ofast -mtune=native -fprofile-generate
#CC = g++ -pipe -O3 -Ofast -mtune=native -fprofile-use
#CC = clang -pipe -O3 -Ofast -mtune=native
APP = maverick-1.5-osx-64
SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)
LDFLAGS='-libc++ -pthread'
$(APP): $(OBJ)
$(CC) $(LDFLAGS) -c $(SRC)
$(CC) -o $(APP) $(OBJ)
clean:
rm -f *.o
rm -f $(APP)
Code: Select all
id name Maverick 1.5 x64 osx
id author Steve Maughan
option name Hash type spin default 64 min 2 max 1024
option name Ponder type check default true
option name Book Selectivity type combo default Normal var Random var Varied var Normal var Discerning var Tournament
option name UCI_ShowCurrLine type check default false
option name UCI_Chess960 type check default false
option name UCI_EngineAbout type string default Maverick 1.5 x64 osx by Steve Maughan www.chessprogramming.net
option name Show Search Statistics type check default true
option name Futility Pruning type check default false
uciok
...
info nodes 4360009 nps 565573
bestmove e2e4 ponder d7d5