Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29407 Discussions

IVF 11.0 + dll + Athlon XP = C000001D - Illegal Instruction exception???

Jugoslav_Dujic
Valued Contributor II
1,112 Views
I've encountered a "nice" problem where the binary dll created with ivf 11.0 (all versions) crashes on two Athlon XP (Processor x86 Family 6 Model 10 Stepping 0 AuthenticAMD ~1913 Mhz) computers, either during LoadLibrary (there is some minimal processing in DllMain) or during the first subsequent call. It either produces EXCEPTION_ACCESS_VIOLATION or EXCEPTION_ILLEGAL_INSTRUCTION.

The problem seems to be restricted to those AMD Athlon computers (95% of the company computers are Intel-based), and occurs in both Release and Debug configurations (default optimization levels, "Use Intel extensions" set to "None"). Run-time library is statically linked, but both debug multithreaded and multithreaded exhibit the same behavior.

To me, it seems that either compiler does SSE2 by default, or at least some functions in the run-time library in 11.0 are built with SSE2 instructions, which are apparently not supported by Athlon XP. However, a small test exe runs without problems. The dll crashes on quite trivial places (either DllMain or a small function that sets one global variable), not during anything special.

Does it light a bulb for someone?
0 Kudos
6 Replies
Jugoslav_Dujic
Valued Contributor II
1,112 Views
Quoting - Jugoslav Dujic
Does it light a bulb for someone?

RTFM, page 7 of Release notes:

Note: In version 11, the IA-32 architecture default for code generation has changed to assume that Intel Streaming SIMD Extensions 2 (Intel SSE2) instructions are supported by the processor on which the application is run.

I guess that answers my own question...

--
Edit: P.S. Do I earn status points by answering my own questions? :-P
0 Kudos
Steven_L_Intel1
Employee
1,112 Views
Quoting - Jugoslav Dujic
Edit: P.S. Do I earn status points by answering my own questions? :-P
You get points for reading the release notes!
0 Kudos
a_leonard
Novice
1,112 Views
Is there a good way to check if the processor running a code compiled with SSE2 can handle the instruction set? We don't want someone using our code on an old processor to get a run-time exception.
0 Kudos
Steven_L_Intel1
Employee
1,112 Views
You can write a small C routine that uses the CPUID instruction intrinsic to retrieve the information.
0 Kudos
TimP
Honored Contributor III
1,112 Views
You can write a small C routine that uses the CPUID instruction intrinsic to retrieve the information.
I've never seen an example of how to identify original Turion (prior to Turion X2) which had this problem of partial SSE2 implementation. Prior to 11.0 compilers, in 32-bit mode, the Intel option -QaxW dropped completely out of SSE path on such CPUs.
0 Kudos
Steven_L_Intel1
Employee
1,112 Views
I suppose one could also write a small Fortran program that used some SSE2 instructions and run it - if it dies, then report the error to the user.
0 Kudos
Reply