lantonov / asmFish

A continuation of the nice project asmFish by Mohammed Li. Latest version: 07.08.2019

Home Page:https://lantonov.github.io/asmFish/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option NodeAffinity, how to set up?

ClemensKeck opened this issue · comments

Hello Ladies and Gentlemen

I have a machine which has 2 cpu on motherboard. (2 x E5-2697A v4) . Each cpu has 16 cores , so 32 cpu in total (NO hyperthreading). If I want to make asmfish using only 16 cores how can I make it, that it is using all those 16 cores from one cpu, means node 0 or node 1?

Any hint appreciated.
C.K.

commented

The official stockfish only shares the main hash among cores and has per-thread tables for everything else, so numa awareness is a moo point in official. asmFish currently shares the cmh table among threads in the same node. For your machine you have essential three options

  1. setoption name nodeaffinity value all
    This is the default and will try to use all of the nodes in your machine.
  2. setoption name nodeaffinity value none
    This disables numa awareness and tells the OS nothing about where to put stuff.
  3. setoption name nodeaffinity value 0 (or setoption name nodeaffinity value 1)
    This tell the OS to try put all of the stuff on node 0 (or node 1)

Option 2) is probably what you want since the OS should be smart enough to put everything on the same node if you request the same number of threads as there are cores on each node. The problem with 3) is with multiple instances - if you are running more than one instance of the program and they are both pinned to node 0, then they are going to be fighting for time. Option 1) is also not good for this same reason, since multiple instances will be using the nodes in the same way.

commented

You can see what the program is doing like this. Node number -1 is a dummy node. If you are running on a windows box, you will get a group number in addition to a 64bit mask.

$ ./pfish
pedantFishL_2017-05-25_popcnt
setoption name nodeaffinity value all
info string node 0 parent 0 cores 4 mask 0x000000000000000f
setoption name threads value 4
isready
info string node 0 has threads 0 1 2 3
readyok

setoption name nodeaffinity value none
info string node -1 parent -1 cores 1 mask 0x0000000000000000
info string node -1 has threads 0 1 2 3

setoption name nodeaffinity value 0
info string node 0 parent 0 cores 4 mask 0x000000000000000f
info string node 0 has threads 0 1 2 3

quit