[Trilinos-Users] [EXTERNAL] Mikado: Easy access to solvers

Nico Schlömer nico.schloemer at gmail.com
Thu Aug 4 08:14:31 EDT 2016


Thanks Ross for your comments!

You're right, of couse: Mikado actually uses Stratimikos for its Belos
interface. I think at the time I wasn't able to figure out how to use
Amesos2 or MueLu with it, which was one of the motivations for me to write
that wrapper. (And it's thin indeed, just a few hundred lines of code –
exluding tests.)

I've added a YAML reader yesterday, so perhaps that'll satisfy the use case
you're talking about. I never found that terribly interesting because the
run times are so much longer than the compile times for my typical
applications. Whatever, it wasn't too hard to add.

The parameter specification is something I thought would be less verbose
than the TeuchosParameterList. I'm quite happy with it in that it feels
quite natural to type, and also is small in code. The heavy lifting is done
by boost::any (soon to be std::any).

You're also rightfully pointing out that Mikado isn't as powerful as
Stratimikos in some respects. That's alright, too, I guess. Mikado is meant
for "simple" solves with as little interface syntax as possible. No
DefaultLinearSolverBuilder, createLinearSolveStrategy, lowsFactory,
Thyra::MueLuPreconditionerFactory, etc.

That said, if any of these things was to go into Teuchos/Stratimikos, I
certainly wouldn't oppose it.

Cheers,
Nico


On Tue, Aug 2, 2016 at 8:30 PM Bartlett, Roscoe A <rabartl at sandia.gov>
wrote:

> Nico,
>
>
>
> It looks like Mikado is a duplicate of Stratimikos with the following
> differences:
>
>
>
> 1) Mikado uses C++11 features with boost::any to allow simpler
> specification of a Teuchos::ParameterList directly in C++.   It would be be
> fairly easy to take that conversion code and move it into Teuchos (the only
> hard part are the unit tests). But in reality, people should not have to
> recompile their application all the time to change solvers and
> preconditioners.  With Teuchos::ParameterList, you can supply an XML file
> and in the near future, there will be a YAML format supported (which is
> used by MueLu currently I think).
>
>
>
> 2) Mikado is hard-coded to several solvers and preconditioners but does
> not allow for extension.  It does not abide by the Open-Closed Principle
> (OCP).  (Stratimikos allows you to register new linear solvers and
> preconditioners at runtime.)
>
>
>
> 3) Mikado can’t build and install as part of a Trilinos build.  People
> have to build and install Trilinos first and then separately configure,
> build, and install.  After the refactoring TriBITS #63
> <https://github.com/TriBITSPub/TriBITS/issues/63> is complete, then it
> will be fairly easy to build and install a package like Mikado either with
> Trilinos (as an added package) or downstream from Trilinos as its own CMake
> project.  (Actually, you already do that as was demonstrated with the
> XSDKTrilinos package.  It is not that hard to do even now.)
>
>
>
> 4) Mikado his hard-coded to Tpetra.  It can’t accept  Epetra objects as
> well.
>
>
>
> 5) Mikado only supports solving a single linear system.  It does not take
> into account solving a sequence of similar linear systems, solving more
> than one linear systems at the same time that shares the basic structure
> (and perhaps preconditioners), etc.
>
>
>
> I would argue that the identical Mikado interface could just be a thin
> wrapper around Stratimikos::DefaultLinearSolverBuilder and would be a much
> smaller amount of code and would allow for extension of new solvers and
> preconditioners at  runtime.  Would you be willing to discuss that option?
> Actually, now is a good time to discuss this if you are interested.
>
>
>
> Given the listed BSD -3Clause license, I think this type of thing would be
> possible.
>
>
>
> Cheers,
>
>
>
> -Ross
>
>
>
>
>
>
>
>
>
>
>
>
>
> Dr. Roscoe A. Bartlett, PhD
>
> Sandia National Laboratories
>
> Trilinos Software Engineering and Integration Technologies Lead
>
> Consortium for the Advanced Simulation of Light Water Reactors (CASL)
> Physics Integration Infrastructure Lead
>
>
>
> *From:* Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] *On
> Behalf Of *Nico Schlömer
> *Sent:* Tuesday, August 02, 2016 12:27 PM
> *To:* trilinos-users at trilinos.org; Trilinos Developers List
> *Subject:* [EXTERNAL] [Trilinos-Users] Mikado: Easy access to solvers
>
>
>
> Hi everyone,
>
>
>
> I've recently invested some time to make access to (Tpetra) solvers in
> Trilinos easier. Fruit of the labor: Mikado [1]. It has helped me a great
> deal, maybe the same is true for you.
>
>
>
> As usual: Hints and suggestions welcome!
>
>
>
> Cheers,
>
> Nico
>
>
>
> [1] https://github.com/nschloe/mikado
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160804/a74a2b73/attachment.html>


More information about the Trilinos-Users mailing list