NAME
SYNOPSIS
DESCRIPTION
ENVIRONMENT
NOTES
EXAMPLES
COPYRIGHT
SEE ALSO
libautohbw.so - An interposer library for redirecting heap allocations
LD_PRELOAD=libautohbw.so command {arguments ...}
libautohbw.so
)For instance, the following command-line runs existing binary
/bin/ls with AutoHBW library, automatically redirecting
heap allocations (larger than a given threshold) to
high-bandwidth memory.LD_PRELOAD=libautohbw.so /bin/ls
The behavior of AutoHBW library is controlled by the following environment variables.
AUTO_HBW_SIZE=x:[y]
Examples:
AUTO_HBW_SIZE=4K
AUTO_HBW_SIZE=1M:5M
AUTO_HBW_LOG=level
Notes:
Examples:
AUTO_HBW_LOG=1
AUTO_HBW_MEM_TYPE=memory_type
If you are requesting any huge TLB pages, please make sure that the requested type is currently enabled in your OS.
Examples:
AUTO_HBW_MEM_TYPE=MEMKIND_HBW_PREFERRED
AUTO_HBW_MEM_TYPE=MEMKIND_DEFAULT
AUTO_HBW_MEM_TYPE=MEMKIND_HBW_HUGETLB
AUTO_HBW_MEM_TYPE=MEMKIND_HUGETLB
AUTO_HBW_DEBUG=0|1|2
It is possible to temporarily disable/enable automatic HBW
allocations by calling disableAutoHBW()
and enableAutoHBW()
in source code. To call these routines, please include
autohbw_api.h header file and link with -lautohbw.
If high-bandwidth memory is not physically present in your system, the environment variable MEMKIND_HBW_NODES must be set to indicate the high-bandwidth node as indicated in memkind(3).
When libautohbw is loaded with LD_PRELOAD, allocations with size zero, like malloc(0), have the same result as the system’s standard library call. Most notably, a valid pointer may be returned in such calls, contrary to the default memkind behavior of returning NULL when size zero is passed to malloc-like functions.
The following will run /bin/ls with AutoHBW library. Make sure that paths to both libautohbw.so and libmemkind.so are included in LD_LIBRARY_PATH.
LD_PRELOAD=libautohbw.so /bin/ls -l
To run with MPI, a shell script must be created, with the
correct LD_PRELOAD command for each rank. For example, if we
put LD_PRELOAD=libautohbw.so /bin/ls
in a shell script named
autohbw_test.sh, it can be executed with 2 MPI ranks as:
mpirun -n 2 ./autohbw_test.sh
Copyright (C) 2014 - 2022 Intel Corporation. All rights reserved.
memkind(3), malloc(3), numactl(8)
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.