NN in Scorpio 3.0.11 is not loaded

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

Moderators: hgm, Rebel, chrisw

Carlos777
Posts: 1730
Joined: Sun Dec 13, 2009 6:09 pm

Re: NN in Scorpio 3.0.11 is not loaded

Post by Carlos777 »

Daniel Shawul wrote: Mon Feb 08, 2021 3:42 pm Hi Carlos,

There is an "EgbbProbe not loaded" in the message which is the problem.
Scorpio needs egbbdll compiled with NN/NNUE support to be able to run with NN and NNUE.

First, are you trying to run Scorpio on a machine without a GPU, because your installation is only for running Scorpio on CPU ?
Second try running the command

Code: Select all

scorpio.bat go quit
from the command line in the directory "C:\WinBoard-4.6.2\Engines\Scorpio_3.0.11\Scorpio\bin\Windows" to make sure
the installation is correct. It should show analysis from the start position. Please post that output.

Code: Select all

C:\WinBoard-4.6.2\Engines\Scorpio_3.0.11\Scorpio\bin\Windows>scorpio.bat go quit
feature done=0
Number of cores 4 of 4
treeht 81840078 X 328 = 25600.0 MB
processors [4]
ht 67108864 X 16 = 1024.0 MB
eht 262144 X 8 X 4 = 16.0 MB
pht 32768 X 24 X 4 = 3.0 MB
EgbbProbe not Loaded!
loading_time = 1s
# rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
# [st = 10835ms, mt = 29250ms , hply = 0 , moves_left 10]
My old PC does not have a GPU card and is not AVX compatible, so I guess that's the problem.

OTOH, I use the 3.0.8 classic version and 2.85 with montecarlo search enabled without problems.

This is my ini for the 3.0.8 version:

Code: Select all

