Intel Extensions to OpenMP*

For complete information on the OpenMP* standard, visit the Web site http://www.openmp.org. This topic describes the extensions to the standard that have been added by Intel in the Intel® C++ Compiler.

Environment Variables

Environment Variable Description
KMP_STACKSIZE Used to set the number of bytes that will be allocated for each parallel thread to use as its private stack.
KMP_BLOCKTIME Used to set the integer value of time, in milliseconds, that the libraries wait after completing the execution of a parallel region before putting threads to sleep.
KMP_SPIN_COUNT Used to help fine-tune the critical section.

Thread-level malloc( )

The Intel C++ Compiler implements an extension to the OpenMP* run-time library to allow threads to allocate memory from a heap local to each thread.

The memory allocated by these routines must also be freed by these routines. While it is legal for the memory to be allocated by one thread and freed by a different thread, this mode of operation has a slight performance penalty.

The interface is identical to the malloc() interface except the entry points are prefixed with kmp_, as shown below:

#include omp.h
        void * kmp_malloc( size_t );
        void * kmp_calloc( size_t, size_t );
        void * kmp_realloc( void *, size_t );
        void   kmp_free( void * );