- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a Fortran executable that prints out the elapsed CPU time at the end of executaion using the CPU_TIME intrinsic. I use this information as a measure of the efficiency of different routines I implement in the code. I am using CVF 6.6.C. I noticed that when my computer had Windows 2000 as the OS, the reported run times did not change from one run to another when I executed the same program. However, with Windows XP I get slightly different run times each time I execute the same program. Does anybody know the reason for it? Is there a difference between XP and 2000 so that CPU_TIME works differently? Maybe Compaq never made adjustments to the compiler to compensate for the differences between the two OS, at least for the CPU_TIME intrinsic? Also, does anybody know how CPU_TIME works in IVF (can I expect consistency in reported run times)?
Thanks for any help,
John
I have a Fortran executable that prints out the elapsed CPU time at the end of executaion using the CPU_TIME intrinsic. I use this information as a measure of the efficiency of different routines I implement in the code. I am using CVF 6.6.C. I noticed that when my computer had Windows 2000 as the OS, the reported run times did not change from one run to another when I executed the same program. However, with Windows XP I get slightly different run times each time I execute the same program. Does anybody know the reason for it? Is there a difference between XP and 2000 so that CPU_TIME works differently? Maybe Compaq never made adjustments to the compiler to compensate for the differences between the two OS, at least for the CPU_TIME intrinsic? Also, does anybody know how CPU_TIME works in IVF (can I expect consistency in reported run times)?
Thanks for any help,
John
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any difference you are seeing is outside the control of the compiler and its runtime library. The system routine used to get the CPU_TIMEvalue is the same and there are no differences I know of between W2K and XP in this regard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There may be an initial load or virtual memory situation going on. To reduce these effects on your timing runs test your code by making several runs of the routine under test in a loop. Discount any runs that are abnormaly long. This will usualy bethe first run but it could be intermediate runs should your app happen to get charged for what would otherwise be considered operating system overhead.
Also, consider using QueryPerformanceCounter
Jim dempsey

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page