PaStiX Handbook  6.3.2
Solve step

This group describes all the routines to solve the system. More...

Modules

 Solve kernels
 

Functions

int pastixRhsSchurGet (const pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_rhs_t rhsB, void *B, pastix_int_t ldb)
 Get the vector in an RHS data structure. More...
 
int pastixRhsSchurSet (const pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, void *B, pastix_int_t ldb, pastix_rhs_t rhsB)
 Set the vector in an RHS data structure. More...
 
int pastixRhsDoubletoSingle (const pastix_rhs_t dB, pastix_rhs_t sB)
 Reduces the precision of an RHS. More...
 
int pastixRhsSingleToDouble (const pastix_rhs_t sB, pastix_rhs_t dB)
 Increases the precision of an RHS. More...
 
int pastix_subtask_applyorder (pastix_data_t *pastix_data, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, void *b, pastix_int_t ldb, pastix_rhs_t Bp)
 Apply a permutation on the right-and-side vector before the solve step. More...
 
int pastix_subtask_trsm (pastix_data_t *pastix_data, pastix_side_t side, pastix_uplo_t uplo, pastix_trans_t trans, pastix_diag_t diag, pastix_rhs_t Bp)
 Apply a triangular solve on the right-and-side vectors. More...
 
int pastix_subtask_diag (pastix_data_t *pastix_data, pastix_rhs_t Bp)
 Apply a diagonal operation on the right-and-side vectors. More...
 
int pastix_subtask_solve_adv (pastix_data_t *pastix_data, pastix_trans_t transA, pastix_rhs_t Bp)
 Solve the given problem without applying the permutation. More...
 
int pastix_subtask_solve (pastix_data_t *pastix_data, pastix_rhs_t Bp)
 Solve the given problem without applying the permutation. More...
 

Detailed Description

This group describes all the routines to solve the system.

Function Documentation

◆ pastixRhsSchurGet()

int pastixRhsSchurGet ( const pastix_data_t pastix_data,
pastix_int_t  m,
pastix_int_t  n,
pastix_rhs_t  rhsB,
void *  B,
pastix_int_t  ldb 
)

Get the vector in an RHS data structure.

Parameters
[in]pastix_dataTODO
[in]mThe number of rows of the vector b, must be equal to the number of unknowns in the Schur complement.
[in]nThe number of columns of the vector b.
[in]rhsBThe pastix_rhs_t data structure used to solve the system.
[in,out]BOn entry, a vector of size ldb-by-n. On exit, the m-by-n leading part contains the right hand side related to the Schur part.
[in]ldbThe leading dimension of the vector b.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 182 of file schur.c.

References pastix_rhs_s::b, solver_matrix_s::cblkschur, solver_matrix_s::cblktab, solver_cblk_s::fcolnum, solver_cblk_s::lcolidx, pastix_rhs_s::n, solver_matrix_s::nodenbr, PASTIX_ERR_BADPARAMETER, pastix_int_t, and pastix_data_s::solvmatr.

◆ pastixRhsSchurSet()

int pastixRhsSchurSet ( const pastix_data_t pastix_data,
pastix_int_t  m,
pastix_int_t  n,
void *  B,
pastix_int_t  ldb,
pastix_rhs_t  rhsB 
)

Set the vector in an RHS data structure.

Parameters
[in]pastix_dataTODO
[in]mThe number of rows of the vector b.
[in]nThe number of columns of the vector b.
[in]BThe vector b.
[in]ldbThe leading dimension of the vector b.
[out]rhsBThe pastix_rhs_t data structure which contains the vector b.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 284 of file schur.c.

References pastix_rhs_s::b, solver_matrix_s::cblkschur, solver_matrix_s::cblktab, solver_cblk_s::fcolnum, solver_cblk_s::lcolidx, pastix_rhs_s::n, solver_matrix_s::nodenbr, PASTIX_ERR_BADPARAMETER, pastix_int_t, and pastix_data_s::solvmatr.

◆ pastixRhsDoubletoSingle()

int pastixRhsDoubletoSingle ( const pastix_rhs_t  dB,
pastix_rhs_t  sB 
)

Reduces the precision of an RHS.

Parameters
[in]dBThe allocated pastix_rhs_t data structure to convert to lower precision.
[out]sBOn entry, an allocated pastix_rhs_t data structure. On exit, the reduced precision pastix_rhs_t of dB. If sB->allocated == -1 on entry, the internal b vector is automatically allocated by the function.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 146 of file pastix_rhs.c.

References pastix_rhs_s::allocated, pastix_rhs_s::b, pastix_rhs_s::flttype, pastix_rhs_s::ld, pastix_rhs_s::n, and PASTIX_ERR_BADPARAMETER.

Referenced by pastix_subtask_solve_adv().

◆ pastixRhsSingleToDouble()

int pastixRhsSingleToDouble ( const pastix_rhs_t  sB,
pastix_rhs_t  dB 
)

Increases the precision of an RHS.

Parameters
[in]sBThe allocated pastix_rhs_t data structure to convert to higher precision.
[out]dBOn entry, an allocated pastix_rhs_t data structure. On exit, the increased precision pastix_rhs_t of sB. If dB->allocated == -1 on entry, the internal b vector is automatically allocated by the function.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 226 of file pastix_rhs.c.

References pastix_rhs_s::allocated, pastix_rhs_s::b, pastix_rhs_s::flttype, pastix_rhs_s::ld, pastix_rhs_s::n, and PASTIX_ERR_BADPARAMETER.

Referenced by pastix_subtask_solve_adv().

◆ pastix_subtask_applyorder()

int pastix_subtask_applyorder ( pastix_data_t pastix_data,
pastix_dir_t  dir,
pastix_int_t  m,
pastix_int_t  n,
void *  b,
pastix_int_t  ldb,
pastix_rhs_t  Bp 
)

Apply a permutation on the right-and-side vector before the solve step.

This routine is affected by the following parameters: IPARM_VERBOSE, IPARM_FACTORIZATION, IPARM_APPLYPERM_WS.

Parameters
[in,out]pastix_dataThe pastix_data structure that describes the solver instance.
[in]dirForward or backword application of the permutation.
[in]mSize of the right-and-side vectors.
[in]nNumber of right-and-side vectors.
[in,out]bThe right-and-side vectors of size ldb-by-n. If dir == PastixDirForward, b is used as input to initialize the permuted b. If the matrix is replicated on all nodes or in shared memory, the permuted vector has the same size as b, and b is modified in-place. If dir == PastixDirBackward, b must be allocated on entry and is filled by the reverse permutation of Bp. Note that if the matrix is replicated on all nodes or in shared memory, b is modified in-place.
[in]ldbThe leading dimension of the right-and-side vectors.
[in,out]BpThe right-and-side vectors of size ldb-by-n. On entry, must be initialized through pastixRhsInit(). On exit, contains the information about the permuted vector when dir == PastixDirForward. When dir == PastixDirBackward, the data is used as input to update b.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 169 of file pastix_task_solve.c.

References pastix_rhs_s::allocated, pastix_rhs_s::b, pastix_order_s::baseval, bvec_clapmr(), bvec_dlapmr(), bvec_slapmr(), bvec_zlapmr(), pastix_data_s::csc, pastix_rhs_s::flttype, pastix_rhs_s::m, pastix_rhs_s::n, pastix_data_s::ordemesh, PASTIX_ERR_BADPARAMETER, PASTIX_SUCCESS, and PastixDirForward.

Referenced by pastix_task_solve().

◆ pastix_subtask_trsm()

int pastix_subtask_trsm ( pastix_data_t pastix_data,
pastix_side_t  side,
pastix_uplo_t  uplo,
pastix_trans_t  trans,
pastix_diag_t  diag,
pastix_rhs_t  Bp 
)

Apply a triangular solve on the right-and-side vectors.

This routine is affected by the following parameters: IPARM_VERBOSE, IPARM_FACTORIZATION.

Parameters
[in,out]pastix_dataThe pastix_data structure that describes the solver instance.
[in]sideLeft or right application.
[in]uploUpper or Lower part.
[in]transWith or without transposition (or conjugate transposition).
[in]diagDiagonal terms are unit or not.
[in,out]BpThe right-and-side vector (can be multiple rhs). On exit, the solution is stored in place of the right-hand-side vector.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 296 of file pastix_task_solve.c.

References pastix_rhs_s::cblkb, solver_matrix_s::faninnbr, pastix_rhs_s::flttype, PASTIX_ERR_BADPARAMETER, pastix_int_t, PASTIX_SUCCESS, PastixConjTrans, PastixLeft, PastixTrans, PastixUnit, PastixUpper, solver_matrix_s::recvnbr, pastix_data_s::solvmatr, sopalin_ctrsm(), sopalin_dtrsm(), sopalin_strsm(), sopalin_ztrsm(), and pastix_data_s::steps.

Referenced by pastix_subtask_solve_adv().

◆ pastix_subtask_diag()

int pastix_subtask_diag ( pastix_data_t pastix_data,
pastix_rhs_t  Bp 
)

Apply a diagonal operation on the right-and-side vectors.

