- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have written a simple example which differenciates between the apparent precision of system_clock, given by Count_Rate, and the actual precision available from the different values returned.
I have run this example on ifort Ver 11.1, which I have installed.
It shows that both CPU_TIME and SYSTEM_CLOCK have only 64 ticks per second, which is very poor precision available via the Fortran standard intrinsic routines.
Better precisoin is available ( see QueryPerformanceCounter) and should be provided in these intrinsic routines.
John
Link Copied
- « Previous
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
I updated the program testing variability. As SYSTEM_CLOCK and CPU_TIME intrinsics only tick at 64 cycles per second, I also tested GetPerformanceCounter, which has a much higher rate, so that the variability is more noticeable. The intrinsics do still show some variabliity in the elapsed time test.
The results for my processor show the accuracy of the 3 timing routines tested ( using RDTSC as the reference) are:
CPU_TIME Variability Test
Calls per second = 6629241.52383241
Cycles per second = 64.1021553426797
cpu_time accuracy = 1.560009947643979E-002 seconds
average RDTSC ticks per cycle 41599668.8534031
standard deviation (in ticks) 135195.923755431
variability 3.249927883605512E-003
System_Clock Variability Test
Calls per second = 8672321.84910597
Cycles per second = 64.1081552551243
System_Clock accuracy = 1.559863945578231E-002 seconds
average RDTSC ticks per cycle 41599764.0136054
standard deviation (in ticks) 80004.3281514126
variability 1.923191874964643E-003
Query_Perform Variability Test
Calls per second = 46191928.3624866
Cycles per second = 2589364.74907529
Query_Perform accuracy = 3.861951084168883E-007 seconds
average RDTSC ticks per cycle 1029.87607752155
standard deviation (in ticks) 1072.71121520382
variability 1.04159251643689
The key variability measures which measure the accuracy of when each routine ticks over are:
cpu_time : standard deviation (in ticks) 135,195. ( 51 microseconds)
System_Clock : standard deviation (in ticks) 80,004. ( 30 microseconds)
Query_Perform : standard deviation (in ticks) 1,072. ( 0.4 microseconds)
This test shows there is some variation in GetPerformanceCounter, but is less effective for CPU_Time and Syetem_Clock, in showing the outriders (significant variation in the time between ticks), due to their long tick duration. However it does show a large variation in their tick rate in comparison to Query_Perform, when measured as time. All this is based on the assumption of the accuracy of RDTSC.
GetPerformanceCounter displays the effect of other system interuption for reporting it's tick interval.
The purpose of this test was to try and estimate the reliability and accuracy of the tick intervals.
John

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
- Next »