PaStiX Handbook  6.3.2
Refinement step

This group describes all the routines to apply iterative refinement on the system. More...

Modules

 Refinement internal function documentation
 TODO.
 

Functions

int pastix_subtask_refine (pastix_data_t *pastix_data, pastix_rhs_t Bp, pastix_rhs_t Xp)
 Perform the iterative refinement without apply the permutations. More...
 
pastix_int_t z_bicgstab_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t c_bicgstab_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t d_bicgstab_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t s_bicgstab_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t z_gmres_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t c_gmres_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t d_gmres_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t s_gmres_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t z_grad_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t c_grad_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t d_grad_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t s_grad_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t z_pivot_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t c_pivot_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t d_pivot_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 
pastix_int_t s_pivot_smp (pastix_data_t *pastix_data, pastix_rhs_t xp, pastix_rhs_t bp)
 

Detailed Description

This group describes all the routines to apply iterative refinement on the system.

Function Documentation

◆ pastix_subtask_refine()

int pastix_subtask_refine ( pastix_data_t pastix_data,
pastix_rhs_t  Bp,
pastix_rhs_t  Xp 
)

Perform the iterative refinement without apply the permutations.

This routine is affected by the following parameters: IPARM_REFINEMENT, DPARM_EPSILON_REFINEMENT

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[in,out]BpThe right hand side matrix of size ldb-by-nrhs. B is noted as inout, as permutation might be performed on the matrix. On exit, the matrix is restored as it was on entry.
[in,out]XpThe matrix x of size ldx-by-nrhs. On entry, the initial guess x0 for the refinement step, that may be the solution returned by the solve step or any other initial guess. On exit, contains the final solution after the iterative refinement.
Return values
PASTIX_SUCCESSon successful exit,
PASTIX_ERR_BADPARAMETERif one parameter is incorrect,

Definition at line 106 of file pastix_task_refine.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::iparm, IPARM_SCHUR_SOLV_MODE, pastix_rhs_s::ld, pastix_rhs_s::m, pastix_rhs_s::n, pastix_int_t, and pastix_data_s::schur_n.

◆ z_bicgstab_smp()

pastix_int_t z_bicgstab_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

z_bicgstab_smp - Function computing bicgstab iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file z_refine_bicgstab.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, pastix_data_s::steps, and z_refine_init().

◆ c_bicgstab_smp()

pastix_int_t c_bicgstab_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

c_bicgstab_smp - Function computing bicgstab iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file c_refine_bicgstab.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, c_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ d_bicgstab_smp()

pastix_int_t d_bicgstab_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

d_bicgstab_smp - Function computing bicgstab iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file d_refine_bicgstab.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, d_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ s_bicgstab_smp()

pastix_int_t s_bicgstab_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

s_bicgstab_smp - Function computing bicgstab iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file s_refine_bicgstab.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, s_refine_init(), and pastix_data_s::steps.

◆ z_gmres_smp()

pastix_int_t z_gmres_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

z_gmres_smp - Function computing GMRES iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

H stores the h_{i,j} elements of the upper hessenberg matrix H (See Alg. 9.5 p 270) V stores the v_{i} vectors W stores the M^{-1} v_{i} vectors to avoid the application of the preconditioner on the output result (See line 11 of Alg 9.5)

If no preconditioner is applied, or the user wants to save memory, W stores only temporarily one vector for the Ax product (ldw is set to 0 to reuse the same vector at each iteration)

Algorithm from Iterative Methods for Sparse Linear systems, Y. Saad, Second Ed. p267-273

The version implemented is the Right preconditioned algorithm.

Compute x_m = x_0 + M^{-1} V_m y_m = x_0 + W_m y_m

Since we saved memory, we do not have (M^{-1} V_m) stored, thus we compute: w = V_m y_m w = M^{-1} (V_m y_m) x = x0 + (M^{-1} (V_m y_m))

Since we did not saved memory, we do have (M^{-1} V_m) stored in W_m if precond is true, thus we compute: x = x0 + W_m y_m, if precond x = x0 + V_m y_m, if not precond

Exit only if maximum number of iteration is reached. Exit on residual if checked at the beginning of the outer loop to be sure that the final residual of Ax-b is equal to the estimator computed within the inner loop.

Definition at line 49 of file z_refine_gmres.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_GMRES_IM, IPARM_ITERMAX, IPARM_MIXED, pastix_int_t, PastixNoTrans, pastix_data_s::steps, and z_refine_init().

◆ c_gmres_smp()

pastix_int_t c_gmres_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

c_gmres_smp - Function computing GMRES iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

H stores the h_{i,j} elements of the upper hessenberg matrix H (See Alg. 9.5 p 270) V stores the v_{i} vectors W stores the M^{-1} v_{i} vectors to avoid the application of the preconditioner on the output result (See line 11 of Alg 9.5)

If no preconditioner is applied, or the user wants to save memory, W stores only temporarily one vector for the Ax product (ldw is set to 0 to reuse the same vector at each iteration)

Algorithm from Iterative Methods for Sparse Linear systems, Y. Saad, Second Ed. p267-273

The version implemented is the Right preconditioned algorithm.

Compute x_m = x_0 + M^{-1} V_m y_m = x_0 + W_m y_m

Since we saved memory, we do not have (M^{-1} V_m) stored, thus we compute: w = V_m y_m w = M^{-1} (V_m y_m) x = x0 + (M^{-1} (V_m y_m))

Since we did not saved memory, we do have (M^{-1} V_m) stored in W_m if precond is true, thus we compute: x = x0 + W_m y_m, if precond x = x0 + V_m y_m, if not precond

Exit only if maximum number of iteration is reached. Exit on residual if checked at the beginning of the outer loop to be sure that the final residual of Ax-b is equal to the estimator computed within the inner loop.

Definition at line 49 of file c_refine_gmres.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, c_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_GMRES_IM, IPARM_ITERMAX, IPARM_MIXED, pastix_int_t, PastixNoTrans, and pastix_data_s::steps.

◆ d_gmres_smp()

pastix_int_t d_gmres_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

d_gmres_smp - Function computing GMRES iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

H stores the h_{i,j} elements of the upper hessenberg matrix H (See Alg. 9.5 p 270) V stores the v_{i} vectors W stores the M^{-1} v_{i} vectors to avoid the application of the preconditioner on the output result (See line 11 of Alg 9.5)

If no preconditioner is applied, or the user wants to save memory, W stores only temporarily one vector for the Ax product (ldw is set to 0 to reuse the same vector at each iteration)

Algorithm from Iterative Methods for Sparse Linear systems, Y. Saad, Second Ed. p267-273

The version implemented is the Right preconditioned algorithm.

Compute x_m = x_0 + M^{-1} V_m y_m = x_0 + W_m y_m

Since we saved memory, we do not have (M^{-1} V_m) stored, thus we compute: w = V_m y_m w = M^{-1} (V_m y_m) x = x0 + (M^{-1} (V_m y_m))

Since we did not saved memory, we do have (M^{-1} V_m) stored in W_m if precond is true, thus we compute: x = x0 + W_m y_m, if precond x = x0 + V_m y_m, if not precond

Exit only if maximum number of iteration is reached. Exit on residual if checked at the beginning of the outer loop to be sure that the final residual of Ax-b is equal to the estimator computed within the inner loop.

Definition at line 49 of file d_refine_gmres.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, d_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_GMRES_IM, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ s_gmres_smp()

pastix_int_t s_gmres_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

s_gmres_smp - Function computing GMRES iterative refinement.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

H stores the h_{i,j} elements of the upper hessenberg matrix H (See Alg. 9.5 p 270) V stores the v_{i} vectors W stores the M^{-1} v_{i} vectors to avoid the application of the preconditioner on the output result (See line 11 of Alg 9.5)

If no preconditioner is applied, or the user wants to save memory, W stores only temporarily one vector for the Ax product (ldw is set to 0 to reuse the same vector at each iteration)

Algorithm from Iterative Methods for Sparse Linear systems, Y. Saad, Second Ed. p267-273

The version implemented is the Right preconditioned algorithm.

Compute x_m = x_0 + M^{-1} V_m y_m = x_0 + W_m y_m

Since we saved memory, we do not have (M^{-1} V_m) stored, thus we compute: w = V_m y_m w = M^{-1} (V_m y_m) x = x0 + (M^{-1} (V_m y_m))

Since we did not saved memory, we do have (M^{-1} V_m) stored in W_m if precond is true, thus we compute: x = x0 + W_m y_m, if precond x = x0 + V_m y_m, if not precond

Exit only if maximum number of iteration is reached. Exit on residual if checked at the beginning of the outer loop to be sure that the final residual of Ax-b is equal to the estimator computed within the inner loop.

Definition at line 49 of file s_refine_gmres.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_GMRES_IM, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, s_refine_init(), and pastix_data_s::steps.

◆ z_grad_smp()

pastix_int_t z_grad_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

z_grad_smp - Refine the solution using conjugate gradian method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file z_refine_grad.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, pastix_data_s::steps, and z_refine_init().

◆ c_grad_smp()

pastix_int_t c_grad_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

c_grad_smp - Refine the solution using conjugate gradian method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file c_refine_grad.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, c_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ d_grad_smp()

pastix_int_t d_grad_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

d_grad_smp - Refine the solution using conjugate gradian method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file d_refine_grad.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, d_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ s_grad_smp()

pastix_int_t s_grad_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

s_grad_smp - Refine the solution using conjugate gradian method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 49 of file s_refine_grad.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, s_refine_init(), and pastix_data_s::steps.

◆ z_pivot_smp()

pastix_int_t z_pivot_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

z_pivot_smp - Refine the solution using static pivoting method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 48 of file z_refine_pivot.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, pastix_data_s::steps, and z_refine_init().

◆ c_pivot_smp()

pastix_int_t c_pivot_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

c_pivot_smp - Refine the solution using static pivoting method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 48 of file c_refine_pivot.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, c_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ d_pivot_smp()

pastix_int_t d_pivot_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

d_pivot_smp - Refine the solution using static pivoting method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 48 of file d_refine_pivot.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, d_refine_init(), pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, and pastix_data_s::steps.

◆ s_pivot_smp()

pastix_int_t s_pivot_smp ( pastix_data_t pastix_data,
pastix_rhs_t  xp,
pastix_rhs_t  bp 
)

s_pivot_smp - Refine the solution using static pivoting method.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[out]xpThe solution vector.
[in]bpThe right hand side member (only one).
Returns
Number of iterations

Definition at line 48 of file s_refine_pivot.c.

References pastix_rhs_s::b, pastix_data_s::bcsc, pastix_data_s::dparm, DPARM_EPSILON_REFINEMENT, pastix_data_s::iparm, IPARM_ITERMAX, IPARM_MIXED, IPARM_VERBOSE, pastix_int_t, PastixNoTrans, PastixVerboseNot, pastix_data_s::procnum, s_refine_init(), and pastix_data_s::steps.