1
$\begingroup$

After reading the first answer here about how the best way to find the most performant sparse solver is to try almost everything, I began to wonder if there was any past work on libraries or research for adaptive libraries.

What I mean by an adaptive library is one that implements (or links to) a wide range of iterative and direct solvers, attempting different ones over the course of a simulation to find the best performer automatically. While simple simulations likely wouldn't gain from this sort of system, I am currently working with simulations that involve on the order of a million solves. Even if the first few dozen of my solves were a couple orders of magnitude slower than the rest as it converged to a near optimum solver setup speed-ups of only a few percent over what I would have chosen myself would easily make up for the extra time.

Obviously such a system would require that each matrix being solved would have to share characteristics with previous ones on some level, but this is usually the case in FD, FV, or FE models. So my question is, do such libraries exist, and what are some of the pitfalls an implementation of one may experience with regards to performance?

$\endgroup$
7
$\begingroup$

You shouldn't get the impression from the cited question that there is no theory, such that brute force testing of "all methods" (whatever that means; it's easy to produce infinite sequences of methods that are hard to exclude a priori) is the only viable approach. The problem is that if you don't know enough about your problem to formulate a coherent question, there are very few definitive statements that we can make. Frankly, much of the time that people ask these overly general questions, it is due to a combination of laziness and lack of familiarity with the field. There are also a significant number of cases where the problem changes very rapidly due to changing physics, discretization, materials, domains, etc.

For any given class, we can usually design good solvers, but for non-standard problems, it requires some effort and some experience (as with any skilled trade). In designing a method, we often use an iterative process where we look at convergence and diagnostics obtained by trying a few classes of methods.

As for automatic solver configuration adaptivity, it is much like "auto-tuning", but at a higher level that involves more mathematics. Projects such as SALSA that Jack referenced have not been successful at finding good solvers for problems that were not already well-understood. This is not surprising considering that general-purpose "autotuning" systems tend to only be effective at finding local minima that are eventually shown to be not particularly good. If you inject a lot of domain knowledge, the autotuning system can "fine-tune" some details.

I think it's mostly a waste of time to ask for a black-box iterative solver for a non-standard system. General auto-configuration would be a black box if it yielded good quality results. Instead, I recommend not trying to take a short-cut, understanding the problems and understanding the properties of a few classes of methods, then using that knowledge to design a good solver.

$\endgroup$
  • $\begingroup$ This makes sense. I guess I should have realized that a poorly tuned solver from the "optimal" class for a problem would be indistinguishable from a well tuned solver from a non-optimal class. $\endgroup$ – Godric Seer Sep 12 '12 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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