Thread: Prime95 30.7
View Single Post
Old 2021-10-14, 08:50   #68
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

23·3·5·7 Posts
Default

Quote:
Originally Posted by Zhangrc View Post
The bug […]
This problem is really hard to reproduce – I tried multiple times over multiple versions. Sometimes it is there, sometimes not. I remember some posts in the past mentioning this problem, it even occurred to me that I myself reported it some time ago – but I could not find it then.

The problem happens when the text box looses focus. In the video, you can see that it changes back briefly to 3 when the window gets closed, but only if you enter a smaller value.

But lets have a look at the code… The problem is (assumption here, but I'm relatively sure) the function min_cores_for_work_pref which gets called from the event handler when leaving the text box. These lines are important (from 30.6b4 source):
Code:
cores = cores * 24 / CPU_HOURS;
if (cores > (int) NUM_CPUS) cores = NUM_CPUS;
You have NUM_CPUS = 8 in your example. Assuming you set 8 h per day, cores = cores * 24 / 8. Since cores is set to 1 before that snippet, because you are not running 100M digit tests (then it would be 4), cores will be 3 afterward. This value gets returned (in this case 3) and set back into the text box (lines 328-332 and 335, 336 and 339-340 in WorkerDlg.c). This should happen for CPU_HOURS from 8 to 11, inclusively.

@George: You might have to set your CPU hours per day to e.g. 1, have multiple workers and then should be able to reproduce this.

Last fiddled with by kruoli on 2021-10-14 at 09:23 Reason: Small corrections.
kruoli is offline   Reply With Quote