Compiling Stockfish dev for Large Pages

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Compiling Stockfish dev for Large Pages

Post by kranium »

Nordlandia wrote:Sugar support Large Pages.

I managed to get large page working on one laptop but not on my primary desktop computer.

I did everything in Houdini manual.

Code: Select all

To enable this feature in Windows, you need to modify the Group Policy for your
account:
1. Run: gpedit.msc (or search for "Group Policy").
2.Under "Computer Configuration", "Windows Settings", "Security Settings", "Local
Policies" click on "User Rights Assignment".
3. In the right pane double-click the option "Lock Pages in Memory".
4.Click on "Add User or Group" and add your account or "Everyone".
5. You may have to logoff or reboot for the change to take effect.
For some strange reasons it won't be activated.
Hi Jon-
I believe in Windows 10, the program must be run with administrator privileges

maybe this will help:
try:
reboot your system, right-click, and 'run as administrator'
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Compiling Stockfish dev for Large Pages

Post by Milos »

Eelco de Groot wrote:Thanks Ronald, I did not know, They are moving away further from Stockfish although they can still say it plays the same moves. It is logical to move to asmFish next. Can an assembler program still be considered GPL? I suppose so if it is possible to create it from some source? It is becoming harder to check clones though. Although, the functionality of a program is maybe shown better in the final assembler and it is not so easy to tinker with assembler. To make something really better. So that is some form of protection.
It is pretty safe to say you have no clue about Brainfish and you obviously never even looked at its source. It is 99.9% SF and it had these options almost from the start. NUMA implementation is better than Ronald's but ofc he won't admit it :lol:.
Asmfish is 80% direct compile of SF from MinGW and 20% code tweaking.
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Compiling Stockfish dev for Large Pages

Post by Milos »

Nordlandia wrote:Sugar support Large Pages.

I managed to get large page working on one laptop but not on my primary desktop computer.

I did everything in Houdini manual.

Code: Select all

To enable this feature in Windows, you need to modify the Group Policy for your
account:
1. Run: gpedit.msc (or search for "Group Policy").
2.Under "Computer Configuration", "Windows Settings", "Security Settings", "Local
Policies" click on "User Rights Assignment".
3. In the right pane double-click the option "Lock Pages in Memory".
4.Click on "Add User or Group" and add your account or "Everyone".
5. You may have to logoff or reboot for the change to take effect.
For some strange reasons it won't be activated.
Lol, that's from old time when Robert didn't know how to enable user rights for large pages. In the meanwhile he learnt it so it is not required. Never looked at Sugar source but if there is a function Get_LockMemory_Privileges in tt.cpp it should be able to do it automatically, otherwise its implementation of Large Pages is probably broken.
User avatar
Eelco de Groot
Posts: 4561
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Compiling Stockfish dev for Large Pages

Post by Eelco de Groot »

Milos wrote: It is pretty safe to say you have no clue about Brainfish
I was and am just not that interested in the book code and I repeated what was written here in the forum as far as I have read it. They, Thomas, could have added some description of these changes on their pages. I assume many users are not aware either. Everybody is using "the Brainfish compile" if they want the fastest Stockfish compile, outside of the assembler version, including Stefan Pohl, but never mentioned this, at least not to my knowledge. I assume it is still the same benchnumber as Stockfish but with all the changes I find it more a derivative
and you obviously never even looked at its source.
I have not
It is 99.9% SF and it had these options almost from the start. NUMA implementation is better than Ronald's but ofc he won't admit it :lol:.
Asmfish is 80% direct compile of SF from MinGW and 20% code tweaking.
I have not checked their pages. I hope they will continue because a lot of people are now hooked on it.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Compiling Stockfish dev for Large Pages

Post by Milos »

Eelco de Groot wrote:I assume it is still the same benchnumber as Stockfish but with all the changes I find it more a derivative
When there is no book in the path Brainfish is 100% identical to Stockfish functionally (not only benchmark, but 100% identical code that is executed). There are only about 100 lines of code in total that are added and these are basically just added functionality so I find it wrong to call it a derivative.
It's simply SF with 3 additional options.
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: Compiling Stockfish dev for Large Pages

Post by Nordlandia »

Norman Schmidt:

Now it worked.

I forget i had to run Houdini as administrator!
User avatar
Houdini
Posts: 1471
Joined: Tue Mar 16, 2010 12:00 am

Re: Compiling Stockfish dev for Large Pages

Post by Houdini »

Nordlandia wrote:Norman Schmidt:

Now it worked.

I forget i had to run Houdini as administrator!
It is mentioned in the line after the paragraph you copied, the full instruction is this:

Code: Select all

To enable this feature in Windows, you need to modify the Group Policy for your account:
1.	Run: gpedit.msc (or search for "Group Policy").
2.	Under "Computer Configuration", "Windows Settings", "Security Settings", "Local Policies" click on "User Rights Assignment".
3.	In the right pane double-click the option "Lock Pages in Memory".
4.	Click on "Add User or Group" and add your account or "Everyone".
5.	You may have to logoff or reboot for the change to take effect.
 
IMPORTANT: You'll also need to run your chess GUI with administrative rights ("Run as Administrator") or disable UAC in Windows.
User avatar
Houdini
Posts: 1471
Joined: Tue Mar 16, 2010 12:00 am

Re: Compiling Stockfish dev for Large Pages

Post by Houdini »

Milos wrote:Lol, that's from old time when Robert didn't know how to enable user rights for large pages. In the meanwhile he learnt it so it is not required. Never looked at Sugar source but if there is a function Get_LockMemory_Privileges in tt.cpp it should be able to do it automatically, otherwise its implementation of Large Pages is probably broken.
What exactly do you mean?
Is there an easier way to enable Large Pages than what is specified in the Houdini manual?
I'm interested!
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Compiling Stockfish dev for Large Pages

Post by syzygy »

Milos wrote:
Eelco de Groot wrote:Thanks Ronald, I did not know, They are moving away further from Stockfish although they can still say it plays the same moves. It is logical to move to asmFish next. Can an assembler program still be considered GPL? I suppose so if it is possible to create it from some source? It is becoming harder to check clones though. Although, the functionality of a program is maybe shown better in the final assembler and it is not so easy to tinker with assembler. To make something really better. So that is some form of protection.
It is pretty safe to say you have no clue about Brainfish and you obviously never even looked at its source. It is 99.9% SF and it had these options almost from the start. NUMA implementation is better than Ronald's but ofc he won't admit it :lol:.
Asmfish is 80% direct compile of SF from MinGW and 20% code tweaking.
Feel free to point out what makes Brainfish's NUMA implementation better.

As to asmFish, I have to assume you have never looked at its code or are simply not able to read code. Apart from the TB code, all of asmFish was hand coded.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Compiling Stockfish dev for Large Pages

Post by syzygy »

Eelco de Groot wrote:Thanks Ronald, I did not know, They are moving away further from Stockfish although they can still say it plays the same moves. It is logical to move to asmFish next. Can an assembler program still be considered GPL? I suppose so if it is possible to create it from some source?
The assembly code is the source in the case of asmFish. There is no higher-level representation. The GPL cannot force a programmer to use a high-level programming language.