The description below applies to:
allocate
clause, except when the allocator
modifier is a
constant expression with value omp_default_mem_alloc
and no
align
modifier has been specified. (In that case, the normal
malloc
allocation is used.)
allocate
directive for automatic/stack variables, except
when the allocator
clause is a constant expression with value
omp_default_mem_alloc
and no align
clause has been
specified. (In that case, the normal allocation is used: stack allocation
and, sometimes for Fortran, also malloc
[depending on flags such as
-fstack-arrays].)
allocate
directive for variable in static memory is
currently not supported (compile time error).
allocators
directive and the executable
allocate
directive for Fortran pointers and allocatables is
supported, but requires that files containing those directives has to be
compiled with -fopenmp-allocators. Additionally, all files that
might explicitly or implicitly deallocate memory allocated that way must
also be compiled with that option.
For the available predefined allocators and, as applicable, their associated
predefined memory spaces and for the available traits and their default values,
see OMP_ALLOCATOR
– Set the default allocator. Predefined allocators without an associated memory
space use the omp_default_mem_space
memory space.
For the memory spaces, the following applies:
omp_default_mem_space
is supported
omp_const_mem_space
maps to omp_default_mem_space
omp_low_lat_mem_space
is only available on supported devices,
and maps to omp_default_mem_space
otherwise.
omp_large_cap_mem_space
maps to omp_default_mem_space
,
unless the memkind library is available
omp_high_bw_mem_space
maps to omp_default_mem_space
,
unless the memkind library is available
On Linux systems, where the memkind
library (libmemkind.so.0
) is available at runtime, it is used when
creating memory allocators requesting
omp_high_bw_mem_space
omp_large_cap_mem_space
partition
trait interleaved
; note that for
omp_large_cap_mem_space
the allocation will not be interleaved
On Linux systems, where the numa
library (libnuma.so.1
) is available at runtime, it used when creating
memory allocators requesting
partition
trait nearest
, except when both the
libmemkind library is available and the memory space is either
omp_large_cap_mem_space
or omp_high_bw_mem_space
Note that the numa library will round up the allocation size to a multiple of
the system page size; therefore, consider using it only with large data or
by sharing allocations via the pool_size
trait. Furthermore, the Linux
kernel does not guarantee that an allocation will always be on the nearest NUMA
node nor that after reallocation the same node will be used. Note additionally
that, on Linux, the default setting of the memory placement policy is to use the
current node; therefore, unless the memory placement policy has been overridden,
the partition
trait environment
(the default) will be effectively
a nearest
allocation.
Additional notes regarding the traits:
pinned
trait is supported on Linux hosts, but is subject to
the OS ulimit
/rlimit
locked memory settings.
pool_size
trait is no pool and for every
(re)allocation the associated library routine is called, which might
internally use a memory pool.
partition
trait, the partition part size will be the same
as the requested size (i.e. interleaved
or blocked
has no
effect), except for interleaved
when the memkind library is
available. Furthermore, for nearest
and unless the numa library
is available, the memory might not be on the same NUMA node as thread
that allocated the memory; on Linux, this is in particular the case when
the memory placement policy is set to preferred.
access
trait has no effect such that memory is always
accessible by all threads.
sync_hint
trait has no effect.
See also: Offload-Target Specifics
什么是肝性脑病hcv9jop7ns2r.cn | 一个火一个羽一个白念什么hcv9jop3ns1r.cn | 美国是什么人种hcv8jop9ns5r.cn | 2月7日是什么星座hcv8jop8ns9r.cn | a型血的人容易得什么病sanhestory.com |
枸杞什么季节成熟hcv8jop5ns6r.cn | 一什么黑暗huizhijixie.com | 阴道菌群失调用什么药hcv9jop2ns4r.cn | mtd是什么意思hcv8jop9ns9r.cn | 检查胃应该挂什么科hcv8jop1ns8r.cn |
湿热体质适合喝什么茶weuuu.com | 组织液是什么luyiluode.com | 胃大是什么原因造成的hcv9jop6ns9r.cn | hr医学上是什么意思hcv8jop1ns1r.cn | 嗯哼的爸爸叫什么hcv8jop7ns9r.cn |
草酸钙结晶是什么意思hcv9jop3ns3r.cn | 风湿免疫科是什么病hcv7jop9ns1r.cn | 做梦梦到牛是什么意思luyiluode.com | 滋养是什么意思hcv9jop7ns9r.cn | 八段锦什么时间练最好hcv7jop9ns5r.cn |