Skip to main content
`Ctrl`+`K`

# 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

## Note

Using a larger block size can improve the efficiency of the solver.

## See Also

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

## Level

advanced

## Location

src/ksp/ksp/interface/itfunc.c

## Examples

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

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