Compiling Stockfish dev for Large Pages

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
kranium
Posts: 1824
Joined: Thu May 29, 2008 8:43 am

Re: Compiling Stockfish dev for Large Pages

Post by kranium » Thu Sep 28, 2017 9:54 am

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: 3387
Joined: Wed Nov 25, 2009 12:47 am

Re: Compiling Stockfish dev for Large Pages

Post by Milos » Thu Sep 28, 2017 11:14 am

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: 3387
Joined: Wed Nov 25, 2009 12:47 am

Re: Compiling Stockfish dev for Large Pages

Post by Milos » Thu Sep 28, 2017 11:26 am

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: 4150
Joined: Sun Mar 12, 2006 1:40 am
Location: Groningen

Re: Compiling Stockfish dev for Large Pages

Post by Eelco de Groot » Thu Sep 28, 2017 12:43 pm

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: 3387
Joined: Wed Nov 25, 2009 12:47 am

Re: Compiling Stockfish dev for Large Pages

Post by Milos » Thu Sep 28, 2017 2:06 pm

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: 2410
Joined: Fri Sep 25, 2015 7:38 pm
Location: Sortland, Norway

Re: Compiling Stockfish dev for Large Pages

Post by Nordlandia » Thu Sep 28, 2017 2:47 pm

Norman Schmidt:

Now it worked.

I forget i had to run Houdini as administrator!

User avatar
Houdini
Posts: 1471
Joined: Mon Mar 15, 2010 11:00 pm
Contact:

Re: Compiling Stockfish dev for Large Pages

Post by Houdini » Thu Sep 28, 2017 4:36 pm

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: Mon Mar 15, 2010 11:00 pm
Contact:

Re: Compiling Stockfish dev for Large Pages

Post by Houdini » Thu Sep 28, 2017 4:37 pm

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: 4451
Joined: Tue Feb 28, 2012 10:56 pm

Re: Compiling Stockfish dev for Large Pages

Post by syzygy » Thu Sep 28, 2017 7:21 pm

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: 4451
Joined: Tue Feb 28, 2012 10:56 pm

Re: Compiling Stockfish dev for Large Pages

Post by syzygy » Thu Sep 28, 2017 7:28 pm

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.

Post Reply