Trilinos Software Engineering Technologies and Integration Capabilities
Trilinos Software Engineering Technologies and Integration Capabilities

Outline

Introduction

The Trilinos "Software Engineering Technologies and Integration" capabilities area spans all of Trilinos relating to aspects of scalability, interoperability, integration, and any other critical Trilinos software engineering issue. At the numerical algorithmic level, the Thyra package plays a critical role in defining the standard interfaces to allow the scalable, interoperable, composeable vertical integration of basic linear operators and vectors, preconditioners and linear solvers, nonlinear solvers, bifurcation and stability analysis, transient solvers, optimization, and more. At a more concrete algorithmic level, currently, Epetra provides the defacto standard for element-based numerical algorithm integration. At a lower level, tools in Teuchos package for memory management (e.g. RCP), configuration control (e.g. ParameterList), and other areas also play a critical role in the composition and interoperability of software. Aos included are the various Trilinos "skins" such as PyTrilinos that provide users access to Trilinos capabilities in other programming languages and environments. Finally, principles and practices from the modern Lean & Agile software engineering community are refined and adapted to the numerical computational computing area to support the various missions of Trilinos.

Numerical Algorithm Interoperability and Vertical Integration

One of the major strategic goals for Trilinos is to make all combinations of numerical algorithms in Trilinos interoperable so that any combination that makes sense mathematically will be well supported. To the greatest extent possible, we try to define solver algorithms and the interoperability of numerical objects at as high of an abstract at level as we can. The highest such level is the so-called "Abstract Numerical Algorithm" (ANA) level. More concrete lower-level algorithms and interoperability is currently defined primarily through Epetra objects.

Abstract Numerical Algorithms (ANAs)

An ANA is a numerical algorithm that can be expressed abstractly solely in terms of vectors, vector spaces, linear operators, and other abstractions built on top of these without general direct data access or any general assumptions about data locality.

Perhaps the simplest example of a useful ANA is the linear Conjugate Gradient (CG) method for solving linear systems involving a symmetric positive-definite linear operator which can be stated as:

The linear CG algorithm above shows the essential features of all ANAs in that only the following types of operations are performed:

A few important points about ANAs are worth noting:

The concepts involved with ANAs are independent of Trilinos and of are even independent any particular programming language. In Trilinos, however, that ANA concept is primarily expressed as a set of C++ interfaces in the Trilinos Thyra package.

Thyra (Interoperability and vertical integration of ANAs)

The Thyra package contains a set of interfaces and supporting code that defines basic interoperability mechanisms between different types of abstract numerical algorithm (ANA) software. The foundations for all Thyra interfaces are the mathematical concepts of vectors, vector spaces, and linear operators. All other ANA interfaces and support software are built on these fundamental operator/vector interfaces.

The following document describes the basic ideas behind Thyra and provides an overview of the operator/vector interfaces:

The primary Thyra ANA interfaces are broadly layered as followed:

A few important points about Thyra interfaces are:

For each of these sets of interfaces, the Thyra package also a set of general adapter and general support software. See the Thyra package documentation for more details.

There are several Trilinos packages that implement ANAs, and/or can accept input as ANA object, and/or can provide implementations of ANA objects for other ANAs to use. The primary packages related to Thyra and ANAs are:

Epetra (Interoperability of element-based numerical algorithms)

Currently, Epetra is the defacto standard in Trilinos for element-based numerical algorithm interoperability. Many Trilinos (and external) packages can both accept data through Epetra objects and can provide data as Epetra objects.

Epetra objects or interfaces most directly related to Epetra interoperability are:

NOTE: If a package can accept input through Thyra or provide capability through Thyra then it is preferable to provide only the Thyra adapters and not specific Epetra adapters. Clients should use the Thyra/Epetra adapters can map between Thyra/Epetra objects to satisfy Thyra-based software.

NOTE: We hope in the future to have templated abstract interfaces to replace Epetra as a means to define the interoperability between element-based numerical algorithm objects.

General Software Interoperability and Integration

In addition to numerical algorithm integration issues, there are more fundamental lower-level software interoperability issues that need to be addressed as well. These issues involve memory management, user configuration control, and coordinated output, and they relate every type of C++ software in Trilinos.

A number of these issues are addressed in the following document:

Specifically, some of the critical issues for general software integration and interoperability include:

Memory management

The most fundamental prerequisite for software interoperability is correct and flexible memory management. The Teuchos classes Teuchos::RCP, Teuchos::Ptr, Teuchos::ArrayView, Teuchos::ArrayRCP, Teuchos::Array, Teuchos::Tuple, and Teuchos::Workspace form a complete system of types to safely replace all raw C++ pointers in all higher-level C++ code. Specifically, the reference-counted classes RCP and ArrayRCP provide support for resolving circular references in a very general way (more general that what is provided by similar classes in the boost library in the new C++0x standard).

The following documents provide some more specific information on the use of these classes:

User input and configuration control

Another fundamental issue in software integration and interoperability is in allowing clients to specify configuration parameters in a flexible and general way. The approach adopted must be able to support embedded hierarchical configurations of objects and must be able to fully validate user input.

In Trilinos, the class Teuchos::ParameterList provides the fundamental means to handle and communicate configuration of parameters between different Trilinos (and non-Trilinos) objects. The ParameterList class can accept XML input and can produce XML output and therefore provides a nearly complete solution for configuration control and persistence. The abstract base class Teuchos::ParameterListAcceptor defines a standard protocol for objects to accept configuration parameters and provides basic configuration parameter documentation also through ParameterList objects.

User introspection

Yet another issue to address is how objects interoperate to allow users to introspect the current state and transient behavior of objects in a coordinated and understandable manner. The general issue of user introspection and outputting is addressed with the following Teuchos classes:

Skin packages (wrappers for other languages)

Trilinos provides a set of special "skin" packages that allow users to access Trilinos capabilities in other programming languages or environments.

NOTE: These "skins" do not provide general mechanisms for interoperability between Trilinos packages. That is handled by Thyra and other related code as described below.

General Software Quality and Design

General software design and quality issues are important to any large-scale software effort.

The following document outlines a set of modern C++ coding and Doxygen documentation guidelines for numerical C++ software:

Lean/Agile Software Engineering Principles and Practices

At the foundation of any software development effort is a set of underlying software engineering principles. We firmly believe that the Lean/Agile software engineering movement provides an excellent foundation for the development of high-quality, research-drive computation software. Some of the modern literature on Lean/Agile methods is described here.

The following document describes how various Lean/Agile principles can be applied to the Trilinos development and release practices:

Some of the areas where Lean/Agile methods relate to Trilinos development and release issues include:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends