OpenMP* Support Libraries

The Intel® Compiler provides support libraries for OpenMP*. There are several kinds of libraries: performance, stubs, and profile. Each kind of library is available for both dynamic and static linking.

Note

Avoid using static libraries because they might cause multiple libraries to be linked in an application. The condition is not supported and could lead to unpredictable results.

Performance Libraries

Use these libraries with -openmp (Linux* and Mac OS* X) and /Qopenmp (Windows*) compiler option.

Platform

Static Library

Dynamic Library

Linux

libguide.so

libguide.a

Mac OS X

libguide.dylib

libguide.a

Windows

libguide40.lib
libguide40.dll

libguide.lib

Stubs Libraries

Use these libraries with -openmp-stubs (Linux* and Mac OS* X) and /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.

Platform

Static Library

Dynamic Library

Linux

libompstub.so

libompstub.a

Mac OS X

libompstub.dylib

libompstub.a

Windows

libompstub40.lib
libompstub40.dll

libompstub.lib

Profile Libraries

Use these libraries with -openmp-profile (Linux* and Mac OS* X) and /Qopenmp-profile (Windows*) compiler option. These allow you to use Intel® Thread Profiler to analyze OpenMP applications.

Platform

Static Library

Dynamic Library

Linux

libguide_stats.so

libguide_stats.a

Mac OS X

libguide_stats.dylib

libguide_stats.a

Windows

libguide40_stats.lib
libguide40_stats.dll

libguide_stats.lib

Execution modes

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. Sleeping allows the threads to be used, until more parallel work becomes available, 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.

Note

Avoid over-allocating system resources. The condition can occur if either too many threads have been specified, or if too few processors are available at run time. If system resources are over-allocated, this mode will cause poor performance. The throughput mode should be used instead if this occurs.

serial

The serial mode forces parallel applications to run as a single thread.