KSPSetMatSolveBatchSize#

Sets the maximum number of columns treated simultaneously in KSPMatSolve().

Synopsis#

#include "petscksp.h" 
#include "petscmat.h" 
PetscErrorCode KSPSetMatSolveBatchSize(KSP ksp, PetscInt bs)

Logically Collective

Input Parameters#

  • ksp - the KSP iterative solver

  • bs - batch size

Options Database Key#

  • -ksp_matsolve_batch_size bs - the maximum number of columns treated simultaneously

Note#

KSPMatSolve() splits the columns of the block of right-hand sides into batches of at most bs columns and calls the KSPType implementation once per batch. The default is to treat the whole block at once. Using a larger batch size can improve the solver’s efficiency but requires more memory.

See Also#

KSP: Linear System Solvers, KSPMatSolve(), KSPMatSolveTranspose(), KSPGetMatSolveBatchSize(), -mat_mumps_icntl_27, -matproduct_batch_size

Level#

advanced

Location#

src/ksp/ksp/interface/itfunc.c

Examples#

src/ksp/ksp/tutorials/ex76.c
src/ksp/ksp/tutorials/ex77.c
src/ksp/ksp/tutorials/ex77f.F90


Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages