Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

ICL XE 2011 SP1: Visual Studio 1010 compiles fine with /Qip, but with /Qipo generates wrong code

Marián__VooDooMan__M
New Contributor II
345 Views
Greetings,

I am using Viusual Studio 2010 and Intel C++ Composer Update 6, that is ICL XE 2011 SP1

When I compile project (in MSVC environment) with "/Qip" (==single file, simple intra-unit optimizations), everythings works just fine.

But when I change it to "/Qipo" (==optimizes by regarding multiple files/units/extern calls) - and there is NOTHING I have change in MSVC configuration, expect for this option (changed from /Qip to /Qipo) - I get Windows exception "Invalid OP code" upon run/execute. Next thing to do was to use unassembling feature of MSVC, and I fond strange call in this case: literalily:

--- snip ---
000000013F6506AA call __intel_sse4_strlen (13F396CB0h)
--- snip ---

This code is causing a crash of the application, because I have Intel CPU, that can't handle SSE4, but only SSE3 or below versions of streaming instructions.

NB: I have in both cases set-up MSVC to use "/QxHost" switch, so it should be working without exception "Illegal instruction" mentioned above.

Too bad I don't have time to write small test-case to reproduce this bug.

Best,
vdm
.
0 Kudos
9 Replies
TimP
Honored Contributor III
345 Views
/Qxhost is an ICL option, not an MSVC option. I assume you put it in the ICL C++ properties of your project. If you compile any of the objects on an SSE4 machine, this invocation of sse4 library is expected. It makes a .exe which requirest that architecture at run time. Perhaps you should set your properties to /arch:SSE3 and avoid Qxhost. The latter is not among my favorite options.
0 Kudos
Marián__VooDooMan__M
New Contributor II
345 Views
Yes, I did put it into MSVC options.

But IMHO it is a rather bug in ICL. It is not honoring CPU type when I use /QxHOST in MSVC.

PS: /arch:SSE3 indeed resolved my issue... But I wish to use /QxHOST to make my code more portable to get all benefits from CPU that my code is compiled on. Please, could you file a bug report to intel?
0 Kudos
TimP
Honored Contributor III
345 Views
Specifying a specific architecture is a more effective way to "get all benefits from CPU" and you must take care not to specify an architecture which isn't supported by every CPU you will run on. You indicate that you have a CPU which doesn't support SSE4.1, which would indicate that it is either an AMD (in which case only SSE2/SSE3 will work) or a Woodcrest/early core2 compatible, in which case SSSE3 may improve over SSE3.
To give an example, it's not unusual to see /QxSSE3 or /QxSSE4.1 giving better performance on Westmere than /QxHost.
There is no way anyone can file a bug report without all the necessary details; supposing that you have an AMD CPU for which /QxHost is erroneously choosing SSE4.1, the exact identity of that CPU would be a necessary detail.
0 Kudos
Marián__VooDooMan__M
New Contributor II
345 Views
/QxHOST worked just fine, until I have upgraded ICL to SP1 (XE 2011).

Also, there are issues (compile errors) in SP1 with /MP, it couldn't open *.tlog files because of locking them by other instances of running compiler.

PS: I'd like to use /QxHOST, because I am the only user of my project, and the project is intended only for my own purposes on my own machine.
0 Kudos
iccuser
Beginner
345 Views
I can verify that there is a problem with /MP and .tlog files with the latest update 6 (along with various other errors and warnings). I had to roll back to update 5. And this is not specific to any code, just use /MP.
0 Kudos
Marián__VooDooMan__M
New Contributor II
345 Views
Quoting iccuser
(...) I had to roll back to update 5. (...)

Same here.

0 Kudos
Marián__VooDooMan__M
New Contributor II
345 Views
Quoting TimP (Intel)
(...)
There is no way anyone can file a bug report without all the necessary details; supposing that you have an AMD CPU for which /QxHost is erroneously choosing SSE4.1, the exact identity of that CPU would be a necessary detail.

I know for sure, I have Intel Core 2 Quad Q6700, 2.66 GHz, overclocked to 2.72 GHz.

Even Processor ID Utility is stating that. It reports SSE3 is the highest supported streaming extension. Other information it provides is SSE4=no, AVX=no, AES new instructions=no, Virtualization techs.=yes, hyperthreading=no, I64Arch.=yes; CPUID data: type=0, family=6, model=F, Stepping=B, and revision=B6; LGA775 socket; NX bit=yes, Enhanced Halt State=yes; Chipset ID=2916.

Running MSVC 2010, on Vista Ultimate x64.

There should be filed a bug report.

0 Kudos
TimP
Honored Contributor III
345 Views
You're entitled to file the problem report yourself and assure that you got all the requested details correct. I don't have an idea whether overclocking could invalidate the operation of /QxHost, but it seems simple enough to test whether /QxSSE3 or /QxSSSE3 gives you best results.
0 Kudos
Marián__VooDooMan__M
New Contributor II
345 Views
Quoting TimP (Intel)
You're entitled to file the problem report yourself and assure that you got all the requested details correct. I don't have an idea whether overclocking could invalidate the operation of /QxHost, but it seems simple enough to test whether /QxSSE3 or /QxSSSE3 gives you best results.

Of course, /QxSSSE3 resolved my issue. But how where should I place/write/send bug report, that this version of ICL has problem with /QxHOST ?
0 Kudos
Reply