The paper, Optimizing Applications with the IntelŪ C++ and Fortran Compilers for Windows* and Linux*, explains how to use the Intel compilers to optimize for the Pentium 4 and Itanium processors and is available at http://www.intel.com/software/products/compilers/ . Additional information on the Intel Software Development Products is available at http://www.intel.com/software/products/ .
The IntelŪ C++ Compiler for IA-32 based applications contains the following components:
<install-dir>/doc/doc_index.htm
The IntelŪ C++ Compiler for Intel EM64T-based applications contains the following components:
<install-dir>/doc/doc_index.htm
The IntelŪ C++ Compiler for Itanium-based applications contains the following components:
<install-dir>/doc/doc_index.htm
The Intel® C++ Compiler for Linux (IA-32 only) includes compiler integration with Eclipse* and the C/C++ Development Tools* (CDT). This functionality is an optional part of the compiler installation.
Eclipse is an open source software development project dedicated to providing a robust, full-featured, commercial-quality, industry platform for the development of highly integrated tools. It is an extensible, open source Integrated Development Environment (IDE).
The CDT (C/C++ Development Tools) project is dedicated to providing a fully functional C/C++ IDE for the Eclipse platform. CDT is layered on Eclipse, and provides a C/C++ development environment perspective.
The Intel C++ Compiler integration with the Eclipse/CDT IDE lets you develop, build, and run your Intel C/C++ projects in a visual, interactive environment.
See Also
The following section discusses new features and changes in the Intel C++ Compiler version 9.0 and updates to 9.0. Please see the separate release notes for the Intel Debugger.
This section briefly lists compiler options that provide new functionality in this release.
Some compiler options are only available on certain systems, as indicated by these labels:
If no label appears, the option is available on all supported systems. If "only" appears in the label, the option is available on the identified system(s) only.
For more details on the options, refer to the Alphabetical Compiler Options section of the Intel C++ Compiler for Linux User's Guide.
The compiler for Intel EM64T now defines the preprocessor symbol __X86_64__
for
use in conditionalizing applications for this platform.
-O2
When the default optimization level (-O2
) is specified,
the compiler now performs certain interprocedural and loop optimizations
that were formerly performed only when -ip
or -O3
were
specified. We invite your comments as to the effect of this change
on performance (both run-time and compile-time) as well as application
results.
The new -ssp
option enables Software-based Speculative
Pre-computation (SSP) optimization, which is also called Helper-Threading
optimization. This feature provides a way to dynamically prefetch data cache
blocks to reduce the impact of memory latency. It exploits the
properties of source code constructs (such as delinquent loads and
pointer-chasing loops) in applications.
SSP directly executes a subset of the original program instructions, called a slice, on separate threads alongside the main computation thread, in order to compute future memory accesses accurately. The helper threads run ahead of the main thread and trigger cache misses earlier on its behalf, thereby hiding the memory latency.
To be effective, SSP techniques require construction of efficient helper threads and processor-level support, such as Hyper-Threading Technology (HT Technology) support, which allows multiple threads to run concurrently with a shared cache. These techniques include:
The results of SSP vary because each program has a different profile and different opportunities for SSP optimizations. For guidelines to help you determine if you can benefit by using SSP, see the topic "Software-based Speculative Precomputation (IA-32)" in the Profile-Guided Optimization section of your Optimizing Applications guide.
A number of improvements have been made to the optimization reports. For
example, loop optimization reports, selected with -opt_report_phase
hlo
,
now have more detailed line number information for unrolled loops,
and identifiers for multiple versions of loops.
-ipo
When - ipo
is specified, the compiler now, by default, can
produce multiple intermediate object files for input to the linker,
rather than a single file. This can improve performance of the link
phase. You can adjust this behavior by specifying a value for -ipo
.
Please refer to the Compiler Options Guide for more information.
This version of the Intel C++ Compiler has improved diagnostic capabilities which may result in new informational, warning or error messages when your application is recompiled.
-xP
and -axP
Code Generation Switches The -xP
and -axP
switches specify generation of
specialized code for Intel processors supporting the Streaming SIMD Extensions
3 (SSE3), including the Intel® Core™ processors.
struct
Containing long
double
ElementsOn Itanium systems only, calls to a function whose return value was a struct
that consisted solely of 80-bit floating point types (C/C++ long double
or long double complex
), and whose size was greater than 64 bytes
but less than or equal to 256 bytes, incorrectly returned the function value on
the stack instead of in floating point registers. For example:
typedef struct {
long double f1;
long double f2;
long double f3;
long double f4;
long double f5;
} HFA;
HFA f(void);
The incorrect return value mechanism violates the Itanium calling conventions and is incompatible with gcc (which obeys the published calling conventions). The Intel C++ Compiler for Linux has been corrected in versions later than 8.1.023 so that these structs are returned properly, but this change makes such functions and calls to them incompatible with code compiled by version 8.1.023 and earlier. You should recompile all files that either call a function that returns such values, or contain such a function, using the latest version of the Intel C++ Compiler for Itanium-based Systems.
GCC_EXEC_PREFIX
Environment VariableIf you specify a value for the GCC_EXEC_PREFIX
environment variable, the compiler uses the value as a
prefix to the following:
ld
and as
If the value specified is a directory, the compiler treats it as a path. For example, if GCC_EXEC_PREFIX=/my/path/
then gcc tool ld
becomes /my/path/ld
and the compiler treats it as a path to the tool.
Note that the tool must exist in the specified path or the path is ignored and the compiler searches for the tool in
default directories.
Library search paths are modified to include the specified prefix for crt*.o
objects. The prefix is also used as an -L
search path.
This feature is useful if you want to use an alternate set of gcc tools and libraries.
Note that if -Ldir
or -Bdir
is specified on the
command line, they take precedence for library search paths over the environment
variable.
The order of precedence is as follows (highest to lowest):
-Ldir
-Bdir
GCC_EXEC_PREFIX
environment variable Applications built to take advantage of Intel EM64T can be built with one of three memory models:
-mcmodel=medium
)-mcmodel=large
)IP-relative addressing requires only 32 bits, whereas absolute addressing requires 64-bits. This can affect code size and performance (IP-relative addressing is somewhat faster.)
Note: When the medium or large memory models are specified, you must also specify -i-dynamic to ensure that the correct dynamic versions of the Intel run-time libraries are used.
When shared objects (.so) are built, Position-Independent Code (PIC)
is specified (-fpic
is added by the compiler driver) so
that a single .so can support all three memory models. However, code
that is to be placed in a static library, or linked statically, must
be built with the proper memory model specified. Note that there is
a performance impact to specifying the Medium or Large memory models.
libimf
linking change on Intel EM64TIn some earlier versions of Intel C++ Compiler, applications built
for Intel EM64T linked by default to the dynamic (shared object) version
of libimf
, even though other libraries were linked statically. As of
version 9.0.031, libimf
is linked statically unless -i-dynamic
is used.
This matches the behavior on IA-32 systems. You should use -i-dynamic
to specify the dynamic Intel libraries if you are linking against shared
objects built by Intel compilers.
A side effect of this change is that users may see the following message from the linker:
warning: feupdateenv is not implemented and will always fail
This warning is due to a mismatch of library types and can be ignored.
The warning will not appear if -i-dynamic
is used.
Intel compilers support three platforms: general combinations of processor and operating system type. This section explains the terms that Intel uses to describe the platforms in its documentation, installation procedures and support site.
The term "native" refers to building an application on a platform type the same as the one on which it will be run, for example, building on IA-32 to run on IA-32. The term "cross-platform" or "cross-compilation" refers to building an application on a platform type different from the one on which it will be run, for example, building on IA-32 to run on Intel Itanium®. Not all combinations of cross-platform development are supported and some combinations may require installation of optional tools and libraries.
The following list describes the supported combinations of compilation host (system on which you build the application) and application target (system on which the application runs).
Note: Development for a target different from the host may require optional library components to be installed from your Linux Distribution.
Note: The requirement for the 32-bit (IA-32) libraries is due to the compiler and other tools being 32-bit applications that dynamically link to these libraries. If these libraries are not installed, the following error may be displayed when the compiler is invoked:
error while loading shared libraries: libstdc++.so.5: cannot open shared
object file: No such file or directory
The error message is confusing as it does not indicate that the IA-32 version of libstdc++.so.5 is required. To avoid this problem, be sure that the 32-bit (IA-32) versions of these libraries are installed. Most, but not all, Linux distributions for Intel EM64T will install these by default. Consult the documentation that came with your Linux distribution for instructions on how to install the 32-bit libraries, typically in packages named libstdc++ and libc. If you still have problems, please contact Intel® Premier Support for further assistance.
We recommend using binutils 2.14 or later, especially if using shared libraries as there are known issues with binutils 2.11.
Notes:
-O3, -ipo
and -openmp
,
may require substantially larger amounts of RAM.Please see the separate Installation Guide for
information on installing the compiler and setting up the compiler
environment. The default installation directories, referred to elsewhere
in this document as <install-dir>
and <idb-install-dir>
, are:
/opt/intel/cc/9.0
(for IA-32 and Itanium)
/opt/intel/cce/9.0
(for Intel EM64T)
/opt/intel/idb/9.0
(for IA-32 and Itanium)
/opt/intel/idbe/9.0
(for Intel EM64T)
In Update 4 to RedHat Enterprise Linux 3, inline assembly code was added
to the file /usr/include/c++/3.2.3/ia64_redhat-linux/bits/os_defines.h
.
This causes the Intel C++ Compiler to fail to compile sources referencing
this header. Note that this problem is not known to exist for any
other version of Linux, including earlier versions of EL3 or beta versions
of the next major release of RedHat Enterprise Linux.
This issue also affects SGI ProPack 3 Service Pack 5.
A modified header file which corrects this problem is available from http://www.intel.com/software/products/compilers/downloads/os_defines.h.90
A good place to put the modified file is in the substitute headers
directory of your installed compiler. For example,
<install-dir>/substitute_headers/c++/bits/os_defines.h
.
The path
must end with bits/os_defines.h
. If you place it there the compiler
will find it automatically. You should find an existing installer-created
directory
<install-dir>/substitute_headers
and should
create
the sub-directory path …/c++/bits
underneath it.
-cxxlib-gcc
Is the default for C++ The STL and gcc* C++ libraries are used by default when linking
C++ applications, rather than those from Dinkumware* used in previous
releases. If you wish to use the Dinkumware libraries, specify
the switch -cxxlib-icc
. (-cxxlib-icc
is not
available when building for systems with Intel EM64T.) In a future release
of the Intel C++ Compiler, support for using the Dinkumware libraries
will be removed.
-ipo_obj
option Is no longer supportedThe -ipo_obj
option, which forced generation of direct object code, is no
longer supported. If the option is specified, a warning is given and
the effect is as if -ip
was specified instead.
-traceback
useful in mixed C/Fortran applications onlyThe -traceback
option adds information to the object file used by the traceback
handler. At present, only applications with a Fortran main program
make use of this information.
POSIX threaded programs that require a large stack size may not run correctly on
some versions of Linux because of hard-coded stack size limits in some versions
of the Linux POSIX threads libraries. These limits also apply to OpenMP
programs (-openmp) and automatically generated parallel programs (-parallel
) with the Intel compilers, because the Intel compilers use the POSIX threads
library to implement OpenMP based and automatically generated parallelism.
Threaded programs that exceed the stack space limit usually experience
segmentation violations or addressing errors.
To avoid these limitations, use a version of glibc built with the FLOATING_STACKS
parameter defined. For some distributions, this implies using the shared rather
than the static version of the pthreads library. Then use the ulimit -s
or limit stacksize
command to set the maximum shell stack size to
an explicit large value, in units of KBytes, (not unlimited
), and
also set the KMP_STACKSIZE
environment variable to the needed
thread stacksize in bytes. Note, in the bash shell, ulimit -s
can
be used to set a large maximum stack size only once. In the C shell (csh), limit
stacksize
, with no dash before the argument, can be used to reset
the maximum stacksize repeatedly.
This solution has been tested on glibc version 2.2.4-13 for IA-32 and glibc
2.2.4-19 for the Itanium Processor Family as found in the Red Hat 7.2 Linux
distribution. For glibc 2.2.4-13 on IA-32, the shared version of the POSIX
threads library must be used, (there should not be a -static
flag
in the compiler .cfg file or on the command line).
-g
and inlining
There will be an increase in compile time when -g
is used together
with inlining. Inlining can happen if the user specifies -ipo, -ip
or compiles a C++/C99
program at option levels -O1
or
above. This is due to the generation of debug information. For many
applications, this combination of compiler options will not increase compile
time or compile-time memory use.
We have identified a problem with glibc version 2.2.4-26 that shipped with the original version of Red Hat AS2.1. This version causes a compiler hang on the command "icc -v or icc -V (with no files to compile). Upgrading to glibc 2.2.4-31.7 fixes the problem. If you have taken any updates to your AS2.1 you will not see this problem. There was also a respin of the original AS2.1 that fixed this problem so only if you have a very early installation of AS2.1 that has never been updated will you see this issue.
-relax
no longer passed to linker on Itanium-based systems As of version 9.0, the compiler driver no longer passes the -relax
switch
to the linker on Itanium-based systems, as this conflicts with the -r
option.
The -relax option is not needed as it is the default when using binutils 2.11.90.0.27
or later - 2.14 is recommended. If you must use an older binutils and
wish to specify the -relax
option, use -Xlinker
-relax
on the compile command which invokes the linker.
(-ax*
)Compilation using -ax{W|N|B|P}
results in two copies of generated
code for each function. One for IA-32 generic code and one for CPU specific
code. The symbol for each function then refers to an Auto CPU Dispatch routine
that decides at run-time which one of the generated code sections to execute.
Debugger breakpoints that are set on these functions by name cause the
application to stop in the dispatch routine. This may cause unexpected behavior
when debugging. This issue may be addressed in a future version of the Intel
Debugger and Compilers.
-fp
Compilation using -fp
specifies that the IA-32 EBP register be used
as a frame pointer rather than a general purpose register. Debuggers and
traceback handlers may not be able to properly unwind through a stack that
contains a call to a function that is compiled without -fp
in
effect. If you compile with -g
or -O0
, -fp
is implicitly enabled, but not if you specify a higher optimization level
explicitly (such as -O2
). If you intend to use the debugger or
traceback on an application, and are using some level of optimization higher
than -O0
, you should also specify -fp
to ensure that
the debugger and traceback handler can use frame pointers.
-xP
generated codeOlder versions of the GNU Assembler may not be able to process assembly code
generated by compiling with the -[a]xP
option. Use binutils
version 2.14.90.0.4.1 or later, or FSFbinutils 2.15 or later if this is an
issue for you.
gdb
versions with Intel Compilers
Intel compilers for Linux generate Dwarf2-format debugging information,
including several advanced features in Dwarf2 such as declarations nested
within classes. Older gdb
debuggers, such as version 5.3.90-*, are
sometimes unable to correctly handle these Dwarf features. For best success on
source code which uses the full expressiveness of the C++ language, please
consider using gdb
version 6.1 or newer.
idb
with Extended Debug InformationIf you use the -debug
keywords inline_debug_info
, semantic_stepping
, variable_locations
or extended
,
you should use the Intel Debugger (idb), as other debuggers may not understand
the extended information and may behave unpredictably. We are working with
the developers of other debuggers towards their adding support for the extended
debug information.
Note: If your distributor provides technical support for this product, please contact them for support rather than Intel.
For information about the Intel C++ Compiler's Users Forums, FAQ's, tips and tricks, and other support information, please visit: http://support.intel.com/support/performancetools/c/linux/. For general support information please visit http://www.intel.com/software/products/support/.
Go
" button next to the "Product
"
drop-down list.
Submit Issue
" link in the left navigation bar.
Development Environment (tools,SDV,EAP)
" from the "Product
Type
" drop-down list.
Intel(R)
C++ Compiler, Linux*
" from the "Product Name
"
drop-down list.
> uname -a
> rpm -qa | grep glibc
rpm
installed, use the command below: > ls /lib/libc*
Get the Intel C++ Compiler's Package ID with the following commands:
> icc -V
and copy the "Package ID" (e.g. l_cc_c_9.0.xxx
)
from the output into the corresponding Intel Premier
Support field. Please include any other specific information
that may be relevant to helping us to reproduce and address
your concern.
<package ID>_README
(e.g. l_cc_c_9.0.xxx_README
),
available for download from IntelŪ Premier Support,
https://premier.intel.com/, to see which issues have been resolved in
the latest version of the compiler.
You can view the Intel compiler and related HTML-based documentation with your Web browser. You should use a Web browser that supports JavaScript (such as Firefox*), so it can which provide full navigation, search, index look-up, and hyperlink capabilities amongst the online help files PDF versions of most manuals are available online at http://developer.intel.com/software/products/compilers/clin/docs/manuals.htm .
The documentation is installed in the <install-dir>/doc
directory.
An HTML index document can be found at <install-dir>/doc/doc_index.htm
.
A training tutorial Enhancing Performance with Intel® Compilers is
also available from links in the documentation index. The Intel® Debugger
Manual is provided in HTML form in the Intel® Debugger
doc directory.
For information on the GNU glibc C language library, documentation can be obtained from the Linux OS vendor or from the GNU web site, www.gnu.org.
icc
(1) manpage provides a list of command-line options and
related information for the icc
and icpc
compiler
commands. To display the icc
(1) manpage, type the following
command after you set up your environment by using a source
command to execute the <install-dir>/bin/iccvars.*sh
file:
$
man icc
The man
command provides single keys or key
combinations that let you scroll through the displayed content,
search for a string, jump to a location, and perform other functions.
For example, type the
z
to view the next screen or w
to view
the previous screen. To obtain help about the man command,
type the h
key; when you are done viewing help, type
the q
key to
return to the displayed manpage. To search, type /
character
followed by the search string (/string
) and press Enter.
After viewing the man command text, type q
to return
to the shell command prompt.
The HTML documentation format has been tested to work with web browsers shipped on supported Linux* distributions. PDF versions of the compiler documentation are available at: http://developer.intel.com/software/products/compilers/clin/docs/manuals.htm
Information on Intel software development products is available at http://www.intel.com/software/products.
Some of the related products include:
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS.
NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL
PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S
TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY
WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO
SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING
TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY
PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are
not intended for use in medical, life saving, life sustaining, critical control
or safety systems, or in nuclear facility applications.
Intel may make changes to specifications and product descriptions at any time,
without notice.
Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
The software described in this document may contain software defects which may cause the product to deviate from published specifications. Current characterized software defects are available on request.
BunnyPeople, Celeron, Centrino, Centrino logo, Chips, Dialogic, EtherExpress, ETOX, FlashFile, i386, i486, i960, iCOMP, InstantIP, Intel, Intel logo, Intel386, Intel486, Intel740, IntelDX2, IntelDX4, IntelSX2, Intel Inside, Intel Inside logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv, Intel XScale, IPLink, Itanium, MCS, MMX, MMX logo, Optimizer logo, OverDrive, Paragon, PDCharm, Pentium, Pentium II Xeon, Pentium III Xeon, Performance at Your Command, skoool, Sound Mark, The Computer Inside., The Journey Inside, VTune, Xeon, and Xircom are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
*Other names and brands may be claimed as the property of others.
Copyright © 2006, Intel Corporation.