Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

mkl_set_memory_limit

On Linux, sets the limit of memory that
Intel® MKL
can allocate for a specified type of memory.

Syntax

stat = mkl_set_memory_limit
(
mem_type
,
limit
)
Fortran Include Files/Modules
  • Include file:
    mkl.fi
  • Module (compiled):
    mkl_service.mod
  • Module (source):
    mkl_service.f90
Input Parameters
Name
Type
Description
mem_type
INTEGER*4
Type of memory to limit. Possible values:
MKL_MEM_MCDRAM
- Multi-Channel Dynamic Random Access Memory (MCDRAM) (for more details, see https://software.intel.com/en-us/articles/mcdram-high-bandwidth-memory-on-knights-landing-analysis-methods-tools).
limit
INTEGER*4
for 32-bit systems
INTEGER*8
for 64-bit systems.
Memory limit in megabytes.
Description
This function sets the limit for the amount of memory that
Intel® MKL
can allocate for the specified memory type. The limit bounds both internal allocations (inside
Intel® MKL
computation routines) and external allocations (in a call to
mkl_malloc
,
mkl_calloc
, or
mkl_realloc
). By default no limit is set for memory allocation.
Call
mkl_set_memory_limit
at most once, prior to calling any other
Intel® MKL
function in your application except
mkl_set_interface_layer
and
mkl_set_threading_layer
.
  • Allocation in MCDRAM requires
    libmemkind
    and
    libjemalloc
    dynamic libraries which are a part of Intel® Manycore Platform Software Package (Intel® MPSP) for Linux*.
  • The
    mkl_set_memory_limit
    function takes precedence over the
    MKL_FAST_MEMORY_LIMIT
    environment variable.
Return Values
Type
Description
INTEGER*4
Status of the function completion:
  • 1 - the limit is set
  • 0 - the limit is not set

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804