- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had thought that I purchased a compiler from Intel, not a marketing tool. Changing the compiler to deliberately nobble the performance of code when running on a competitor's chip is not IMHO acceptable business practise.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The most recent update of 8.0 compilers should have fixed the run-time issue with -xW and -xK on AMD processors. I don't believe the fix has been carried back to 7.1. It's not deliberate, it's an oversight, due to AMD processors not being supportedor tested with those options. Running options which are not supported on your processor is always done at your own risk. If it were deliberate, there would have been an explicit message displayed indicating non-support for your processor, rather than a crash with an unhandled CPUID result.
If you don't file reports on premier.intel.com on your problems with 8.0 compilers, they may not get corrected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the difference? The newer version, in the __intel_cpu_init internal function, checks the CPUID for the string "GenuineIntel". If that string is not present, the __intel_cpu_init function sets the CPU capability flags to zero, indicating that the processor doesn't support SSE2 or SSE or MMX or.... Hence if you have compiled code with -xK (which requires SSE support), it will crash on an Athlon XP chip: the code checks whether the CPU supports SSE, incorrectly finds out that it doesn't, and dies.
The code will work fine if compiled with -axK (ie check if SSE is supported, and run generic i386 code if it isn't), but the SSE code will _only_ run on Intel chips and not on any others, even if the other chips are perfectly capable of handling SSE instructions.
This isn't an Intel/AMD compatibility issue. This is a deliberate attempt by the compiler engineers to nobble the performance of IFC-produced code on non-Intel processors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Message Edited by sblionel on 06-25-2004 01:43 PM
- 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
Message Edited by sblionel on 06-25-2004 01:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dump of assembler code for function vmlsExp4:
0x08103ca0 [vmlsExp4+0]: testl $0xffffff00,__intel_cpu_indicator
0x08103caa [vmlsExp4+10]: jne 0x8103ff0
0x08103cb0 [vmlsExp4+16]: testl $0xffffff80,__intel_cpu_indicator
0x08103cba [vmlsExp4+26]: jne 0x8103cf0
0x08103cc0 [vmlsExp4+32]: testl $0xffffffff,__intel_cpu_indicator
0x08103cca [vmlsExp4+42]: jne 0x8169ef8 <__intel_cpu_dispatch_fail>
0x08103cd0 [vmlsExp4+48]: call 0x8169e04 <__intel_cpu_indicator_init>
0x08103cd5 [vmlsExp4+53]: jmp 0x8103ca0
In the old __intel_cpu_indicator_init() __intel_cpu_indicator is set to 128 on an Athlon XP (ie SSE available), so vmlsExp4 calls vmlsExp4.H and we're OK. In the new version, __intel_cpu_indicator is set to 1 (this is Not Intel), and we're off to __intel_cpu_dispatch_fail() which signals SEGV.
The fact that the linked-in libraries are all compiled with the -ax flags causes other problems (eg with programs migrating between architectures under openMosix), but that's a completely different whinge.
Anyway, the fact is that even if the -ax flags are not specified the corresponding code is still used, and the 'is this an Intel CPU' check in IFC 7.1.040 breaks programs on AMD processors completely unnecessarily. If I compile with -axK then the program works, but it doesn't use any of the SSE code on Athlons despite the fact that it works perfectly well and is faster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There was a discussion about this on the news groups a few months ago. I think
it was on comp.arch or the beowulf list, but I cannot find it right now.
Craig
- 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
On linux do 'cat /proc/cpuinfo'. On the 'flags' line it is clear that it can discern what specific CPU features are available.
The compiler and its support libraries ought to do the same. If "SSE" is available then use it, not whether it's a "Pentium 7" or any specific model.
In fact /proc/cpuinfo is a perfectly decent way to get at this---as the compiler targets Linux specifically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Message Edited by sblionel on 06-28-2004 02:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This patch removes the 'GenuineIntel' check made by the vectorised math library, so code compiled with -axK or -axW will use SSE/SSE2 code on non-Intel processors that support it.

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