Rate This Document
Findability
Accuracy
Completeness
Readability

Overview

This document describes how to migrate Intel MKL or some common math libraries to the Kunpeng Math Library (KML) to maximize the performance of the Kunpeng platform.

Among HPCKit components, only math libraries are migrated.

In a broad sense, a math library is a math function interface library that provides high-performance scalar and vector calculations. Common math libraries include Intel Math Kernel Library (Intel MKL) and some open-source math libraries. The KML provides high-performance math functions optimized based on the Kunpeng platform. To migrate an application that uses math library functions to the Kunpeng platform, you need to adapt the application because the function definitions of different computing platforms or math libraries are different. To address this issue, the HPCKit Migration Guide is provided for reference.

This document describes how to migrate common libraries of Intel MKL to KML, for example, migrating VML of MKL to KML_VML and BLAS of MKL to KML_BLAS (see Checking Whether Intel MKL Is Used). It also describes how to migrate other common math libraries to KML. Through migration, you can obtain better computing performance than that of common open-source math libraries on the Kunpeng computing platform.

Table 1 shows the mapping between the math libraries before and after the migration.

Table 1 Mapping between math libraries before and after migration

Math Library to Be Migrated

KML

Library

Header File

Library

Header File

icc-imf

math.h or mathimf.h

KML_MATH

km.h

MKL-VML

mkl.h or mkl_vml.h

KML_VML

kvml.h

MKL_BLAS

mkl.h or mkl_cblas.h

KML_BLAS

kblas.h

MKL_SPBLAS

mkl.h or mkl_spblas.h

KML_SPBLAS

kspblas.h

MKL-FFT

mkl.h or mkl_dfti.h

KML_FFT

kfft.h

MKL_LAPACK

mkl.h or mkl_lapack.h

KML_LAPACK

klapack.h or kservice.h

MKL-SOLVER

mkl.h or mkl_rci.h

KML_SOLVER (iterative solution)

kml_iss.h

MKL PARDISO or PARDISO-cluster

mkl_pardiso.h or mkl_cluster_sparse_solver.h

KML_SOLVER (direct solution)

kml_scadss.h

PETSc

petscksp.h

KML_SOLVER (iterative solution)

kml_iss.h/kml_scaiss.h

MUMPs

dmumps_c.h, smumps_c.h, cmumps_c.h or zmumps_c.h

KML_SOLVER (direct solution)

kml_scadss.h

OpenBLAS

cblas.h

KML_BLAS

kblas.h

FFTW

fftw3.h

KML_FFT

kfft.h

MKL_SCALAPACK

mkl.h or mkl_scalapack.h

KML_SCALAPACK

kscalapack.h, klapack.h, or kservice.h