Rate This Document
Findability
Accuracy
Completeness
Readability

Installing KML

Procedure

Before installing the KML RPM package of the BiSheng version, ensure that the BiSheng Compiler has been installed. To install the BiSheng Compiler, refer to BiSheng Compiler Installation Guide.

During the installation of KML of the BiSheng version, a message may be displayed indicating that libomp.so is missing. You can use either of the following methods to solve the problem:

  • If the BiSheng Compiler is installed through a software package, run the rpm -ivh xxx.rpm --force --nodeps command to install KML.
  • If the BiSheng Compiler is installed through a Yum repository, install the BiSheng Compiler again by referring to BiSheng Compiler Installation Guide and then install KML.

Installation using the RPM package

  1. Obtain the KML software package by referring to Obtaining Software Packages and decompress it to obtain the binary RPM package.
  2. Install KML.
    rpm -ivh boostkit-kml-xxxx.aarch64.rpm

    After the installation, the system automatically adds the path to the lib folder, that is, /usr/local/kml/lib, to the environment variable LD_LIBRARY_PATH.

    In the preceding command, xxxx indicates the version number.

Installation using the DEB package

  1. Obtain the KML software package by referring to Obtaining Software Packages and decompress it to obtain the binary DEB package.
  2. Install KML.
    dpkg -i boostkit-kml-xxxx.aarch64.deb

    After the installation, the system automatically adds the path to the lib folder, that is, /usr/local/kml/lib, to the environment variable LD_LIBRARY_PATH.

    In the preceding command, xxxx indicates the version number.

Verifying the Installation

  1. Run the source command or log in to the terminal again for the environment variables to take effect.
    source /etc/profile
  2. Check whether the environment variable LD_LIBRARY_PATH contains the KML installation path /usr/local/kml/lib.
    env | grep LD_LIBRARY_PATH

    If the variable contains the installation path, the installation is successful.

    After the installation, the corresponding files are generated in the installation path (the default path is /usr/local/kml). The include folder contains the header files of the sublibraries, and the lib folder contains the dynamic library files of KML.

  3. Add the path of the dynamic library to the GCC compilation option to link the required dynamic library file. Then run the ldd command to check that the dependency library of the program is correctly linked.
    • To use KML_BLAS, add the following information:
      • Single-thread version without locking: -L /usr/local/kml/lib/kblas/nolocking -lkblas
      • Single-thread version with locking: -L /usr/local/kml/lib/kblas/locking -lkblas
      • Multi-thread version using pthread: -L /usr/local/kml/lib/kblas/pthread -lkblas
      • Multi-thread version using OpenMP: -L /usr/local/kml/lib/kblas/omp -lkblas
    • To use KML_VML, add the following information:
      • Single-thread version: -L /usr/local/kml/lib/kvml/single -lkvml -lkm
      • Multi-thread version: -L /usr/local/kml/lib/kvml/multi -lkvm -lkm
    • To use KML_SPBLAS, add the following information:
      • Single-thread version: -L /usr/local/kml/lib/kspblas/single -lkspblas
      • Multi-thread version: -L /usr/local/kml/lib/kspblas/multi -lkspblas
    • To use KML_FFT, add the following information:
      • Single-precision version: -L /usr/local/kml/lib -lkfftf
      • Double-precision version: -L /usr/local/kml/lib -lkfft
    • To use KML_MATH, add the following information:
      • High-performance version: -L /usr/local/kml/lib -lkm -lm
      • High-precision version: -L /usr/local/kml/lib -lkm_l9 -lm
    • To use KML_SVML, add -L /usr/local/kml/lib -lksvml -lm.
    • To use KML_VSL, add -L /usr/local/kml/lib -lkvsl.
    • To use KML_LAPACK:

      Generate a complete LAPACK library according to Generating a Complete LAPACK Library and then add -L /usr/local/kml/lib -L/usr/local/kml/lib/kblas/omp -lklapack -lkblas.

    • To use KML_SOLVER, add the following information:

      BiSheng: -L /usr/local/kml/lib -lksolver -lklapack_full -lkservice -lkblas -lc++

      GCC: -L /usr/local/kml/lib -lksolver -lklapack_full -lkservice -lkblas -lstdc++

    • To use KML_ScaLAPACK:

      Generate a complete ScaLAPACK library according to Generating a Complete ScaLAPACK Library, and then add -L /usr/local/kml/lib -lkscalapack -lklapack -lkservice -lkblas.

    • To use KML_SCASOLVER, add the following information:

      BiSheng: -L /usr/local/kml/lib -lksolver -lklapack_full -lkservice -lkblas -lc++

      GCC: -L /usr/local/kml/lib -lksolver -lklapack_full -lkservice -lkblas -lstdc++