11.4.2. Enable / Disable Multithreading - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

AOCL-LAPACK supports multi-threading using OpenMP in selected APIs. This feature is enabled by default when AOCL-LAPACK is compiled with ENABLE_AMD_FLAGS=ON or ENABLE_AMD_AOCC_FLAGS=ON. However, you can disable multi-threading by setting ENABLE_MULTITHREADING=NO.

Select LAPACK interface APIs that support multi-threading automatically choose optimal number of threads. However, you can explicitly set the number of threads through the environment variable OMP_NUM_THREADS or OpenMP runtime APIs. In such a scenario, the number of threads is selected as follows:

Thread Criteria

Threads Used by API

If user specified threads are greater than AOCL-LAPACK computed optimal threads

AOCL-LAPACK computed optimal threads

If user specified threads are less than AOCL-LAPACK computed optimal threads

user specified threads