###################################################
# log on/off   - turn logging on and off
# resign       - resign value in centipawns
# contempt     - +ve value discourages drawishness
###################################################
log                 on
resign              800
contempt            10
##################################################################
# montecarlo - Use montecarlo tree search (MCTS) if set to 1
# treeht - Maximum size of tree to store in memory given in MB.
#          Note that this memory is not allocated at start up; it only
#          specifies the maximum limit the tree could grow to.
#          Note: Don't think you are making scorpio weak by not setting
#          this memory to high value, infact treeht=0 is the strongest 
#          MCTS setting.
# frac_freeze_tree    [0 - 100] - freeze tree after this percentage of time is spent
# frac_alphabeta      [0 - 100] - rollouts alpha-beta search percentage when using AB-rollouts + MCTS with shared tree
# frac_abrollouts     [0 - 100] - rollouts alpha-beta search percentage when using AB-rollouts + AB with shared tree
# frac_abprior        [0 - 100] - standard alpha-beta search percentage when using AB + MCTS, and AB used as prior
# alphabeta_man_c     [0 - 32]  - switch to regular alpha-beta search with this many pieces on board
# mcts_strategy_depth [0 - 64]  - Lookahead depth for MCTS rollouts
# alphabeta_depth     [0 - 64]  - Fixed search depth for standard alphabeta searches at the leaves
# evaluate_depth      [-4 - 64]  - Fixed search depth for evaluation of new children during expansion 
#                                (-4=eval,-3=see,-2=recap qsearch,-1=no-checks qsearch 0=qsearch,x=search)
# backup_type         [0 - 7]   - minmax = 0, averaging = 1, mixed = 2, for mixing score with 
#                                 previous ID use 3,4,5 resp. 6 is classic MCTS, 7 is mixing by visit count
# reuse_tree                    - reuse MCTS tree between moves
# virtual_loss                  - virtual loss for parallel search
# visit_threshold               - minimum number of visits for minimax backup
# policy_temp                   - Temperature for move policy
# cpuct_init                    - Starting cpuct value
# cpuct_base                    - Denominator of cpuct forumula
# fpu_is_loss                   - FPU is loss (1=true, 0=false)
# fpu_red                       - Reduction factor for FPU
##################################################################
montecarlo          0
treeht              12800
frac_freeze_tree    100
frac_alphabeta      0
frac_abrollouts     20
frac_abprior        30
alphabeta_man_c     20
mcts_strategy_depth 30
alphabeta_depth     16
evaluate_depth      0
backup_type         6
reuse_tree          1
virtual_loss        1
visit_threshold     3200
policy_temp         235
cpuct_init          125
cpuct_base          19652
fpu_is_loss         0
fpu_red             33
#############################################################################
# Parallel search setup
#   mt            - number of processors
#   smp_depth     - split depth for smp
#   cluster_depth - split depth for cluster search
#   message_poll_nodes - number nodes to search before checking for message
#############################################################################
mt                  1
smp_depth           8
cluster_depth       12
message_poll_nodes  20
smp_type            ABDADA
cluster_type        YBW 
##################################################################
# Hashtable sizes in mb.
#      ht - main hash table shared by ALL threads
#     eht - evalualtion hash table allocated PER thread
#     pht - pawn hash table allocated PER thread
# Usually 1m or 2mb is enough for pawn hash table, but the others
# can be set as high as possible
##################################################################
ht                  128
eht                 4
pht                 1
##########################################################################
# EGBB
# egbb_path              - path to dll/so file for probing endgame egbbs 
# egbb_files_path        - path to endgame egbbs, if not specified it takes
#                          value of egbb_path
# egbb_cache_size        - cache size for egbbs in MBs
# egbb_ply_limit_percent - percent of plies from the root to egbb probing
# egbb_depth_limit       - depth from the leaves to egbb probing
# egbb_load_type         - egbb load type with the following values
#                    0 = none are loaded
#                    1 = all 3/4 men are loaded
#                    2 = Not implemented yet
#                    3 = all 5 men are loaded
##########################################################################
egbb_path                /home/daniel/egbb/
egbb_files_path          /home/daniel/egbb/
egbb_cache_size          32
egbb_load_type           3
egbb_depth_limit         6
#######################################
# NN
# use_nn                 - turn off/on neural network
# nn_cache_size          - neural network cache size in MBs
# nn_path                - path to neural network
# nn_type                - type of neural network (0=scorpio, 1=lczero)
# device_type            - CPU or GPU
# delay                  - Sleep threads for this amount. Set this to 1
#                          if you are using way too many threads than you
#                          have physical cores (maybe when >16x more).
# float_type             - inference precison for tensorrt = FLOAT/HALF/INT8
# wdl_head               - network has WDL head (e.g JH networks do)
# win/draw/loss_weight   - weights for WDL resp in precent, range is [0...1000]          
# min_policy_value       - minimum policy value in per mill. For 1%, set to 10
#######################################
use_nn                   0
nn_cache_size            200
nn_type                  0
wdl_head                 0
nn_path                  ../nets-scorpio/ens-net-12x128.pb
device_type              CPU
n_devices                1
delay                    0
float_type               HALF
win_weight               100
draw_weight              100
loss_weight              100
min_policy_value         10
################################################################
# Multiple nets settings
#------------------------
# The opening is played by default network specified above
#   nn_man_m/e      -- threshold piece counts for middle/end game
#   nn_type_m/e     -- neural network type for middle/end game
#                      >=0       = as specified before
#                      -1/-2/-3  = used to refer to either opening/midgame/endgame network
#   nn_path_m/e     -- path to neural networks for middle/end game
#   cpuct_init_m/e  -- cpuct for middle/endgame
#   policy_temp_m/e -- policy temperature for middle/endgame
#   wdl_head_m/e    -- wdl value head for middle/endgame
#   ensemble        -- percent of time to use ensembling [0-100]
#   ensemble_type   -- 0 = arthimetic mean, 1 = root mean cube
################################################################
nn_man_m                 24
nn_man_e                 14
nn_type_m                -1
nn_type_e                -1
nn_path_m                ../nets-scorpio/ens-net-12x128.pb
nn_path_e                ../nets-scorpio/ens-net-12x128.pb
cpuct_init_m             125
cpuct_init_e             125
policy_temp_m            235
policy_temp_e            235
wdl_head_m               0
wdl_head_e               0
ensemble                 0
ensemble_type            0
I use the exe, not the bat file.
User avatar
Sylwy
Posts: 4466
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: NN in Scorpio 3.0.11 is not loaded

Post by Sylwy »

An observation:
playing around with the Scorpio 3.0.11 settings, I noticed that using NNUEs doesn't make it necessary to use Scorpio egbbs.
An example:
-using 5-men egbb loaded into the RAM memory-82%
-using only 3 & 4-men loaded into the RAM memory-91%
The rest of the conditions were identical. I will do extensive testing (including the situations without using Scorpio egbbs). I will also use other networks.

Image

Image
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: NN in Scorpio 3.0.11 is not loaded

Post by Gabor Szots »

I set mt=1 in the ini file but Scorpio still uses 2 cores of my 4-core engine. What shall I do?
Gabor Szots
CCRL testing group
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NN in Scorpio 3.0.11 is not loaded

Post by Daniel Shawul »

Gabor Szots wrote: Thu Feb 11, 2021 6:59 pm I set mt=1 in the ini file but Scorpio still uses 2 cores of my 4-core engine. What shall I do?
Hi Gabor,

