- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- 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
The closest that I can come to your hardware and compiler versions is the following:
AMD 64-X2 4200+, Windows XP SP3, Windows XP X64 SP1.
Intel Compiler ICC 12.1, IA32; Microsoft C 15.0 X86
MKL 10.2.5, IA32; MKL 10.3.6
With none of the compilers and MKL versions listed above did I see any negative values.
By asking for a combination of an older generation processor, an older OS and older compiler and MKL versions, you greatly reduced the probability of people who would be able to match your setup.
- 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
MKL dsecnd() function is implemented over hardware Time Stamp Counter register via RDTSC instuction
whichused with serialized instructions
mov eax, 00h; cpuid
to get current CPU time counter.
Negative values are possible if different CPUs have started differently or theirtime stamp countersare not synchronized.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DWORD_PTR mask = 1;// CPU #0
mkl_set_num_threads(1); // force MKL init
SetThreadAffinityMask(GetCurrentThread(),mask);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DWORD_PTR mask = 1;// CPU #0
mkl_set_num_threads(1); // force MKL init
SetThreadAffinityMask(GetCurrentThread(),mask);
Thank you very much for your attention to my problem. With your help this error seems to be fixed in my case. (or it just doesn't reproduce itself now:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my experience, they have always agreed within a fraction of a microsecond on Intel products, as for several years these counters have been tied to the buss clock, so should not drift apart.
Even so, measures are recommended to assure that you don't compare TSC counters among CPUs (by using the same hardware thread when measuring time intervals). Thanks for bringing this up and to the MKL support people for explaining a method for dealing with the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. Maybe youheard about some libraries/tools which sometimes reset affinity mask.
Also please be informed about the folowing:
"Setting an affinity mask for a process or thread can result in threads receiving less processor time, as the system is restricted from running the threads on certain processors. In most cases, it is better to let the system select an available processor."
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page