Stockfish 10 and 2nd Gen Ryzen Question

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

Moderators: hgm, Rebel, chrisw

Arawn
Posts: 5
Joined: Mon Mar 16, 2015 8:17 am

Stockfish 10 and 2nd Gen Ryzen Question

Post by Arawn »

Hi guys, sorry if this is a dumb question or has been asked before. I tried to do my due diligence by Googling but couldn't find an answer.

What is the recommended Stockfish 10 to use with 2nd generaiton AMD Ryzen CPUs? I'm on a (relatively) cheap laptop that has a Ryzen 250OU. Also, so that I don't have to ask dumb questions like this in the future: is there a way to benchmark this CPU using different versions of Stockfish 10 to find out which is optimal?

Thanks!
jhellis3
Posts: 546
Joined: Sat Aug 17, 2013 12:36 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by jhellis3 »

On the command line just execute various versions followed by "bench"...

For your system, It will probably be the modern build.
Arawn
Posts: 5
Joined: Mon Mar 16, 2015 8:17 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Arawn »

jhellis3 wrote: Wed Dec 12, 2018 11:02 pm On the command line just execute various versions followed by "bench"...

For your system, It will probably be the modern build.
Hey thanks for the reply. Sorry to be dense but what would the command line instructions be? And also, on my Stockfish I have x64, POPCNT and BMI2.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Dann Corbit »

Arawn wrote: Wed Dec 12, 2018 11:10 pm
jhellis3 wrote: Wed Dec 12, 2018 11:02 pm On the command line just execute various versions followed by "bench"...

For your system, It will probably be the modern build.
Hey thanks for the reply. Sorry to be dense but what would the command line instructions be? And also, on my Stockfish I have x64, POPCNT and BMI2.
Ryzen does best with popcnt version.
Base version does not have special instructions and is slower.
BMI instructions run on Ryzen but are slow.

For Ryzen benchmarks with SF, look here:
http://www.ipmanchess.yolasite.com/amd- ... -bench.php

As for the bench command, you can just type bench and hit enter. But the full command format is:

bench <transposition table in MB> <thread count> <limit in milliseconds or plies> <file of EPD records> <depth OR movetime>

If you want milliseconds for the limit, then you must fill in movetime because depth is the default.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Geonerd
Posts: 79
Joined: Fri Mar 10, 2017 1:44 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Geonerd »

Arawn wrote: Wed Dec 12, 2018 11:10 pm Hey thanks for the reply. Sorry to be dense but what would the command line instructions be? And also, on my Stockfish I have x64, POPCNT and BMI2.
The syntax is presumably identical for the assorted SF versions, as well as ASMFish and Cfish, etc. programs that are based on SF.

From a command prompt / dos box, type, for example
SF_10_x64_modern.exe bench 1024 8 26
This gives you 1 gig hash, 8 threads, and 26 moves / ply? depth.
schack
Posts: 172
Joined: Thu May 27, 2010 3:32 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by schack »

Use popcnt or modern, depending on who did the compile. BMI2 is comparatively slow on Ryzen.
Arawn
Posts: 5
Joined: Mon Mar 16, 2015 8:17 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Arawn »

Thanks a lot guys. One more question for ya: is it still the case that one should set the number of threads to the amount of physical cores on the CPU? So if I want to use 6 threads, I would select "3" right? I've read before it's a good idea to keep one core open for the OS, which makes sense.

Thanks again for the help.
User avatar
CMCanavessi
Posts: 1142
Joined: Thu Dec 28, 2017 4:06 pm
Location: Argentina

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by CMCanavessi »

Arawn wrote: Thu Dec 13, 2018 6:58 am Thanks a lot guys. One more question for ya: is it still the case that one should set the number of threads to the amount of physical cores on the CPU? So if I want to use 6 threads, I would select "3" right? I've read before it's a good idea to keep one core open for the OS, which makes sense.

Thanks again for the help.
If you want to use 6 threads, just set threads to 6. As simple as that.
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls
schack
Posts: 172
Joined: Thu May 27, 2010 3:32 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by schack »

The 2500U has four cores and eight threads.

https://www.amd.com/en/products/apu/amd-ryzen-5-2500u

I'd set the cpu to four threads, matching your number of physical cores. I don't think hyperthreading is worth it, especially on a laptop. You could set to three if you wanted to keep some processing power for other tasks while the analysis is underway.

Good luck!
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Dann Corbit »

CMCanavessi wrote: Thu Dec 13, 2018 1:30 pm
Arawn wrote: Thu Dec 13, 2018 6:58 am Thanks a lot guys. One more question for ya: is it still the case that one should set the number of threads to the amount of physical cores on the CPU? So if I want to use 6 threads, I would select "3" right? I've read before it's a good idea to keep one core open for the OS, which makes sense.

Thanks again for the help.
If you want to use 6 threads, just set threads to 6. As simple as that.
It is worthwhile to test many different configurations.
Especially if you have lots of services running on the machine.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.