Stockfish 10 and 2nd Gen Ryzen Question

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Arawn
Posts: 5
Joined: Mon Mar 16, 2015 7:17 am

Stockfish 10 and 2nd Gen Ryzen Question

Post by Arawn » Wed Dec 12, 2018 9:51 pm

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: 370
Joined: Fri Aug 16, 2013 10:36 pm

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by jhellis3 » Wed Dec 12, 2018 10:02 pm

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 7:17 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Arawn » Wed Dec 12, 2018 10:10 pm

jhellis3 wrote:
Wed Dec 12, 2018 10: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: 9341
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Dann Corbit » Wed Dec 12, 2018 10:38 pm

Arawn wrote:
Wed Dec 12, 2018 10:10 pm
jhellis3 wrote:
Wed Dec 12, 2018 10: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: 60
Joined: Fri Mar 10, 2017 12:44 am

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Geonerd » Wed Dec 12, 2018 11:40 pm

Arawn wrote:
Wed Dec 12, 2018 10: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: 117
Joined: Thu May 27, 2010 1:32 am
Contact:

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by schack » Thu Dec 13, 2018 12:52 am

Use popcnt or modern, depending on who did the compile. BMI2 is comparatively slow on Ryzen.

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

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Arawn » Thu Dec 13, 2018 5: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.

User avatar
CMCanavessi
Posts: 826
Joined: Thu Dec 28, 2017 3:06 pm
Location: Argentina

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by CMCanavessi » Thu Dec 13, 2018 12:30 pm

Arawn wrote:
Thu Dec 13, 2018 5: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: 117
Joined: Thu May 27, 2010 1:32 am
Contact:

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by schack » Thu Dec 13, 2018 2:37 pm

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: 9341
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: Stockfish 10 and 2nd Gen Ryzen Question

Post by Dann Corbit » Thu Dec 13, 2018 7:30 pm

CMCanavessi wrote:
Thu Dec 13, 2018 12:30 pm
Arawn wrote:
Thu Dec 13, 2018 5: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.

Post Reply