arm 1 cpu 1 thread and stockfish nondeterministic

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

stavros
Posts: 165
Joined: Tue Dec 02, 2014 1:29 am

arm 1 cpu 1 thread and stockfish nondeterministic

Post by stavros »

hi.its well known that arm cpu's dont use hyperthreading so i made a test on my
old alcatel 1 cpu arm a9 512mb ram ,i use droidfish and i played without book the first 7 moves many times, the results were deterministic (same move reply with same eval etc)
then i tried this:uci engines option set threads from 1 to 2
the results were suprised to me:different evals, sometimes different moves
showing a totaly nondeterministic results!
can anyone explain that? tnx
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by hgm »

If you run multiple threads the results will depend on the relative timing of the threads. Whether your CPU uses hyperthreading is not relevant. Different threads will still receive unpredictable amounts of CPU time due to everthing else going on the system.
stavros
Posts: 165
Joined: Tue Dec 02, 2014 1:29 am

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by stavros »

yes ok but my ARM A9 cortex use 1 core and no hyperthreading
if i set stockfish uci options:set to 2 threats its like the cpu produces more than 1 thread
nondeterministic results,how 1 arm core can do this ?except due to arm architecture
u can use a non deterministic algorithm, and a software (stockfish uci parameters) activated it.
the only i know is 1 core=deterministic, and an program(stockfish set threads to 2)
change that!
MahmoudUthman
Posts: 234
Joined: Sat Jan 17, 2015 11:54 pm

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by MahmoudUthman »

multiple threads don't require multiple cores , are you implying that there is something different regarding the ARM architecture ?
kbhearn
Posts: 411
Joined: Thu Dec 30, 2010 4:48 am

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by kbhearn »

stavros even with 1 core multiple threads aren't deterministic. They will both be given running time but the amount they'll get will depend on system interrupts and system load and how the scheduler reacts to those conditions. As such the hash table that a thread sees will be different each time you run the same search and occasionally that will produce different moves in the same way that running multiple threads on a multicore machine does.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by bob »

stavros wrote:hi.its well known that arm cpu's dont use hyperthreading so i made a test on my
old alcatel 1 cpu arm a9 512mb ram ,i use droidfish and i played without book the first 7 moves many times, the results were deterministic (same move reply with same eval etc)
then i tried this:uci engines option set threads from 1 to 2
the results were suprised to me:different evals, sometimes different moves
showing a totaly nondeterministic results!
can anyone explain that? tnx
Expected. The OS kernel switches between threads based on a timer. A very COARSE timer. Each time you run it, the threads will run for slightly different times, which causes this.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by bob »

stavros wrote:yes ok but my ARM A9 cortex use 1 core and no hyperthreading
if i set stockfish uci options:set to 2 threats its like the cpu produces more than 1 thread
nondeterministic results,how 1 arm core can do this ?except due to arm architecture
u can use a non deterministic algorithm, and a software (stockfish uci parameters) activated it.
the only i know is 1 core=deterministic, and an program(stockfish set threads to 2)
change that!
You still have interrupts, and then the time-slicing between the threads is wildly variable since the timer is so coarse. This is EXACTLY what makes true SMP search non-deterministic.
stavros
Posts: 165
Joined: Tue Dec 02, 2014 1:29 am

Re: arm 1 cpu 1 thread and stockfish nondeterministic

Post by stavros »

bob wrote:
stavros wrote:hi.its well known that arm cpu's dont use hyperthreading so i made a test on my
old alcatel 1 cpu arm a9 512mb ram ,i use droidfish and i played without book the first 7 moves many times, the results were deterministic (same move reply with same eval etc)
then i tried this:uci engines option set threads from 1 to 2
the results were suprised to me:different evals, sometimes different moves
showing a totaly nondeterministic results!
can anyone explain that? tnx
Expected. The OS kernel switches between threads based on a timer. A very COARSE timer. Each time you run it, the threads will run for slightly different times, which causes this.
aha! excelent explanation tnx bob:)