Quote:
Originally Posted by maherou
(Post 211459)
Use of C++ by Trilinos has never been second-guessed. I have never experienced the problems you mention above. In fact, it is very nice to have language support for OO programming.
|
C++ is certainly the natural choice and I don't blame you for choosing it. I have encountered matrix hierarchy issues when dealing with matrices such as low-rank corrections, Schur complements, and matrices with block tensor-product structure. Some such matrices have various types of incomplete solves or may even be able to provide certain entries (a diagonal, for instance) at modest costs, but certainly can't provide all entries.
A specific example in Trilinos is Epetra_Operator::ApplyInverse(). A user must implement this function, but it doesn't make sense for many matrix types (in principle, the operation exists but it's not affordable) so have to implement it and throw an error. But now, a caller cannot determine if ApplyInverse is implemented without calling it. The same applies for applying a transpose. You can add flags to determine whether the matrix has this operation, but that's working outside the type system and someone is responsible for keeping it consistent. You could split these operations into separate base classes Epetra_InvertableOperator, Epetra_TransposableOperator, multiply inherit from these, and dynamic_cast when you need that operation. This might be the most "OO" operation, but there are reasons everyone doesn't do it.
The choice in Trilinos is to have a small number of matrix interfaces and require the user to provide dummy implementations of all the methods that don't make sense for their specific implementation. If a method is added to the interface, the user's code won't compile even though that method may not make any sense for them. The decision to structure the hierarchy this way is certainly reasonable, but I wouldn't claim that the type system is helping or that it's nicer to work with than a v-table supporting reflection.
Quote:
Originally Posted by maherou
(Post 211459)
Trilinos also has a command line parser, which I agree is convenient to have.
|
Yes, but this is quite different from assigning prefixes to objects so that you can change their type and behavior from the command line without the user having to write code. As an example, consider
Code:
mpirun -n 80 ./app -snes_mf_operator -snes_ksp_ew -pc_type mg -pc_mg_type kaskade -mg_levels_2_pc_type hypre -mg_levels_2_pc_hypre_bj TRUE -mg_levels_2_pc_hypre_type euclid -mg_coarse_pc_redundant_number 10 -mg_coarse_redundant_pc_factor_mat_solver_package mumps
This does Jacobian-free Newton-Krylov with linear tolerances adjusted according to the Eisenstat-Walker heuristic, using a multigrid preconditioner. The preconditioner is using a third-party smoother on level 2 and solving the coarse grid component semi-redundantly (10 groups of 8 processors) using a third-party parallel direct solver. To have these options available takes no user code. My understanding is that the user would have to write a bit of code to support this sort of command-line manipulation using Trilinos. If one is using Stratimikos, can this be done from XML (without the user writing any extra code)? If so, it should be possible to adopt a name-mangling convention and make it available on the command line as well.
Quote:
Originally Posted by maherou
(Post 211459)
Tpetra is for real now. It is intended to be the workhorse for Trilinos starting with the 10.0 release in September. In addition to being able to support all common precisions, it will allow mixed-precision computations and extended precision. This will be very useful in many settings.
|
Excellent, I look forward to checking it out. Will AztecOO still be the workhorse, or is Belos "coming of age"?