What mode are you running ? It should obey mt parameter for NNUE/HCE but the meaning of the mt
parameter is different for NNs. Please don't change the mt parameter in that case.
If you have a GPU it usually launches much more threads and will use all available cores.
It is possible to restrict it to use designated cores, but I don't recommend that.
When running on a CPU but using NN, the backend tensorflow may use all cores too.
I think easier would be to rate Scorpi as a multi-thread engine, since there is no easy solution for this.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NN in Scorpio 3.0.11 is not loaded

Post by Daniel Shawul »

Sylwy wrote: Tue Feb 09, 2021 7:41 pm An observation:
playing around with the Scorpio 3.0.11 settings, I noticed that using NNUEs doesn't make it necessary to use Scorpio egbbs.
An example:
-using 5-men egbb loaded into the RAM memory-82%
-using only 3 & 4-men loaded into the RAM memory-91%
The rest of the conditions were identical. I will do extensive testing (including the situations without using Scorpio egbbs). I will also use other networks.

Image

Image
Thanks for the tests!

I don't think using 5-men loaded into RAM hurts strength in the long run.
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: NN in Scorpio 3.0.11 is not loaded

Post by Gabor Szots »

Daniel Shawul wrote: Thu Feb 11, 2021 8:32 pm
Gabor Szots wrote: Thu Feb 11, 2021 6:59 pm I set mt=1 in the ini file but Scorpio still uses 2 cores of my 4-core engine. What shall I do?
Hi Gabor,

What mode are you running ? It should obey mt parameter for NNUE/HCE but the meaning of the mt
parameter is different for NNs. Please don't change the mt parameter in that case.
If you have a GPU it usually launches much more threads and will use all available cores.
It is possible to restrict it to use designated cores, but I don't recommend that.
When running on a CPU but using NN, the backend tensorflow may use all cores too.
I think easier would be to rate Scorpi as a multi-thread engine, since there is no easy solution for this.
Hi Daniel,

This is sad news for me. I wanted to run it as NN and I do not have a GPU. Maybe I'll set Scorpio to use NNUE. Thanks for the explanation.
Gabor Szots
CCRL testing group
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: NN in Scorpio 3.0.11 is not loaded

Post by Jamal Bubker »

