Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ILUT — Parallel Incomplete LU Factorization with Threshold

🇷🇺 Читать на русском

C++ Python MPI OpenMP

A from-scratch implementation of the ILUT algorithm — incomplete LU factorization with a dual dropping rule (threshold tau + fill-in cap) — for sparse matrices in CSR format, parallelized with OpenMP and MPI.

The algorithm follows Y. Saad, Iterative Methods for Sparse Linear Systems (see ILUT.pdf).


Why ILUT

ILUT builds an approximate A ≈ L·U factorization that is cheap to compute and store, and is widely used as a preconditioner to accelerate the convergence of iterative Krylov solvers (GMRES, BiCGStab) on large sparse linear systems. The threshold tau and the fill-in limit p trade factorization accuracy against memory and runtime.

Implementations

Directory Language Parallelism Notes
ILUT_OpenMP/ C++ OpenMP Shared-memory version. Most loops over a CSR structure are not thread-safe; parallelism is applied to the one loop in SparseMatrix that allows it safely.
ILUT_MPI/ C++ MPI Distributed-memory version.
ILUT_MPI_Python/ Python MPI (mpi4py) Reference/readable port with custom SparseMatrix / SparseVector classes.

All versions implement their own sparse storage (SparseVector, SparseMatrix in CSR) rather than relying on a library — including a bounds-checked operator[] that inserts missing entries on demand.


Build & run

OpenMP (C++)

cd ILUT_OpenMP
g++ -O2 -fopenmp ILUT_omp.cpp -o ilut_omp
OMP_NUM_THREADS=4 ./ilut_omp

MPI (C++)

cd ILUT_MPI
mpicxx -O2 ILUT_MPI.cpp -o ilut_mpi
mpirun -np 4 ./ilut_mpi

MPI (Python)

cd ILUT_MPI_Python
mpirun -np 4 python ILUT.py

Highlights

  • Hand-written sparse linear algebra (CSR) in C++ and Python — no external numerics dependency.
  • The same numerical algorithm expressed across three parallel programming models (OpenMP, MPI C++, MPI Python).
  • Honest treatment of the limits of parallelizing irregular sparse loops.

Course project in high-performance / numerical computing, Faculty of Computational Mathematics and Cybernetics, Lomonosov MSU.

About

Parallel ILUT (incomplete LU factorization with threshold) for sparse CSR matrices — OpenMP and MPI implementations in C++ and Python.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages