Rate This Document
Findability
Accuracy
Completeness
Readability

Cluster Mode

Migration Procedure

Migration Through the Adaptation Layer

  1. Change #include "HYPRE.h" to #include "HYPRE_kp.h" and remove other HYPRE-related header files. If ILU is used as a preconditioner, remove the preconditioner creation and setting interfaces such as HYPRE_ILUCreate, HYPRE_ILUDestroy, and HYPRE_ILUSetMaxIter. This rule applies to BoomerAMG.
  2. Load the HPCKit environment variables, and set the header file path of HYPRE and the dynamic library path of the KML adaptation layer. After the setting is successful, recompile the application. For details about how to load the environment variables, see "Setting Environment Variables" in Kunpeng HPCKit 26.1.RC1 Installation Guide.
    mpicc program.c  -lHYPRE_kp -lkscasolver -lkservice -lklapack -lkm -lm

* Real-world application scenarios often require flexible invocation. For more information, refer to the internal implementation of the adaptation layer in hypre_kunpeng.c.

Table 1 Adapted interfaces

HYPRE Interface

HYPRE_Init

HYPRE_IJMatrixCreate

HYPRE_IJMatrixSetObjectType

HYPRE_IJMatrixInitialize

HYPRE_IJMatrixSetValues

HYPRE_IJMatrixAssemble

HYPRE_IJMatrixGetObject

HYPRE_IJVectorCreate

HYPRE_IJVectorSetObjectType

HYPRE_IJVectorInitialize

HYPRE_IJVectorSetValues

HYPRE_IJVectorAssemble

HYPRE_IJVectorGetObject

HYPRE_ParCSRBiCGSTABCreate

HYPRE_ParCSRBiCGSTABSetTol

HYPRE_ParCSRBiCGSTABSetMaxIter

HYPRE_ParCSRBiCGSTABSetup

HYPRE_ParCSRBiCGSTABSolve

HYPRE_ParCSRBiCGSTABGetNumIterations

HYPRE_ParCSRBiCGSTABGetFinalRelativeResidualNorm

HYPRE_ParCSRBiCGSTABDestroy

HYPRE_ParCSRBiCGSTABSetPrecond

HYPRE_ParCSRGMRESCreate

HYPRE_ParCSRGMRESSetTol

HYPRE_ParCSRGMRESSetMaxIter

HYPRE_ParCSRGMRESSetup

HYPRE_ParCSRGMRESSolve

HYPRE_ParCSRGMRESGetNumIterations

HYPRE_ParCSRGMRESGetFinalRelativeResidualNorm

HYPRE_ParCSRGMRESDestroy

HYPRE_ParCSRGMRESSetPrecond

HYPRE_IJMatrixDestroy

HYPRE_IJVectorDestroy

HYPRE_Finalize