Page 1 of 1

Stockfish 10 and 2nd Gen Ryzen Question

Posted: Wed Dec 12, 2018 10:51 pm
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!

Re: Stockfish 10 and 2nd Gen Ryzen Question

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

For your system, It will probably be the modern build.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Wed Dec 12, 2018 11:10 pm
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.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Wed Dec 12, 2018 11:38 pm
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.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Thu Dec 13, 2018 12:40 am
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.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Thu Dec 13, 2018 1:52 am
by schack
Use popcnt or modern, depending on who did the compile. BMI2 is comparatively slow on Ryzen.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Thu Dec 13, 2018 6:58 am
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.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Thu Dec 13, 2018 1:30 pm
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.

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Thu Dec 13, 2018 3:37 pm
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!

Re: Stockfish 10 and 2nd Gen Ryzen Question

Posted: Thu Dec 13, 2018 8:30 pm
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.