0

I need to solve a linear equation Ax = b with A a pentadiagonal matrix (lots of 0) whose dimension is very big (until n = 1000 billion).

I'm currently using the UMFPACK package from Suitesparse in C (umfpack_di_solve(...)). I have been asked to verify my result with another one.

Here is my problem: I need to make it work in C (or C++), but I'm under Windows 10. I use WSL-2 with CLion, from which I compile my codes with a Ubuntu terminal.

I'm facing lots of problems, especially with cmake.

What solver would you recommend ?

1
  • Verifying the result of solving a linear equation is normally quite simple: You just apply your linear operator to the solution and compare with the right hand side, i.e. compute the residual.
    – paleonix
    Dec 23, 2022 at 19:08

1 Answer 1

2

As you are using a banded matrix (instead of a general sparse matrix), you could use LAPACK for reference. While it is a Fortran library, there are multiple C (LAPACKE, i.e. install liblapacke64-dev with apt) or C++ (lapackpp, not available through apt) interfaces available.

The main downside I am seeing is that the LAPACK banded matrix format is different from UMFPACK's CSC format, i.e. you will have to convert your matrix from one format into another.

The upside is that there is an explicit 64-bit-indexed version which is needed for your problem size. Most sparse solvers that are not built for distributed MPI computing only support 32-bit-indexing.

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.