Table of contents
- General Compatibility
- Compatibility Options
- Remark, Warning, and Error Diagnostics
- Differences in Precompiled Header (PCH) Support
- Unsupported Major Language Features
- Unsupported Preprocessor Features
- Unsupported Compiler Options
- Mixing Unmanaged Code Compiled with the Intel C++ Compiler with Managed Code
- Compatibility in OpenMP* Support
- User Interface Compatibility
The Intel® Parallel Composer 2011 is a compiler & library suite that can help you add threaded features and express parallelism in your application for high performance in a simpler productive way. It consists of the Intel® C++ Compiler for Windows* for IA-32 and Intel 64, Intel® Parallel Debugger Extension to Visual Studio*, Intel® Threading Building Blocks, and Intel® Integrated Performance Primitives. It is integrated into Visual Studio 2005* (standard edition or above), Visual Studio 2008* (standard edition or above) and Visual Studio 2010* (standard edition or above).
The Intel C++ Compiler is source and binary compatible with Visual C++ compiler; it supports the Microsoft* Visual C++* extensions to the C and C++ languages.
This document describes the important differences of the Intel C++ Compiler and Visual C++ Compiler.
The Intel C++ Compiler is source- and binary- (native code) compatible with the Microsoft* Visual C++* Compiler. It is well integrated into the following Microsoft development environments Microsoft Visual C++ 2005*, Microsoft Visual C++ 2008* and Microsoft Visual C++ 2010*.
The Intel C++ Compiler generates optimized code with the advanced features of Intel® IA-32 processors and Intel® 64 processors.
Because of the source- and binary- compatibility, it enables you to harness the performance-enhancement features of the Intel C++ Compiler by selectively rebuilding only the parts of your application which you deem to be performance sensitive with the Intel Compiler. If necessary, you can mix and match object files and libraries built with either the Intel C++ Compiler or Microsoft Visual C++ Compiler.
The Intel C++ Compiler for Windows conforms to the following standards:
- ANSI/ISO standard ISO/IEC 9899:1990 for C language. C99 features are mostly supported.
- ANSI/ISO standard ISO/IEC 14882:1998 for C++ language
- OpenMP* 3.0 API specification
The following Intel® Compiler options provide compatibility with different versions of Microsoft Visual C++:
- /Qvc8 Microsoft Visual C++ 2005
- /Qvc9 Microsoft Visual C++ 2008
- /Qvc10 Microsoft Visual C++ 2010
If your program is built with both Intel C++ compiler and Visual C++ compiler, be sure to use the correct option when building with Intel C++ compiler. But in most cases this is taken care of for you.
- From the build environment window, the Intel C++ compiler driver icl.exe will set the corresponding compatibility option automatically if “cl.exe” is on the path.
- From within Visual Studio IDE, the Intel C++ Compiler IDE integration will set the option automatically.
The Intel compiler is more verbose than Visual C++ and may emit more warnings and/or errors. The warning or error numbers are specific to the Intel C++ Compiler and may not match the diagnostic number emitted by Visual C++.
You can always disable the diagnostic if there’s a number associated to it, or use “-w” to disable all warning messages, or use “/Qdiag-disable:list” to disable a list of diagnostics.
We have an on-going project to document all the diagnostic messages emitted by the Intel C++ Compiler. There will be a Knowledge Base article for each diagnostic that will eventually contain detailed information about the diagnostic as well as examples. Right now all of the diagnostic articles are already published except only a few. If you'd like to see detailed information for a particular diagnostic, please send us a request on the diagnostic article you're interested.
To find all the diagnostic articles, visit /en-us/articles/intel-parallel-composer/all/1 and click "Error Message".
The precompiled header (PCH) information generated by the Intel C++ Compiler is not compatible with the PCH information generated by the Microsoft Visual C++ compiler. The specific incompatibilities are as follows:
- The Intel Compiler does not recognize the PCH file generated by the Microsoft compiler. If no suitable or recognized PCH file exists, compilation proceeds without use of PCH files.
- The Microsoft compiler aborts with an error message when it tries to use a PCH file generated by the Intel compiler.
- The Intel C++ Compiler does not support PCH generation and use in the same translation unit.
- The Intel C++ Compiler does not generate PCH information beyond the point where a declaration is seen in the primary translation unit. But Visual C++ will generate the pch information for all the include files.
- PCH files coexistence: the /Qpchi option causes the Intel C++ Compiler to name its PCH files with a .pchi filename suffix and reduce build time. The /Qpchi option is on by default; use /Qpchi- to turn it off.
- Attributed code
- Managed extensions for C++ (new pragmas, keywords, and command-line options)
- Event handling (new keywords)
- __abstract keyword
- __box keyword
- __delegate keyword
- __gc keyword
- __identifier keyword
- __nogc keyword
- __pin keyword
- __property keyword
- __sealed keyword
- __try_cast keyword
- __w64 keyword
- #import directive for attributed code
- #using directive
- managed, unmanaged pragmas
- _MANAGED macro
- runtime_checks pragma
The Intel C++ Compiler for Windows does not support all the features of Microsoft Visual C++ 2005 and 2008. The details are discussed below.
Table 1, Most Unsupported Compiler Options of Visual C++ 2005 and Visual C++ 2008.
Adds to assembly search path
Compiles for the common language runtime (managed C++)
Forces use of assembly/module
Merges injected code to file
Name the PDB file used for debug information for specified source files
Use /Qopenmp instead
Maximum memory allocation (percentage of the default)
Force parameters passed in registers to be written to the stack
Process XML documentation comments and optionally name the .xdc file
Use /QaxSSE3, /arch:SSE2, and /QxSSE3 instead. You can find more up to date information at Intel® compiler options for SSE generation and processor-specific optimizations
Put debug information in every object (Microsoft PCH-specific option)
Enable incremental compilation
Set warning level 1-4 for n
If you use the managed extensions to the C++ language in Microsoft Visual C++, you can use the Intel C++ Compiler for your non-managed code for better application performance. Make sure managed keywords do not appear in your non-managed code.
For information on how to mix unmanaged code and managed code, refer to the article, "An Overview of Managed/Unmanaged Code Interoperability", at the Microsoft Web site: <<http://msdn2.microsoft.com/en-us/library/ms973872.aspx>>.
Note: This URL is available at the Microsoft MSDN* Web site. If it changes, please search for the article.
Visual C++ 2005, Visual C++ 2008, Visual C++ 2010 and the Intel C++ Compiler all support OpenMP*. However, Visual C++ 2005, 2008 and 2010 support the OpenMP 2.0 API specification.
The Intel C++ Compiler supports the OpenMP 3.0 API specification. It provides the OpenMP compatibility libraries that are compatible with Visual C++ 2005, 2008 and 2010.
"/Qopenmp" is the option to enable the OpenMP support of Intel C++ compiler.
Note: This option is available for both Intel® and non-Intel microprocessors but it may result in more optimizations for Intel microprocessors than for non-Intel microprocessors.
Table 2, Intel C++ Compiler OpenMP Compatibility Libraries
Intel C++ Compiler OpenMP Compatibility Libraries
List of OpenMP features supported by Intel C++ Compiler
The following list briefly summarizes OpenMP support in the Intel C++ Compiler for Windows:
- Support for the OpenMP 3.0 API specification.
- By default Intel C++ Compiler supports OpenMP tasking model, but it also support the Intel® taskqueuing extension under the option /Qopenmp-task:intel. When this value is specified, OpenMP 3.0 tasking pragmas are ignored; if they are specified, warnings are issued.
Note: The taskqueuing extension implemented by the Intel C++ compiler extends OpenMP to parallelize a broader range of applications. It allows the user to exploit irregular parallelism with units of work that are not pre-computed at the start of the worksharing construct. Unlike single, for, and sections constructs, all work units are known at the time the construct begins execution.
The taskqueuing pragmas are #pragma taskq and #pragma task. The #pragma taskq specifies the environment within which the enclosed units of work (tasks) are to be executed. From among all the threads that encounter a taskq pragma, one is chosen to execute it initially. The #pragma task specifies a unit of work, potentially executed by a different thread. (#pragma intel_omp_taskq and #pragma intel_omp_task).
- Implemented extension functions in the OpenMP run-time library and implemented extension environment variables
- Support for debugging OpenMP code
- Support for enhanced debugging by providing an OpenMP stub library for debugging purposes that links in the OpenMP stub APIs but still runs sequentially; this is supported through the /Qopenmp_stub option
Difference in Supporting Threadprivate
The Microsoft Visual C++* compiler uses a different mechanism than the Intel compilers to reference threadprivate data. If you declare a variable as threadprivate in your code and you compile the code with both Intel compilers and Visual C++ compilers, the code compiled by the Intel compiler and the code compiled by the Visual C++* compiler will reference different locations for the variable even when referenced by the same thread. Thus, use the same compiler to compile all source modules that use the same threadprivate objects.
The Intel Parallel Composer 2011 is integrated into Microsoft Visual Studio 2005, 2008 and 2010 IDEs. The integration module of the Intel Parallel Composer 2011 provides a toolbar for the IDE, an option page in the Optios dialog, the integration of documentation and the support to use Intel IPP and Intel TBB for Visual C++ projects.
Microsoft Visual C++ 2005 and 2008 project maintains a .vcproj file. In order to use the Intel C++ Compiler, you need to associate your project or solution with the Intel C++ project system first. This is done by the steps below. Then after that, a new .icproj file will be created for the selected .vcproj project(s) or all the projects of the solution.
Microsoft Visual C++ 2010 project has a .vcxproj file. When you set the projct to use Intel C++ compiler, no .icproj file will be created. Instead the .vcxproj file will be modified to include another platformtoolset "Intel Parallel Composer 2011".
There are two ways to associate a Visual C++ project or projects or solution with the Intel C++ project system:
- From the Visual Studio IDE (RECOMMENDED):
- Right-click on the project(s) or the solution, then select the menu item “Intel Parallel Composer 2011 -> Use Intel C++” from Project Context Menu (pop-up menu). This method works for all supported Visual Studios.
- Or select the project(s) you’d like to use Intel C++ Compiler to build, then select menu item [Project]->[Intel Parallel Composer 2011]->[Use intel C++]
- Or within Visual Studio 2005 or 2008, select the project(s), then click the 2st icon on the Intel C++ Compiler’s toolbar ; the 3nd icon will revert the changes.
- From the Intel Parallel Composer 2011 build environment window, use “ICProjConvert110.exe”. This command line utility only works with the Visual C++ 2005 or 2008 projects (.vcproj).
For development using Visual Studio 2005 or 2008 and the Intel C++ Compiler, both methods above do not change any of the existing .vcproj files, but only the .sln file. So it’s perfectly ok to share the projects and source code among a development team.
For development using Visual Studio 2010 and the Intel C++ Compiler, although the .vcxproj file will be modified, but it does not impact the engineers using Visual Studio 2010 only. The one change needed is to reset the "Platform Toolset" back to use Visual C++ from the project's property dialog.
The following capabilities are provided by the integration:
- Set one or multiple Visual C++ projects in a solution to use the Intel C++ Compiler.
- Set one file to use Intel C++ Compiler.
- Optimizing your application using compilation options specific to the Intel C++ Compiler
- Easy use of Intel® Integrated Performance Primitives (IPP) and Intel® Threading Building Blocks (TBB) through the Component Selection dialog (the 4th icon on the toolbar) within Visual Studio 2005 or 2008. Similar functionality is provided in the project property dialog within Visual Studio 2010.
The following features are provided by Intel Parallel Composer 2001:
- Support manifest tool automation
- Support IVSFileBackup – In case of unexpected Visual Studio termination, the .vcproj and .icproj files may be recovered to a certain point.
- Support for the Inherited Project Property feature with the limitation that the property sheet has to be created before setting the project to use Intel C++ compiler
- Support for the Custom Build Rule feature with the limitation that the Custom Build Rule has to be created before setting the project to use Intel C++ compiler
- support the Remote Debugging
- Support for the automation interfaces of the Intel C++ Project System
- Intel C++ Compiler toolbar created to make it easier to use the Intel C++ Compiler, IPP and TBB in Visual Studio 2005 and 2008.
The Intel C++ Compiler is fully source- and binary- (native code only) compatible with Visual C++ 2005, Visual C++ 2008 and Visual C++ 2010 compiler when the option “/Qvc8”, “/Qvc9” or "/Qvc10" is specified. Binaries built with the Intel C++ Compiler can be debugged from within the Microsoft Visual Studio IDE.
It’s possible to build only several files or build several projects with the Intel C++ Compiler.
Intel Parallel Debugger Extension is a plug-in to Visual Studio Debugger. It provides great functionalities for debugging parallel programs. Please see the Intel® Parallel Debugger Extension article for detail information.
The Intel C++ Compiler only supports native C++ project types provided by Visual Studio 2005, and Visual Studio 2008. The project types with .NET attributes such as the ones below cannot be converted to an Intel C++ project:
- Empty Project (.NET)
- Class Library (.NET)
- Console Application (.NET)
- Windows Control Library (.NET)
- Windows Forms Application (.NET)
- Windows Service (.NET)
Visual Studio 2005, Visual Studio 2008 & 2010 all support the optimization “Whole Program Optimization” (/GL). The equivalent optimization of the Intel C++ Compiler is the Interprocedural Optimization (/Qipo). Each compiler creates object files with their own proprietary IR (intermediate representation) and the linker will perform the “Whole Program Optimization” or “Interprocedural Optimization”.
In order to get optimal performance, we do not recommend mixing and matching object files compiled by different compilers with “Whole Program Optimization” option. Cross-file optimizations cannot be performed amongst files compiled with the Intel compiler and those compiled by the Microsoft compiler. So, all the optimizations of “Whole Program Optimization” that would have been performed if all of the files were compiled with the Intel compiler will not be performed, which could potentially have a dramatically negative impact on performance.
If you do need to mix and match object files, you should use the tools (ie icl, xilink, or xilib) provided with the Intel C++ Compiler. These tools will emit the following warning in this case and continue linking with the Whole Program Optimization disabled:
IPO: WARNING #11021: Whole program optimization will be disabled;
"test.obj" appears to be a Microsoft® /GL compiled object file.
Recompile with the Intel® compiler using the /GL option for whole program optimization.
If you use the link tools (link.exe, lib.exe) provided with Visual C++, you'll get the following warning and errors:
t2.obj : warning LNK4229: invalid directive '/Intel® compiler non-linkable IL object file' encountered; ignored
xxx.obj : error LNK2001: unresolved external symbol "int __cdecl foo(void)" (?foo@@YAHXZ)
xxx.exe : fatal error LNK1120: 1 unresolved externals
If you build the project within the Visual Studio IDE, the Intel C++ Compiler integration will cause the correct linking tools to be used.
Visual Studio 2005, 2008 and 2010 provide the following refined options under the “Whole Program Optimization” option:
- Use Link Time Code Generation
- Profile Guided Optimization - instrument
- Profile Guided Optimization – update
- Profile Guided Optimization – optimize
With this option only, if you have some files compiled with the Intel C++ Compiler, you’ll get the following link error:
LINK : fatal error LNK1269: inconsistent file 'ipo_xxxxobj.obj' specified with /LTCG:PGOPTIMIZE but not with /LTCG:PGINSTRUMENT
The first three options will not cause any link errors. But, the “Profile Guided Optimization –instrument/update” options will not have any effect on the files compiled with the Intel C++ Compiler.
The Intel Parallel Composer 2011 supports Intel-64 development from within the Visual Studio 2005, 2008 and 2010 IDE, but you can develop Intel 64-based applications from the command window as well.
To build Intel 64-based applications from within Visual Studio IDE, you need to install the Visual Studio 2005, 2008 or 2010 Standard edition or above, and the “X64 Compiler and Tools” component. Also, you should use the “/favor:INTEL64” option for best performance on Intel 64-based systems when using Visual C++ 2008 or 2010 (“/favor:EM64T” for Visual C++ 2005), and use “/QxSSE3” when using the Intel C++ Compiler.
The following special features are offered by the Intel® C++ Compiler for Intel 64:
- support for inline assembly
- support for MMX/x87 instructions through inline assembly
- support for MMX™ instructions through intrinsics
To download the Intel® Parallel Composer 2011 evaluation package, visit
Intel, the Intel logo, Intel Leap ahead, and Intel Leap ahead logo, Pentium, and Itanium 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.
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 applications. Intel may make changes to specifications and product descriptions at any time, without notice.
Copyright © 2010, Intel Corporation. All Rights Reserved.