Library / SDK
hypre-space/hypre avatar
hypre-space/hypre

HYPRE: preconditioners and multigrid solvers for sparse systems

Parallel solvers for sparse linear systems featuring multigrid methods.

871 stars262 forksCNOASSERTION

At a glance

What is it?
HYPRE is a C library from Lawrence Livermore National Laboratory for preconditioners and solvers that use multigrid methods on large, sparse linear systems running on massively parallel computers. It ships under a dual MIT and Apache-2.0 licence and is installed from the source tree, not from a package manager.
Who is it for?
HYPRE earns a place in projects that already live in a C or C++ codebase and need iterative solvers for sparse systems, since it hands you multigrid preconditioners instead of a hand written V cycle, and it can be driven from Python, MATLAB or Julia through hypredrive without writing your own driver.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 11 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem HYPRE was written to solve

Large sparse linear systems show up in places where physics and engineering meet compute: structural analysis, flow in porous media, radiation transport, and similar problems that discretise a continuous model into a very large matrix with a handful of nonzeros per row. Solving such a system directly is out of the question, so the usual approach is an iterative method that converges in many cheap steps rather than one expensive one.

Iterative methods on their own converge slowly. The standard fix is a preconditioner, which transforms the system into one that is easier to solve, and the quality of that preconditioner decides how many iterations the solver needs and how much communication each iteration costs.

HYPRE is a library of those preconditioners and solvers, and the README states plainly that it features multigrid methods for the solution of large, sparse linear systems of equations on massively parallel computers. The word massively parallel is the load bearing one. This is not a library for a laptop solving a thousand equations; it is aimed at clusters, where the cost of a linear solve is dominated by memory movement and message passing rather than by arithmetic.

The audience is therefore numerical scientists and the engineers of simulation codes, teams who already know what a Krylov solver is and want a better preconditioner underneath it.

Multigrid as the organising idea

The README does not explain the algorithm, and this article will not invent an explanation the documentation does not give. What can be said is what the project says about itself: it is a library of preconditioners and solvers featuring multigrid methods, and it is organised around that family of algorithms rather than around a single solver.

Multigrid as a family matters for adoption decisions. A library built around one method gives you one set of tuning knobs and one set of failure modes. A library that collects several preconditioners and several solvers lets you change the pairing between them, which is often what a code needs when the problem changes scale, or when the mesh becomes less regular.

The practical consequence for a user is that the choice of solver is not made once. In practice you settle on a pairing of preconditioner and solver, then revisit it when the matrix changes character. The README says nothing about which pairings are recommended for a given problem, and that gap is exactly what the online documentation and the project wiki exist to fill.

One more architectural note is worth carrying. HYPRE is written in C, which is visible in the primary language of the repository and in the layout of the source tree. That makes it straightforward to call from C and C++ codes and to embed inside simulation solvers, and it also means the interface is a plain C API with no object oriented sugar layered on top of it.

Where the source tree puts the pieces you will need

The repository layout tells you where to look, which matters because the README itself is short.

Everything under src/ holds the library and its documentation, with the documentation images and text living in src/docs, the directory the README badge points to. The build directory sits at the top level next to src/, and the README notes that code development, build requirements and publications are described on the project wiki, which suggests the build system configuration is kept out of the main README on purpose.

The supporting files at the top level are the parts of a serious library project that tell you what kind of project it is. CONTRIBUTING.md describes how contributions are handled, and the licence section of the README states that all new contributions must be made under both the MIT and Apache-2.0 licences. CITATION.cff holds the citation metadata, which matters for academic use where a paper needs to reference the exact version you ran. CHANGELOG gives the release history, and SUPPORT.md points to where support information is collected.

The AUTOTEST directory is the one entry that a reader should notice for a different reason. In a project with a documented test suite, the test directory tells you whether regressions in a solver are caught before they reach a simulation run. The README does not describe how to run those tests, so treat that as something to look up rather than something you can infer.

Installing HYPRE means building it from source

There is no install command in the README, and that is not an oversight. The README gives two places to go: the documentation on readthedocs, and the INSTALL.md file at the root of the repository. The project wiki covers build requirements for code development.

So the honest answer for a first use is that HYPRE is a source library you configure and build yourself, then link against from your own code or wrap for another language. Nothing in the README mentions prebuilt binaries, a package manager entry or a container image, so an installation guide for this project has to start with the source tree and the INSTALL.md file rather than with a one line install command.

The build directory at the top level of the repository is where you should look for the build definitions, and the presence of a separate src/docs tree and a readthedocs configuration shows that the project treats documentation as part of the deliverable rather than as an afterthought.

Because the library is written in C, linking it from C++ is the low friction path. For anything else, the documented route for runtime control is described in the next section.

Driving HYPRE from Python, MATLAB and Julia through hypredrive

