Hello there,
Is there by any chance a linux compile of stockfish rockwood? Or how do I compile the sources? There is no makefile included.
Best regards, Michael
Linux compile of stockfish rockwood?
Moderators: hgm, Rebel, chrisw
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: Linux compile of stockfish rockwood?
You could tryCositasBuenas wrote:Hello there,
Is there by any chance a linux compile of stockfish rockwood? Or how do I compile the sources? There is no makefile included.
Best regards, Michael
Code: Select all
g++ -o stockfish_rw *.cpp
Didn't compile for me, and I didn't care enough to investigate further:
Code: Select all
MEM_HANDLER.cpp: In function ‘void CREATE_MEM(void**, int, uint64_t)’:
MEM_HANDLER.cpp:27:66: error: ‘printf’ was not declared in this scope
MEM_HANDLER.cpp:28:36: error: ‘MEMALIGN’ was not declared in this scope
MEM_HANDLER.cpp:34:62: error: ‘printf’ was not declared in this scope
MEM_HANDLER.cpp: In function ‘void FREE_MEM(void*)’:
MEM_HANDLER.cpp:46:24: error: ‘ALIGNED_FREE’ was not declared in this scope
MEM_HANDLER.cpp: In function ‘void CREATE_MEM(void**, int, uint64_t)’:
MEM_HANDLER.cpp:56:6: error: redefinition of ‘void CREATE_MEM(void**, int, uint64_t)’
MEM_HANDLER.cpp:20:6: error: ‘void CREATE_MEM(void**, int, uint64_t)’ previously defined here
MEM_HANDLER.cpp:59:33: error: ‘MEM_LARGE_PAGES’ was not declared in this scope
MEM_HANDLER.cpp:59:49: error: ‘MEM_COMMIT’ was not declared in this scope
MEM_HANDLER.cpp:59:60: error: ‘MEM_RESERVE’ was not declared in this scope
MEM_HANDLER.cpp:59:72: error: ‘PAGE_READWRITE’ was not declared in this scope
MEM_HANDLER.cpp:59:86: error: ‘VirtualAlloc’ was not declared in this scope
MEM_HANDLER.cpp:63:59: error: ‘printf’ was not declared in this scope
MEM_HANDLER.cpp:67:64: error: ‘printf’ was not declared in this scope
MEM_HANDLER.cpp:68:34: error: ‘MEMALIGN’ was not declared in this scope
MEM_HANDLER.cpp: In function ‘void CREATE_MEM2(void**, int, uint64_t)’:
MEM_HANDLER.cpp:75:33: error: ‘MEM_LARGE_PAGES’ was not declared in this scope
MEM_HANDLER.cpp:75:49: error: ‘MEM_COMMIT’ was not declared in this scope
MEM_HANDLER.cpp:75:60: error: ‘MEM_RESERVE’ was not declared in this scope
MEM_HANDLER.cpp:75:72: error: ‘PAGE_READWRITE’ was not declared in this scope
MEM_HANDLER.cpp:75:86: error: ‘VirtualAlloc’ was not declared in this scope
MEM_HANDLER.cpp:79:59: error: ‘printf’ was not declared in this scope
MEM_HANDLER.cpp: In function ‘void FREE_MEM(void*)’:
MEM_HANDLER.cpp:83:6: error: redefinition of ‘void FREE_MEM(void*)’
MEM_HANDLER.cpp:40:6: error: ‘void FREE_MEM(void*)’ previously defined here
MEM_HANDLER.cpp:88:24: error: ‘ALIGNED_FREE’ was not declared in this scope
MEM_HANDLER.cpp:91:28: error: ‘MEM_RELEASE’ was not declared in this scope
MEM_HANDLER.cpp:91:39: error: ‘VirtualFree’ was not declared in this scope
MEM_HANDLER.cpp: In function ‘void SETUP_PRIVILEGES()’:
MEM_HANDLER.cpp:96:6: error: redefinition of ‘void SETUP_PRIVILEGES()’
MEM_HANDLER.cpp:19:6: error: ‘void SETUP_PRIVILEGES()’ previously defined here
MEM_HANDLER.cpp:99:5: error: ‘HANDLE’ was not declared in this scope
MEM_HANDLER.cpp:99:12: error: expected ‘;’ before ‘token_handle’
MEM_HANDLER.cpp:100:5: error: ‘TOKEN_PRIVILEGES’ was not declared in this scope
MEM_HANDLER.cpp:100:22: error: expected ‘;’ before ‘tp’
MEM_HANDLER.cpp:102:40: error: ‘GetCurrentProcess’ was not declared in this scope
MEM_HANDLER.cpp:102:42: error: ‘TOKEN_ADJUST_PRIVILEGES’ was not declared in this scope
MEM_HANDLER.cpp:102:66: error: ‘TOKEN_QUERY’ was not declared in this scope
MEM_HANDLER.cpp:102:79: error: ‘token_handle’ was not declared in this scope
MEM_HANDLER.cpp:102:91: error: ‘OpenProcessToken’ was not declared in this scope
MEM_HANDLER.cpp:103:59: error: ‘TEXT’ was not declared in this scope
MEM_HANDLER.cpp:103:62: error: ‘tp’ was not declared in this scope
MEM_HANDLER.cpp:103:83: error: ‘LookupPrivilegeValue’ was not declared in this scope
MEM_HANDLER.cpp:105:33: error: ‘SE_PRIVILEGE_ENABLED’ was not declared in this scope
MEM_HANDLER.cpp:106:58: error: ‘AdjustTokenPrivileges’ was not declared in this scope
MEM_HANDLER.cpp:107:29: error: ‘CloseHandle’ was not declared in this scope
tbcore.cpp: In function ‘void init_tb(char*)’:
tbcore.cpp:229:20: error: ‘Tablebases’ has not been declared
tbcore.cpp:230:5: error: ‘Tablebases’ has not been declared
tbcore.cpp: At global scope:
tbcore.cpp:259:6: error: ‘Tablebases’ has not been declared
tbcore.cpp:259:29: error: ‘string’ in namespace ‘std’ does not name a type
tbcore.cpp:259:42: error: ISO C++ forbids declaration of ‘path’ with no type [-fpermissive]
tbcore.cpp: In function ‘void init(const int&)’:
tbcore.cpp:284:24: error: request for member ‘c_str’ in ‘path’, which is of non-class type ‘const int’
tbcore.cpp:307:3: error: ‘TBLargest’ was not declared in this scope
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Linux compile of stockfish rockwood?
Support for large pages is most likely Windows-specific, since it is not necessary for Linux.CositasBuenas wrote:Is there by any chance a linux compile of stockfish rockwood? Or how do I compile the sources? There is no makefile included.
If you take away support for large pages, what is left is http://abrok.eu/stockfish_syzygy/ plus some cosmetic patches.
-
- Posts: 284
- Joined: Tue Aug 13, 2013 9:44 am
Re: Linux compile of stockfish rockwood?
I'm curious to hear your opinion on this:syzygy wrote:Support for large pages is most likely Windows-specific, since it is not necessary for Linux.CositasBuenas wrote:Is there by any chance a linux compile of stockfish rockwood? Or how do I compile the sources? There is no makefile included.
If you take away support for large pages, what is left is http://abrok.eu/stockfish_syzygy/ plus some cosmetic patches.
https://github.com/gmg78/Stockfish/comm ... 096aeb0a15
Do you think this is also cosmetic?
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Linux compile of stockfish rockwood?
Huge pages? Huge pages = large pages. See the comment you quoted.phenri wrote:I'm curious to hear your opinion on this:syzygy wrote:Support for large pages is most likely Windows-specific, since it is not necessary for Linux.CositasBuenas wrote:Is there by any chance a linux compile of stockfish rockwood? Or how do I compile the sources? There is no makefile included.
If you take away support for large pages, what is left is http://abrok.eu/stockfish_syzygy/ plus some cosmetic patches.
https://github.com/gmg78/Stockfish/comm ... 096aeb0a15
Do you think this is also cosmetic?
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Linux compile of stockfish rockwood?
Ok, the patch you link to uses hugetlbfs to allocate huge pages / large pages. This needs special configuration.
Without it, Linux will use transparent huge pages. This happens automatically. I don't think the difference is "huge".
https://www.kernel.org/doc/Documentatio ... nshuge.txt
Without it, Linux will use transparent huge pages. This happens automatically. I don't think the difference is "huge".
https://www.kernel.org/doc/Documentatio ... nshuge.txt
-
- Posts: 284
- Joined: Tue Aug 13, 2013 9:44 am
Re: Linux compile of stockfish rockwood?
Thank you
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Linux compile of stockfish rockwood?
If you're running Linux, you can verify whether SF uses huge pages by typingphenri wrote:Thank you
Code: Select all
$ cat /proc/meminfo
For more precise information you can look at
Code: Select all
$ cat /proc/<pid>/smaps | grep Huge
To increase the chances of SF finding many huge pages, clear the page cache before starting SF (you'll need to be root):
Code: Select all
echo 1 >/proc/sys/vm/drop_caches
-
- Posts: 284
- Joined: Tue Aug 13, 2013 9:44 am
Re: Linux compile of stockfish rockwood?
According to its author, the difference is not so huge in fact.
https://groups.google.com/d/msg/fishcoo ... YkC9TZi2MJ
https://groups.google.com/d/msg/fishcoo ... YkC9TZi2MJ
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Linux compile of stockfish rockwood?
On my machine that is currently doing all kinds of calculations I started one instance of SF, allocated 8192 MB hash and started a search. In /proc/<sf-pid>/smaps I find:phenri wrote:According to its author, the difference is not so huge in fact.
https://groups.google.com/d/msg/fishcoo ... YkC9TZi2MJ
Code: Select all
AnonHugePages: 8386560 kB
On a machine with not so much RAM it might be different, but then you certainly don't want to reserve a large proportion of your RAM exclusively for hash table use.