08-14-2018 06:44 AM
Hi there,
I want to determine if my programe on the host is deterministic. The thing is that when I use the benchmarking technique and execute the code, the time is variable. How can I fix this?
Thanks in advance.
Cheers, Iñigo.
Solved! Go to Solution.
08-14-2018 06:46 AM
@IñigoP wrote:
Hi there,
I want to determine if my programe on the host is deterministic. The thing is that when I use the benchmarking technique and execute the code, the time is variable. How can I fix this?
Thanks in advance.
Cheers, Iñigo.
I suspect that the variance should already tell you something about determinism on your computer?
08-14-2018 07:47 AM
Well, if you posted the code (meaning something we could examine and, optionally, execute), we might be able to help you answer that question. What do you mean by "deterministic"? I presume you are running it on a Windows PC, which "allows" code to run according to its scheduling algorithm (oops, time for a Virus scan, oops, check if Adobe software needs to be updated, etc.). Your code might also have "non-determinism" built into it -- does it do I/O, for example?
Bob Schor
08-14-2018 08:05 AM
Hello,
Is it possible to achieve determinism on a windows PC? I have a programme, but when I'm trying to benchmark it, I obtain an overflow on the counter (the maximum value for an U32). What can it be?
Thank you.
Cheers, Iñigo.
08-14-2018 08:08 AM
Determinism is also relative. Loop cycle times of a few seconds with a simple loop can be sort of deterministic in Windows.
Best way to measure the determinism is to use another device to time it. If you have a daq connected you can for instance trigger a digital output and measure it with an oscilloscope.
08-14-2018 08:16 AM
First of all better to show your code/example of your problem.
Now It is very difficult (impossible?) to say, why your counter is overflow
08-14-2018 09:17 AM
Here you have the program. You can see that the 2 ways I use to benchmark show different times, maybe I'm doing it wrong... I don't know...
08-14-2018 09:26 AM - edited 08-14-2018 09:27 AM
yes, both wrong. In both cases, you subtract a larger value from the smaller
see correct
08-14-2018 09:29 AM
ooh..... I see it know!! Thank you so much!