‹ BackHN Continuity

Thread

Measuring Gauss-Seidel loop-carried dependency and fixing it via loop unrolling

29 points · 22 comments · loiseaujc

  1. sheafification · · focus · HN ↗
    I doubt outside of a few exceptional cases that one is going to do better on CPU-bound problems than a well-written LAPACK implementation built for the architecture you intend to run on.

    Maybe pedagogy was the point? I didn’t really get that from the article, maybe some intention was lost by filtering it through AI.

    1. BigTTYGothGF · · focus · HN ↗
      LAPACK doesn't do sparse systems.

      (On the other hand, I skimmed the article and this might be a banded system, which LAPACK can handle).

      1. sheafification · · focus · HN ↗
        True, 2D Poisson is only approximately banded. Still, I don’t think I’d bother rolling my own sparse solver. It’s a well-trod problem.
        1. loiseaujc · · focus · HN ↗
          Author here. It actually is a block tridiagonal matrix with tridiagonal blocks. The test problem only has a quarter millions of unknowns so, for a production run, I wouldn't bother write my own sparse solver either. Here, it is done mainly for the sake of pedagogy to help students understand the interplay between a mathematical algorithm that looks good on paper and its hardware implementation which is not as promising as one would expect.

          Jacobi and Gauss-Seidel wouldn't be solvers I'd even consider for a real problem. But they are simple enough that anyone with a basic understanding of linear algebra and programming can follow along. But much research requires me to run simulations on thousands (if not hundreds of thousands) of cores, and there, off-the-shelf solver implementations will often not cut it.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.