The README separates the solver library from its runtime control layer, and that split is a design decision worth understanding before you pick an integration path.

For flexible runtime control of the solvers, including Python, MATLAB and Julia interfaces, the README directs you to hypredrive, a separate repository. So the picture is a C library with a C interface at its core, plus a driver project that exposes solver configuration and runtime behaviour to scripting languages.

That separation has a clear practical meaning. If your workflow is exploratory, if you want to sweep solver parameters from a script, or if you need to drive a solver from an environment where a C build is inconvenient, hypredrive is the documented route rather than something you write yourself. If your workflow is a long running production simulation that links the solvers directly, then the C API and the build you make from src/ are what you work with, and hypredrive is optional.

The README also points to the readthedocs page for documentation, articles and code examples, and to the wiki for development, build requirements and publications. Between the wiki, the readthedocs site and the separate driver repository, the actual usage documentation sits in three places, so budget some time to find the material for your specific interface rather than expecting the README to carry it.

Boundaries of the project, and what the licence allows

Two things constrain an adopter, and both are visible in the repository rather than hidden.

The first is documentation density. The README is short and generic. It names the class of solvers, links to the wiki and the readthedocs site, and points at INSTALL.md, but it does not list the preconditioners, the solver families, the supported programming languages, or any performance figure. Anyone evaluating HYPRE has to pull that information from the external documentation, and that is the practical constraint on evaluating it quickly.

The second is the licence. HYPRE is distributed under the terms of both the MIT licence and the Apache License version 2.0, and users may choose either at their option. The README also states that all new contributions must be made under both licences, which is the dual licensing pattern used by large projects with many academic contributors. The repository carries LICENSE-MIT, LICENSE-APACHE, COPYRIGHT and NOTICE files at the top level, with the copyright held by Lawrence Livermore National Security and other HYPRE project developers. Whether a given licence suits your organisation is a question for your own legal review, not something this article decides.

On maintenance, the facts are current. The last push was on 2026-10-12, and the release tags show v3.2.0 on 2026-08-24, v3.1.0 on 2026-01-23 and v3.0.0 on 2025-09-26. The project moved to a 3.x series in 2025, so an upgrade across a major version is a real step rather than a routine bump, and the CHANGELOG file is where that detail is recorded.

The alternative: writing the multigrid cycle yourself

The alternative to adopting HYPRE is not a competing library in name alone; it is the option of implementing the preconditioner inside your own code.

The difference in approach is straightforward. Building your own multigrid cycle means you write the hierarchy construction, the smoother, the restriction and prolongation operators, and the residual transfer yourself, and then you own the tuning, the parallel decomposition and the convergence behaviour of every solve you run. The advantage is total control over the internals and no external build in your dependency chain. The cost is that every one of those pieces has to be correct and has to keep working as your solver and your hardware change.

HYPRE moves that work into a maintained library that is distributed from a national laboratory and versioned with a three part number. The price is that you inherit its abstractions, its build step and its release cadence, and you depend on the documentation being reachable when you need to tune something.

For a small team solving a moderate size system, the hand written route is often shorter. For a code that runs large simulations on a cluster, or that needs to switch preconditioner when the problem changes, a library with several multigrid options and a long release history behind it is the more defensible choice, and the CHANGELOG plus the wiki are the places to confirm that the version you plan to pin contains the solvers you need.

Editorial conclusion

HYPRE earns a place in projects that already live in a C or C++ codebase and need iterative solvers for sparse systems, since it hands you multigrid preconditioners instead of a hand written V cycle, and it can be driven from Python, MATLAB or Julia through hypredrive without writing your own driver. It is the wrong choice for small dense problems, for teams that want a solver with a supported commercial support contract, or for anyone who needs documented API coverage in the README alone, because the README points to INSTALL.md and the readthedocs site for everything else. Verify first that your matrix distribution, parallel model and solver interface match what the documentation describes for your platform, and check the CHANGELOG entry for the release you pin before committing to a version.

Frequently asked questions

What licence is HYPRE released under?

HYPRE is distributed under both the MIT licence and the Apache License version 2.0, and users may choose either one. New contributions must be made under both licences.

How do I install HYPRE?

The README points to INSTALL.md in the repository root and to the readthedocs documentation for installation steps, and to the project wiki for build requirements. There is no install command in the README itself.

Can I control HYPRE solvers from Python or Julia?

The README points to hypredrive for flexible runtime control of the solvers, including Python, MATLAB and Julia interfaces.

What is the most recent HYPRE release?

The most recent tag is v3.2.0, published on 2026-08-24, following v3.1.0 on 2026-01-23 and v3.0.0 on 2025-09-26.

Official sources

  1. hypre-space/hypre on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/hypre-space-hypre.svg)](https://hysenlabs.com/projects/hypre-space-hypre)

Was this useful?