Intel Extensions to OpenMP*

This topic describes the extensions to the standard that have been added by Intel in the Intel® Fortran Compiler. For complete information on the OpenMP* standard, visit the www.openmp.org website.

Environment Variables

Environment Variable

Description

KMP_STACKSIZE

Gets and sets the wait time in milliseconds that the libraries wait after completing the execution of a parallel region before putting threads to sleep.

KMP_BLOCKTIME

Gets and sets the number of bytes to allocate for each parallel thread to use asits private stack.

KMP_SPIN_COUNT

Helps to fine-tune the critical section.

Thread-level MALLOC( )

The Intel Fortran Compiler implements an extension to the OpenMP runtime library to enable threads to allocate memory from a heap local to each thread.

The memory allocated by these routines must also be freed by the FREE routine. While it is legal for the memory to be allocated by one thread and FREE'd 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.

Prototype

INTERFACE
INTEGER FUNCTION KMP_MALLOC (KMP_SIZE_t)
INTEGER KMP_SIZE_t
END FUNCTION KMP_MALLOC
END INTERFACE

KMP_SIZE_t is the number of bytes of memory to be allocated

INTERFACE
SUBROUTINE KMP_FREE(KMP_ADDRESS)
INTEGER KMP_ADDRESS
END SUBROUTINE KMP_FREE
END INTERFACE

KMP_ADDRESS is the starting address of the memory block to be freed.