Hi Daniel,
For using NN with Scorpio as henceforth I have a RTX 3080 Graphic card, I have installed Scorpio through the script install.bat.
The script is located in C:\Winboard and it created a folder named "Scorpio"
The script downloaded everything it seems but "the final test run" run by the script failed since it didn't show analysis from the start positions as the output shows below :
[url=https://postimg.cc/XrNNvh2B][img]https://i.postimg.cc/XrNNvh2B/Scorpio-p ... d-nets.jpg[/img][/url]

In the sub-folder "Windows" located in C:\winboard\Scorpio\bin\ , I can find scorpio.bat, scorpio.exe, scorpio.ini, calibrate.epd and calibrate.dat ( 400 Mb size for calibrate.epd).
In case of I want to use Scorpio in both winboard and Arena, I added, as you and jshriver recommand, the nnprobe-windows-gpu directory in Path by editing environment variable.

I just made a modification in scorpio.ini to change networks to use and also the path since the script install.bat chose "../nets-scorpio/ens-net-12x128.pb" as default path for "nn_path_m". Then I switched to "C:\winboard\Scorpio\nets-scorpio/ens-net-20x256.uff" path.

In "bin" folder, I launched scorpio.bat and type "go" .
"Here is the output :
feature done=0
Number of cores 20 of 20
treeht 81840078 X 328 = 25600.0 MB
processors [20]
ht 67108864 X 16 = 1024.0 MB
eht 262144 X 8 X 20 = 80.0 MB
pht 32768 X 24 X 20 = 15.0 MB
EgbbProbe 4.3 by Daniel Shawul
egbb_cache 4084 X 8216 = 32.0 MB
180 egbbs loaded !
nn_cache 2097152 X 512 = 1024.0 MB
Loading neural network : C:\winboard\Scorpio\nets-scorpio/ens-net-20x256.uff
With "INT8" precision
Loading graph on /gpu:0
go
Switching to "FLOAT" precision for GPU 0"

As you can notice, in the ouput, after "Loading graph on /gpu:0", nothing happened...
Then I type "go" and after few minutes (!) it has switched to "FLOAT".
But after the prompt freezed and i cannot use any command even "quit" ...

I tried to do a calibration by using the command "scorpio.bat runinpnn calibrate.epd calibrate.dat quit".
I tried this in prompt mode and aslo through Powershell but if didn't work :
"PS C:\winboard\Scorpio\bin\Windows> ./scorpio.bat runinpnn calibrate.epd calibrate.dat quit
feature done=0
Number of cores 20 of 20
treeht 81840078 X 328 = 25600.0 MB
processors [20]
ht 67108864 X 16 = 1024.0 MB
eht 262144 X 8 X 20 = 80.0 MB
pht 32768 X 24 X 20 = 15.0 MB
Error (unknown command): runinpnn
Error (unknown command): calibrate.epd
Error (unknown command): calibrate.dat
Bye Bye
PS C:\winboard\Scorpio\bin\Windows>"

Then I tried what pohl4711 recommanded (see http://www.talkchess.com/forum3/viewtop ... =2&t=72018) :
"create an empty textfile in the Windows/bin folder, rename it to a .bat-File, copy the text below in it, save the file and start the.bat-file with doubleclick):
scorpio.bat runinpnn calibrate.epd calibrate.dat quit"

Here the prompt started and shown indefinitely :

C:\winboard\Scorpio\bin\Windows>scorpio.bat runinpnn calibrate.epd calibrate.dat quit

C:\winboard\Scorpio\bin\Windows>scorpio.bat runinpnn calibrate.epd calibrate.dat quit

C:\winboard\Scorpio\bin\Windows>scorpio.bat runinpnn calibrate.epd calibrate.dat quit

C:\winboard\Scorpio\bin\Windows>scorpio.bat runinpnn calibrate.epd calibrate.dat quit etc .....

I quit the prompt after 40 mintes since calibrate.dat didn't change (no size or no date\hours\minutes file modification) ...
I should admit that i am not familiarized with prompt command and script and i am a real beginner :(
So maybe when running the command line "scorpio.bat runinpnn calibrate.epd calibrate.dat quit" i did a mistake ..
So how to run to launch exactly and properly "scorpio.bat runinpnn calibrate.epd calibrate.dat quit" ?

Please could you help me ?
I would really like tu use scorpio with NN !
Thank you,

Jamal.

PS: I should mention that scorpio in mcts mode and in NNUE+mcts works properly.
The GPU version of LeelaChess (version 0.27.rc1) works well and so I don't encounter any problem with my graphic card...
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: NN in Scorpio 3.0.11 is not loaded

Post by Daniel Shawul »

Hi Jamal,

The new graphics cards 3080 require new versions of cuda (11.1) and cudnn 8.
The default installation of Scorpio like you did will not work on a 3080 because that is compiled with cuda 10.
Cudnn 8 is more than 1 GB in size so I don't ship that.
If you have cuda 11 and cudnn 8 already installed on your system (you probaly have for lc0?) and they are avilable on for you
on your Path, then you can install scorpio for 3080s as
Scorpio to work with 3080 as follows

Code: Select all

install.bat --only-trt 72
This does not have cuda or cudnn libs so it will use the ones you have on your system.
That is how TCEC installs it on their TCEC system and i have checked it works on a 3090 that way.

Please follow the install instructions here
https://github.com/dshawul/Scorpio/blob ... INSTALL.md
It covers most issues on installation, but I guess i need to add some info for the newere GPUs.

regards,
Daniel
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: NN in Scorpio 3.0.11 is not loaded

Post by Jamal Bubker »

[quote="Daniel Shawul" post_id=883336 time=1613692428 user_id=628]
Hi Jamal,

The new graphics cards 3080 require new versions of cuda (11.1) and cudnn 8.
The default installation of Scorpio like you did will not work on a 3080 because that is compiled with cuda 10.
Cudnn 8 is more than 1 GB in size so I don't ship that.
If you have cuda 11 and cudnn 8 already installed on your system (you probaly have for lc0?) and they are avilable on for you
on your Path, then you can install scorpio for 3080s as
Scorpio to work with 3080 as follows
[code]
install.bat --only-trt 72
[/code]
This does not have cuda or cudnn libs so it will use the ones you have on your system.
That is how TCEC installs it on their TCEC system and i have checked it works on a 3090 that way.

Please follow the install instructions here
https://github.com/dshawul/Scorpio/blob ... INSTALL.md
It covers most issues on installation, but I guess i need to add some info for the newere GPUs.

regards,
Daniel
[/quote]

Thanks Daniel I will follow your advises and your instructions and i hope it will work :D :D
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: NN in Scorpio 3.0.11 is not loaded

Post by Jamal Bubker »

Hi Daniel,
I just want to thank you :D
I followed your instructions and Scorpio 3.0.11.3 MCTS NN works fine 8-) and is extremely strong (3400 elo at least :D) and has a very pleasant playing style !
It's s clearly a elo level contrast with standard version of Scorpio (No MCTS, No NN, No NNUE) which seems around 3000 elo with a nice playing style .
Since I grant more importance to the playing style than the pure elo strenght and i am very happy with both MCTS+NN and standard version.
I will try also these combo :
-scorpio MCTS+NNUE
-scorpio MCTS
-scorpio NNUE
-scorpio NN
I want to mesure the impact and the importance of use of MCTS in these combo :D