Migration from OpenBLAS to KML_BLAS
Replaceability
The interface syntax of the KML_BLAS is the same as that of the OpenBLAS.
Migrating the C-based Library
OpenBLAS contains the open-source netlib LAPACK. If only some of the BLAS interfaces are used, perform the following steps:
- Replace the header file #include <cblas.h> called by the OpenBLAS source code with #include <kblas.h>.
- Replace -lopenblas with -lkblas in the compilation options.
- Add environment variables. /PATH_TO_KBLAS is the installation path.
export LD_LIBRARY_PATH=/PATH_TO_KBLAS:$LD_LIBRARY_PATH
If both the BLAS and LAPACK interfaces are used, perform the migration by referring to .
- In the compilation options, replace -lopenblas with -lkblas -lklapack.
- Add environment variables. /PATH_TO_KBLAS_AND_KLAPACK indicates the installation path.
export LD_LIBRARY_PATH=/PATH_TO_KBLAS_AND_KLAPACK:$LD_LIBRARY_PATH