- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using version 12.0.4 of the C++ compiler on ubuntu 2.6.35-30-generic. The CPU is an Intel Core i7-2630QM CPU @ 2.00GHz
Today I did a small OS update then recompiled some C++ code. On that C++ code the only compiler optimization flag I have is "-fast."
After compiling the code, my attempt to run it generates the following error message:
Fatal Error: This program was not built to run on the processor in your system.
The allowed processors are: Intel processors with SSE4.2 and POPCNT instructions support.
If I change the "-fast" flag to, say, -xN, the code works.
I am compiling and running the code on the same machine, and I had made no changes to the build process, my own libraries or the compiler settings. Any idea what might be causing this, and how I get the "-fast" optimization to work again?
Thanks!
Len
Today I did a small OS update then recompiled some C++ code. On that C++ code the only compiler optimization flag I have is "-fast."
After compiling the code, my attempt to run it generates the following error message:
Fatal Error: This program was not built to run on the processor in your system.
The allowed processors are: Intel processors with SSE4.2 and POPCNT instructions support.
If I change the "-fast" flag to, say, -xN, the code works.
I am compiling and running the code on the same machine, and I had made no changes to the build process, my own libraries or the compiler settings. Any idea what might be causing this, and how I get the "-fast" optimization to work again?
Thanks!
Len
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since -xN is deprecated and specifies optimization for an older processor, try the -xAVX and (separately) -xHost options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sounds strange. -fast is nothing else than a collection of the following options: -ipo O3 -no-prec-div -static -xHost. -xHost should identify the processor and set the right SSE switch (-xAVX for i7 2xxx).
-fast is a prototype switch that shall show best possible performance just "out of the box". On real projects you shall consider using proper switches that achieve best performance.
What happens if you use the full "fast" options list: -ipo O3 -no-prec-div -static -xHost? You may consider to use only a suitable subset of these options such as -O3 -xHost.
Hubert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying both of these shortly. Thank you for the ideas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Both worked - thank you very much.
I suspect that the issue may have been an aborted build with differnet compiler options, which may not have cleaned up its environment. I can now rebuild with the standard -fast option now, too.
Thanks again.
Len
I suspect that the issue may have been an aborted build with differnet compiler options, which may not have cleaned up its environment. I can now rebuild with the standard -fast option now, too.
Thanks again.
Len
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It has become a habit for me that when I change optimization options I recompile all input sources, for this very reason. I have rarely come across situations where compilation times are so large that I would think of not recompiling in order to save time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My approach in case of optimizationsisvery simple:
Debug Configuration: Disable
Release Configuration: Disable
Somesoftware products require as higher as possible portability andit is impossibleto rely on optimizations by a C/C++ compiler during R&D phase.
Debug Configuration: Disable
Release Configuration: Disable
Somesoftware products require as higher as possible portability andit is impossibleto rely on optimizations by a C/C++ compiler during R&D phase.

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