When using SPE profiling on a system with many logical cores, you can encounter an error regarding an inability to mlock any further memory. This can occur during Arm® MAP profiling initialization or when an MPI or user program attempts to mlock memory.
In order to receive SPE data, Arm® MAP must mmap
a number of buffers
per logical CPUs on the host system. This can sum to a significant
amount of memory when the number of logical CPUs is high. In combination
with the mlock needs of the target application the system mlock resource
limit may be exceeded, preventing more memory from being locked.
Modify the size of the largest buffers Arm® MAP maps per core using the
environment variable ALLINEA_SAMPLER_SPE_AUX_BUFFER_SIZE
. This is the
number of pages to mmap
for each logical core on the system.
It must be a positive power of 2.
Setting this environment variable too low reduces the amount of SPE data that can be processed by MAP, reducing the number of SPE samples obtained.