mkl_set_memory_limit
mkl_set_memory_limit
On Linux, sets the limit of memory that can allocate for a specified type of memory.
Intel® oneAPI Math Kernel Library
Syntax
int
mkl_set_memory_limit
(
int
mem_type
,
size_t
limit
);
Include Files
- mkl.h
Input Parameters
Name | Type | Description |
---|---|---|
mem_type | int | 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/content/www/us/en/develop/articles/mcdram-high-bandwidth-memory-on-knights-landing-analysis-methods-tools.html). |
limit | size_t | Memory limit in megabytes. |
Description
This function sets the limit for the amount of memory that can allocate for the specified memory type. The limit bounds both internal allocations (inside computation routines) and external allocations (in a call to
Intel® oneAPI Math Kernel Library
Intel® oneAPI Math Kernel Library
mkl_malloc
, mkl_calloc
, or mkl_realloc
). By default no limit is
set for memory
allocation. Call function in your application except
mkl_set_memory_limit
at most once, prior to calling any other Intel® oneAPI Math Kernel Library
mkl_set_interface_layer
and mkl_set_threading_layer
.- Allocation in MCDRAM requireslibmemkindandlibjemallocdynamic libraries which are a part of Intel® Manycore Platform Software Package (Intel® MPSP) for Linux*.
- Themkl_set_memory_limitfunction takes precedence over theMKL_FAST_MEMORY_LIMITenvironment variable.
Return Values
Type | Description |
---|---|
int | Status of the function completion:
|