The Intel® Compiler provides support libraries for OpenMP*. There are several kinds of libraries:
Performance: supports parallel OpenMP execution.
Profile: supports parallel OpenMP execution and allows use of Intel® Thread Profiler.
Stubs: supports serial execution of OpenMP applications.
Each kind of library is available for both dynamic and static linking.
The use of static OpenMP libraries is not recommended, because they might cause multiple libraries to be linked in an application. The condition is not supported and could lead to unpredictable results.
This section describes the compatibility libraries and legacy libraries provided with the Intel compiler, as well as the selection of run-time execution modes.
To use the Compatibility OpenMP libraries, specify the (default) /Qopenmp-lib:compat (Windows OS) or -openmp-lib compat (Linux OS and Mac OS X) compiler option during linking.
On Linux and Mac OS X systems, to use dynamically linked libraries during linking, specify -openmp-link=dynamic option; to use static linking, specify the -openmp-link=static option.
On Windows systems, to use dynamically linked libraries during linking, specify the /MD and /Qopenmp-link:dynamic options; to use static linking, specify the /MT and /Qopenmp-link:static options.
To provide run-time support for dynamically linked applications, the supplied DLL (Windows OS) or shared library (Linux OS and Mac OS X) must be available to the application at run time.
Performance Libraries
To use these libraries, specify the -openmp (Linux* and Mac OS* X) or /Qopenmp (Windows*) compiler option.
Operating System |
Dynamic Link |
Static Link |
---|---|---|
Linux |
libiomp5.so |
libiomp5.a |
Mac OS X |
libiomp5.dylib |
libiomp5.a |
Windows |
libiomp5md.lib |
libiomp5mt.lib |
Profile Libraries
To use these libraries, specify -openmp-profile (Linux* and Mac OS* X) or /Qopenmp-profile (Windows*) compiler option. These allow you to use Intel® Thread Profiler to analyze OpenMP applications.
Operating System |
Dynamic Link |
Static Link |
---|---|---|
Linux |
libiompprof5.so |
libiompprof5.a |
Mac OS X |
libiompprof5.dylib |
libiompprof5.a |
Windows |
libiompprof5md.lib |
libiompprof5mt.lib |
Stubs Libraries
To use these libraries, specify -openmp-stubs (Linux* and Mac OS* X) or /Qopenmp-stubs (Windows*) compiler option. These allow you to compile OpenMP applications in serial mode and provide stubs for OpenMP routines and extended Intel-specific routines.
Operating System |
Dynamic Link |
Static Link |
---|---|---|
Linux |
libiompstubs5.so |
libiompstubs5.a |
Mac OS X |
libiompstubs5.dylib |
libiompstubs5.a |
Windows |
libiompstubs5md.lib |
libiompstubs5mt.lib |
To use the Legacy OpenMP libraries, specify the /Qopenmp-lib:legacy (Windows OS) or -openmp-lib legacy (Linux OS and Mac OS X) compiler options during linking. Legacy libraries are deprecated.
On Linux and Mac OS X systems, to use dynamically linked libraries during linking, specify the -openmp-link:dynamic option; to use static linking, specify the -openmp-link:static option.
On Windows systems, to use dynamically linked libraries during linking, specify the /MD and /Qopenmp-link=dynamic options; to use static linking, specify the /MT and /Qopenmp-link=static options.
To provide run-time support for dynamically linked applications, the supplied DLL (Windows OS) or shared library (Linux OS and Mac OS X) must be available to the application at run time.
Performance Libraries
To use these libraries, specify -openmp (Linux* and Mac OS* X) or /Qopenmp (Windows*) compiler option.
Operating System |
Dynamic Link |
Static Link |
---|---|---|
Linux |
libguide.so |
libguide.a |
Mac OS X |
libguide.dylib |
libguide.a |
Windows |
libguide40.lib |
libguide.lib |
Profile Libraries
To use these libraries, specify -openmp-profile (Linux* and Mac OS* X) or /Qopenmp-profile (Windows*) compiler option. These allow you to use Intel® Thread Profiler to analyze OpenMP applications.
Operating System |
Dynamic Link |
Static Link |
---|---|---|
Linux |
libguide_stats.so |
libguide_stats.a |
Mac OS X |
libguide_stats.dylib |
libguide_stats.a |
Windows |
libguide40_stats.lib |
libguide_stats.lib |
Stubs Libraries
To use these libraries, specify -openmp-stubs (Linux* and Mac OS* X) or /Qopenmp-stubs (Windows*) compiler option. These allow you to compile OpenMP applications in serial mode and provide stubs for OpenMP routines and extended Intel-specific routines.
Operating System |
Dynamic Link |
Static Link |
---|---|---|
Linux |
libompstub.so |
libompstub.a |
Mac OS X |
libompstub.dylib |
libompstub.a |
Windows |
libompstub40.lib |
libompstub.lib |
The Intel compiler enables you to run an application under different execution modes specified at run time; the libraries support the turnaround, throughput, and serial modes. Use the KMP_LIBRARY environment variable to select the modes at run time.
Mode |
Description |
---|---|
throughput (default) |
The throughput mode allows the program to detect its environment conditions (system load) and adjust resource usage to produce efficient execution in a dynamic environment. In a multi-user environment where the load on the parallel machine is not constant or where the job stream is not predictable, it may be better to design and tune for throughput. This minimizes the total time to run multiple jobs simultaneously. In this mode, the worker threads yield to other threads while waiting for more parallel work. After completing the execution of a parallel region, threads wait for new parallel work to become available. After a certain period of time has elapsed, they stop waiting and sleep. Until more parallel work becomes available, sleeping allows processor and resources to be used for other work by non-OpenMP threaded code that may execute between parallel regions, or by other applications. The amount of time to wait before sleeping is set either by the KMP_BLOCKTIME environment variable or by the kmp_set_blocktime() function. A small blocktime value may offer better overall performance if your application contains non-OpenMP threaded code that executes between parallel regions. A larger blocktime value may be more appropriate if threads are to be reserved solely for use for OpenMP execution, but may penalize other concurrently-running OpenMP or threaded applications. |
turnaround |
The turnaround mode is designed to keep active all processors involved in the parallel computation, which minimizes execution time of a single job. In this mode, the worker threads actively wait for more parallel work, without yielding to other threads. In a dedicated (batch or single user) parallel environment where all processors are exclusively allocated to the program for its entire run, it is most important to effectively use all processors all of the time.
|
serial |
The serial mode forces parallel applications to run as a single thread. |