インテル® Fortran コンパイラー 16.0 ユーザー・リファレンス・ガイド

ATTRIBUTES FASTMEM

The ATTRIBUTES directive option FASTMEM enables High Band Width (HBW) memory allocation for an allocated object. This directive option only applies to Intel® MIC Architecture and it is only available for Linux* OS.

!DIR$ ATTRIBUTES FASTMEM :: object

object

Is an allocatable scalar or array. It cannot be a local variable, a common block, or an array that will be allocated on the stack.

FASTMEM enables High Band Width (HBW) memory allocation for an allocated object at runtime.

When the specified object is allocated using the ALLOCATE statement at runtime, the Fortran Run-Time Library (RTL) allocates the memory in HBW memory. When the specified object is deallocated using the DEALLOCATE statement at runtime, the Fortran RTL deallocates the memory in HBW memory.

If the hardware is not available to allocate the object to High Band Width (HBW) memory, or if enough HBW memory is not available to satisfy the allocation, then allocation is performed using non-HBW memory.

When you use this directive in a program, you must specify the following on the compiler or linker command line:

-lmemkind

If the libraries required for HBW memory support are not linked successfully, no warning will be given but the application will still run correctly using non-HBW memory in place of HBW memory.

The following example shows a way to use this directive option to allocate High Band Width (HBW) memory:

real, allocatable :: X (:,:)
!dir$ attributes fastmem :: X
…
allocate (X(100,100))

You can use ATTRIBUTES option ALIGN with FASTMEM; for example:

!DIR$ ATTRIBUTES FASTMEM, ALIGN:64 :: A       

ALLOCATE ( A(1000), STAT= integer-variable )  
...
DEALLOCATE ( A )  

See Also