RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • chol
    • decomposition
    • decomposition.ctranspose
    • decomposition.mldivide
    • decomposition.mrdivide
    • decomposition.mtimes
    • decomposition.rdivide
    • decomposition.subsref
    • decomposition.times
    • decomposition.uminus
    • decomposition.uplus
    • eig
    • eigs
    • gmres
    • ichol
    • ilu
    • lu
    • ordeig
    • ordqz
    • ordschur
    • pcg
    • qr
    • qz
    • rsf2csf
    • schur
    • svd

ichol — Compute sparse incomplete Cholesky factors without densifying.

ichol constructs a managed sparse incomplete Cholesky factor for preconditioning and sparse iterative solves.

Syntax

L = ichol(A)
L = ichol(A, options)

Inputs

A
Type
NumericArray
Required
Yes
Default
—
Description
Square sparse single- or double-precision matrix.
options
Type
Any
Required
Yes
Default
struct('type','nofill','droptol',0,'michol','off','diagcomp',0,'shape','lower')
Description
Incomplete-factorization options.
NameTypeRequiredDefaultDescription
ANumericArrayYes—Square sparse single- or double-precision matrix.
optionsAnyYesstruct('type','nofill','droptol',0,'michol','off','diagcomp',0,'shape','lower')Incomplete-factorization options.

Returns

L
Type
NumericArray
Description
Sparse incomplete lower or upper Cholesky factor.
NameTypeDescription
LNumericArraySparse incomplete lower or upper Cholesky factor.

Errors

RunMat:ichol:InvalidArgument
When
Options are malformed, unsupported, or more than one output is requested.
Message
ichol: invalid options or output count
RunMat:ichol:InvalidInput
When
Input is not a finite square sparse single- or double-precision matrix.
Message
ichol: expected a finite square sparse single- or double-precision matrix
RunMat:ichol:NotPositiveDefinite
When
The incomplete factorization encounters a nonpositive pivot.
Message
ichol: matrix is not positive definite; use diagcomp to compensate the diagonal
RunMat:ichol:Runtime
When
Managed execution or exact sparse output publication fails.
Message
ichol: managed sparse execution failed
IdentifierWhenMessage
RunMat:ichol:InvalidArgumentOptions are malformed, unsupported, or more than one output is requested.ichol: invalid options or output count
RunMat:ichol:InvalidInputInput is not a finite square sparse single- or double-precision matrix.ichol: expected a finite square sparse single- or double-precision matrix
RunMat:ichol:NotPositiveDefiniteThe incomplete factorization encounters a nonpositive pivot.ichol: matrix is not positive definite; use diagcomp to compensate the diagonal
RunMat:ichol:RuntimeManaged execution or exact sparse output publication fails.ichol: managed sparse execution failed

Syntax

L = ichol(A)

L = ichol(A, options)

A must be a square sparse single- or double-precision real or complex matrix. The default computes a zero-fill incomplete lower Cholesky factor.

options is a scalar struct. Supported fields are type ('nofill' or 'ict'), droptol (nonnegative scalar), michol ('off' or 'on'), diagcomp (nonnegative scalar), and shape ('lower' or 'upper').

Behavior

With type = 'nofill', the factor uses the selected triangular sparsity pattern of A. With type = 'ict', fill entries in column j whose magnitude exceeds droptol * norm(A(j:end,j),1) over the selected triangle are retained.

michol = 'on' compensates the diagonal for discarded contributions. diagcomp adds a nonnegative multiple of the source diagonal before factorization and can stabilize a matrix that otherwise encounters a nonpositive pivot.

The default shape = 'lower' returns sparse L; shape = 'upper' returns its conjugate transpose.

Input precision and real/complex class are preserved. A nonpositive pivot raises RunMat:ichol:NotPositiveDefinite.

Execution and ownership

ichol borrows the input CSC arrays, admits all retained factor and workspace growth through the managed host allocation ledger, cooperatively checkpoints long work, and publishes a validated exact sparse output. It does not densify the matrix.

Sparse factorization is a managed CPU operation. Resident or dense inputs are rejected rather than silently transferred or converted.

Examples

Zero-fill incomplete Cholesky factor

A = sparse([4 -1 0; -1 4 -1; 0 -1 4]);
L = ichol(A);
assert(issparse(L));

Threshold incomplete factorization

A = sparse([6 -1 0; -1 6 -1; 0 -1 6]);
opts = struct('type','ict','droptol',1e-3,'michol','on');
L = ichol(A, opts);

Upper incomplete factor

A = sparse([5 1; 1 3]);
R = ichol(A, struct('shape','upper'));

Using ichol with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how ichol changes the result.

Run a small ichol example, explain the result, then change one input and compare the output.

FAQ

When should I use nofill or ict?⌄

Use nofill for predictable storage bounded by the source pattern. Use ict when additional retained fill can improve the preconditioner; tune droptol to trade memory for quality.

What does diagcomp do?⌄

It shifts each source diagonal before factorization. A small positive value can avoid breakdown for matrices whose zero-fill factor is not positive definite.

Related Linalg functions

Factor

chol · decomposition · decomposition.ctranspose · decomposition.mldivide · decomposition.mrdivide · decomposition.mtimes · decomposition.rdivide · decomposition.subsref · decomposition.times · decomposition.uminus · decomposition.uplus · eig · eigs · gmres · ilu · lu · ordeig · ordqz · ordschur · pcg · qr · qz · rsf2csf · schur · svd

Structure

bandwidth · isdiag · ishermitian · issymmetric · istril · istriu · symrcm

Solve

cond · det · inv · linsolve · norm · null · pinv · rank · rcond · rref · vecnorm

Ops

cross · ctranspose · dot · mldivide · mpower · mrdivide · mtimes · pagemtimes · pagetranspose · trace · transpose

Source you can read

Every RunMat function's source is public. Read exactly how ichol is executed, line by line, in Rust.

  • View the source for ichol in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Syntax
  • Behavior
  • Execution and ownership
  • Examples
  • Zero-fill incomplete Cholesky factor
  • Threshold incomplete factorization
  • Upper incomplete factor
  • Using ichol with coding agents
  • FAQ
  • Related Linalg functions
  • Factor
  • Structure
  • Solve
  • Ops
  • Source you can read
  • About RunMat