39#ifndef DOXYGEN_SHOULD_SKIP_THIS
111 pastix_bcsc_t *bcsc = pastix_data->
bcsc;
117 const void *b = Bp->
b;
123 pastix_print_warning(
"Refinement works only with 1 rhs, We will iterate on each RHS one by one\n" );
128 fprintf(stderr,
"Refinement is not available with Schur complement when non local solve is required\n");
134 int isDouble = (bcsc->flttype == PastixDouble) || (bcsc->flttype == PastixComplex64);
148 char *xptr = (
char *)x;
149 char *bptr = (
char *)b;
150 size_t shiftx, shiftb;
153 shiftx = ldx * pastix_size_of( Xp->
flttype );
154 shiftb = ldb * pastix_size_of( Bp->
flttype );
158 for(i=0; i<nrhs; i++, xptr += shiftx, bptr += shiftb ) {
162 it = refinefct( pastix_data, Xp, Bp );
250 fprintf(stderr,
"Refinement is not available with Schur complement when non local solve is required\n");
374 if (pastix_data == NULL) {
375 pastix_print_error(
"pastix_task_solve_and_refine: wrong pastix_data parameter" );
378 iparm = pastix_data->
iparm;
380 if ( !(pastix_data->
steps & STEP_NUMFACT) ) {
381 pastix_print_error(
"pastix_task_solve_and_refine: Numerical factorization hasn't been done." );
387 fprintf(stderr,
"Refinement is not available with Schur complement when non local solve is required\n");
BEGIN_C_DECLS typedef int pastix_int_t
int pastixRhsInit(pastix_rhs_t *rhs)
Initialize an RHS data structure.
int pastixRhsFinalize(pastix_rhs_t rhs)
Cleanup an RHS data structure.
int pastixBlasSetNumThreadsOne(void)
Set the number of threads for blas calls (BLIS, MKL, OpenBLAS) to 1 and return the previous number of...
int pastixBlasSetNumThreads(int nt)
Set the number of threads for blas calls (BLIS, MKL, OpenBLAS) and return the previous number of blas...
@ DPARM_EPSILON_REFINEMENT
@ PASTIX_ERR_BADPARAMETER
pastix_int_t d_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 s_grad_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 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)
pastix_int_t z_grad_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 c_grad_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 z_bicgstab_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 z_gmres_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(* refine_fct_t)(pastix_data_t *, pastix_rhs_t, pastix_rhs_t)
Select the refinement function to call depending on the matrix type and the precision.
pastix_int_t d_bicgstab_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)
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.
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.
int pastix_subtask_solve(pastix_data_t *pastix_data, pastix_rhs_t b)
Solve the given problem without applying the permutation.
pastix_coeftype_t flttype
PASTIX_Comm inter_node_comm
int pastix_task_refine(pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t nrhs, void *b, pastix_int_t ldb, void *x, pastix_int_t ldx)
Perform iterative refinement.
int pastix_task_solve_and_refine(pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t nrhs, void *b, pastix_int_t ldb, void *x, pastix_int_t ldx)
Performs solve and iterative refinement without unnecessary permutations.
Main PaStiX data structure.
Main PaStiX RHS structure.