This routine is affected by the following parameters: IPARM_VERBOSE, IPARM_FACTORIZATION.

Parameters
[in,out]pastix_dataThe pastix_data structure that describes the solver instance.
[in,out]BpThe right-and-side vector (can be multiple rhs). On exit, the solution is stored in place of the right-hand-side vector.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 417 of file pastix_task_solve.c.

References pastix_rhs_s::b, pastix_rhs_s::flttype, pastix_rhs_s::ld, pastix_rhs_s::n, PASTIX_ERR_BADPARAMETER, pastix_int_t, PASTIX_SUCCESS, pastix_data_s::solvmatr, sopalin_cdiag(), sopalin_ddiag(), sopalin_sdiag(), sopalin_zdiag(), and pastix_data_s::steps.

Referenced by pastix_subtask_solve_adv().

◆ pastix_subtask_solve_adv()

int pastix_subtask_solve_adv ( pastix_data_t pastix_data,
pastix_trans_t  transA,
pastix_rhs_t  Bp 
)

Solve the given problem without applying the permutation.

Warning
The input vector is considered already permuted. For a solve step with permutation, see pastix_task_solve()

This routine is affected by the following parameters: IPARM_VERBOSE, IPARM_FACTORIZATION.

Parameters
[in,out]pastix_dataThe pastix_data structure that describes the solver instance.
[in]transAPastixNoTrans: A is not transposed (CSC matrix) PastixTrans: A is transposed (CSR of symmetric/general matrix) PastixConjTrans: A is conjugate transposed (CSR of hermitian matrix)
[in,out]BpThe right-and-side vectors (can be multiple rhs). On exit, the solution is stored in place of the right-hand-side vector.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Summary of the operations to perform the full solve if the original A was either transposed or conjugate transposed.

op(A) | Factorization | Step 1 | Step 2 -------—+------------------—+--------—+--------— NoTrans | L U | L y = b | U x = y NoTrans | L L^t | L y = b | L^t x = y NoTrans | L L^h | L y = b | L^h x = y Trans |(L U )^t = U^t L^t | U^t y = b | L^t x = y Trans |(L L^t)^t = L L^t | L y = b | L^t x = y Trans |(L L^h)^t = c(L) L^t | Not handled (c(L)) ConjTrans |(L U )^h = U^h L^h | Not handled (U^h) ConjTrans |(L L^t)^h = c(L) L^h | Not handled (c(L)) ConjTrans |(L L^h)^h = L L^h | L y = b | L^h x = y

Definition at line 511 of file pastix_task_solve.c.

References pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_SOLV_ENERGY, DPARM_SOLV_TIME, pastix_rhs_s::flttype, pastix_data_s::inter_node_comm, pastix_data_s::inter_node_procnum, pastix_data_s::iparm, IPARM_FACTORIZATION, IPARM_MIXED, IPARM_TRACE, IPARM_VERBOSE, kernelsTraceStart(), kernelsTraceStop(), PASTIX_ERR_BADPARAMETER, pastix_subtask_diag(), pastix_subtask_trsm(), PASTIX_SUCCESS, PastixConjTrans, PastixFactLDLH, PastixFactLDLT, PastixFactLLH, PastixFactLU, PastixLeft, PastixLower, PastixNonUnit, PastixNoTrans, pastixRhsDoubletoSingle(), pastixRhsFinalize(), pastixRhsInit(), pastixRhsSingleToDouble(), PastixTraceSolve, PastixTrans, PastixUnit, PastixUpper, PastixVerboseNot, and pastix_data_s::steps.

Referenced by pastix_subtask_solve().

◆ pastix_subtask_solve()

int pastix_subtask_solve ( pastix_data_t pastix_data,
pastix_rhs_t  Bp 
)

Solve the given problem without applying the permutation.

Warning
The input vector is considered already permuted. For a solve step with permutation, see pastix_task_solve()

This routine is affected by the following parameters: IPARM_VERBOSE, IPARM_FACTORIZATION, IPARM_TRANSPOSE_SOLVE.

Parameters
[in,out]pastix_dataThe pastix_data structure that describes the solver instance.
[in,out]BpThe right-and-side vectors (can be multiple rhs). On exit, the solution is stored in place of the right-hand-side vector.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect.

Definition at line 712 of file pastix_task_solve.c.

References pastix_data_s::iparm, IPARM_TRANSPOSE_SOLVE, and pastix_subtask_solve_adv().

Referenced by bcsc_cspsv(), bcsc_dspsv(), bcsc_sspsv(), bcsc_zspsv(), and pastix_task_solve().