Rate This Document
Findability
Accuracy
Completeness
Readability

Migrating the Library That Uses the C Language

The OpenBlas contains the open source netlib LAPACK. If only some of the BLAS interfaces are used, perform the following steps:

  1. Identify the source code calling header files that use OpenBLAS and replace the header file #include <cblas.h> with #include <kblas.h>.
  2. Replace -lopenblas with -lkblas in the compilation options.
  3. 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 "Installing the KML_LAPACK" in Kunpeng Math Library Developer Guide.

  1. In the compilation options, replace -lopenblas with -lkblas -lklapack_full.
  2. Add environment variables. /PATH_TO_KBLAS_AND_KLAPACK indicates the installation path.
    export LD_LIBRARY_PATH=/PATH_TO_KBLAS_AND_KLAPACK:$LD_LIBRARY_PATH