25
$\begingroup$

There are a number of different libraries out there that solve a sparse linear system of equations, however I'm finding it difficult to figure out what the differences are.

As far as I can tell there are three major packages: Trilinos, PETSc, and Intel MKL. They can all do sparse matrix solves, they are all fast (as far as I can tell, I haven't been able to find solid benchmarks on any of them), and they are all parallelizable. What I can't find is the differences.

So, what are the differences between the different sparse linear system solvers out there?

$\endgroup$

2 Answers 2

31
$\begingroup$

There are many more out there, all with different goals and views of the problems. It really depends on what you are trying to solve. Here is an incomplete list of packages out there. Feel free to add more details.

Large Distributed Iterative Solver Packages

  • PETSc — packages focused around Krylov subspace methods and easy switching between linear solvers. Much lighter weight than others in this category.
  • Trilinos — a large set of packages aimed at FEM applications
  • Hypre — similar to the two above. Notable because of its very good multigrid solvers (which can be downloaded by PETSc).

Parallel Direct Solver Packages

Serial Direct Solver Packages

Interactive Environments (more for very small systems)

Other Lists

$\endgroup$
1
  • $\begingroup$ There is the PARDISO solver as well, which is very efficient. Intel MKL bought an older version of PARDISO. The newer version is much more efficient. The only issue is the licensing scheme... $\endgroup$
    – Breno
    Sep 23, 2022 at 22:44
9
$\begingroup$

MKL does not do distributed parallelism (e.g. MPI), and the support for sparse solvers is rudimentary, definitely not at the level of the other two. Currently, there is only one meaningful benchmark: scalable performance of Sparse Matrix-Vector product (SpMV). Since this is memory bandwidth limited, you can only screw it up. Both PETSc and Trilinos do fine on this.

The real difference is which programming environment makes you more productive.

$\endgroup$
7
  • $\begingroup$ So it pretty much boils down to if you want to be doing work in C or C++? $\endgroup$ Nov 30, 2011 at 18:04
  • $\begingroup$ It's a little more open-ended than that. You could certainly call Trilinos or PETSc from most of the numerical computing languages (C, Python, C++, and Fortran are all viable options, and to some extent, MATLAB). $\endgroup$ Nov 30, 2011 at 18:16
  • $\begingroup$ PETSc does the F90 array handling correctly :), and the entire object model is available in Matlab. $\endgroup$ Nov 30, 2011 at 18:24
  • 1
    $\begingroup$ PETSc and Trilinos also engage different communities, to some extent. Perhaps you should consider first the sort of problems you would like to solve, and if any existing examples of similar problems are already available in either toolkit? $\endgroup$ Nov 30, 2011 at 19:44
  • 1
    $\begingroup$ I would recommend looking at the examples of the different projects then deciding. If you have a specific example of which system would be better for a problem, that would be a more answerable question. Otherwise, we will only start the religious war that carried through my graduate career. $\endgroup$
    – aterrel
    Nov 30, 2011 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.