The main page of the Doxygen documentation is organized as follows:
Amesos_Lapack- Interface to LAPACK's DGETRF. Amesos_Lapack is the only dense solver supported by Amesos.
Amesos_Klu- Interface to Tim Davis serial solver KLU (distributed within Amesos).
Amesos_Umfpack- Interface to Tim Davis's UMFPACK (version 4.3 or later)
Amesos_Superlu- Interface to Xiaoye Li's SuperLU serial memory code with serial input interface.
Amesos_Superludist- Interface to Xiaoye Li's SuperLU Distributed memory code with serial input interface (version 2.0 or later).
Amesos_Dscpack- Interface to Padma Raghavan's DSCPACK
Amesos_Mumps- Interface to CERFACS' MUMPS (version 4.3.1 or later)
We refer to the Sandia report SAND-2004-2188 for a detailed overview of Amesos. A PDF version of this report can be found the
Most of these third party codes are intended to be made available at no cost to users. Much of the copyright and licensing restrictions concern rights to modify, redistribute the code and generally include a request that credit be given in any papers which make use of their code. Please refer to the web page for the package that you are interested in for details.
|Package is written in||FORTRAN77||C||C||C||C||FORTRAN90||C|
|Processes used for Factorization/Solve||Process 0||Process 0||Process 0||Process 0||Any||Any (*)||Any (**)|
|Distributed input matrix||Yes||Yes||Yes||Yes||Yes||Yes||Yes|
(*) MUMPS required FORTRAN communicators. Some architectures (e.g., SGI) does not allow portable conversions from C/C++ communicator and FORTRAN. On these architectures, therefore,
MPI_COMM_WORLD will be used by MUMPS. Instead, if C/C++ communicators can be converted to FORTRAN ones, then any number of prosesses can be used by Amesos_Mumps.
(**) DSCPACK requires a number of processes that is a power of 2.
Amesos is distributed through the Trilinos project, and can be downloaded from the web site http://software.sandia.gov/trilinos/packages/amesos.
As all other Trilinos packages, Amesos is configured and built using the GNU autoconf and automake tools. To configure Amesos from the Trilinos top directory, a possible procedure is as follows. Let
TRILINOS_HOME be a shell variable representing the location of the Trilinos source directory, and the shell prompt sign. Let us suppose that we want to configure Amesos on a LINUX machine with MPI, with support for KLU and UMFPACK. Header files for UMFPACK are located in directory
/usr/local/umfpack/include, while the library, called
libumfpack.a is located in
/usr/local/umfpack/lib. The configure like will look like:
% cd $TRILINOS_HOME % mkdir LINUX_MPI % cd LINUX_MPI % ../configure \ --with-mpi-compilers \ --prefix=$TRILINOS_HOME/LINUX_MPI \ --enable-amesos \ --enable-amesos-klu \ --enable-amesos-umfpack \ --with-incdirs="-I/usr/local/umfpack/include" \ --with-ldflags="-L/usr/local/umfpack/lib" \ --with-libs="-lumfpack" % make % make install
Other flags may be required depending on the location of MPI, BLAS and LAPACK. The table below reports the architectures and compilers tested with Amesos.
|LINUX (GNU), SERIAL||yes||yes||yes||yes||yes||no||yes|
|LINUX (Intel), MPI||yes||yes||yes||no||no||yes||no|
|LINUX (GNU), MPI||yes||yes||yes||yes||yes||no||yes|
|SGI 64, MPI||yes||yes||yes||no||no||yes||no|
|MAC OSX, SERIAL||no||yes||yes||no||no||no||no|
|Sandia Cplant, MPI||no||yes||yes||yes||yes||no||no|
|Sandia ASCI Red, MPI||no||yes||yes||yes||yes||no||no |
Once Amesos has been compiled, it can be tested using the test harness. A quick test (using MPI) can be as follows:
% cd amesos/test/Test_Basic % make % ./TestBasic.csh LAPACK % ./TestBasic.csh KLU % ./TestBasic.csh <other-solvers>
where <other-solvers> can be: SUPERLU, SUPERLUDIST, MUMPS, DSCPACK. The tests exercise some of the Amesos features. Other tests are available for more intensive analysis.
#include "Amesos.h" #include "Amesos_BaseSolver.h"
Note that these header files will not include the header files for the supported libraries (which are of course needed to compile the Amesos library itself). Now, let define the linear system matrix, the vector that will contain the solution, and the right-hand side as:
Epetra_LinearProblem Problem; Epetra_RowMatrix* A; // linear system matrix Epetra_MultiVector* LHS; // vector that will contain the solution Epetra_MultiVector* RHS; // right-hand side
All Amesos object (derived from pure virtual class Amesos_BaseSolver) can be created using the function class
Amesos, as follows:
Amesos_BaseSolver * Solver; Amesos Factory; char* SolverType = "Amesos_Klu"; Solver = Factory.Create(SolverType, *Problem);
Factory object will create an Amesos_Klu object (if Amesos has been configure to support this solver).
Factory.Create() returns 0 if the requested solver is not available. Parameter names are case-sensitive; misspelled parameters will not be recognized. Method
Factory.Query() can be used to query the factory about the availability of a given solver:
char* SolverType = "Amesos_Klu"; bool IsAvailable = Factory.Query(SolverType);
Here, we simply recall that the parameters list can be created as
and parameters can be set as
ParameterName is a string containing the parameter name, and
ParameterValue is any valid C++ object that specifies the parameter value (for instance, an integer, a pointer to an array or to an object). Please consult the Amesos Reference Guide for more details. The Doxygen documentation of each class can also be of help.
Problem is still empty. After setting the pointer to the linear system matrix, we can perform the symbolic factorization of the linear system matrix:
AMESOS_CHK_ERR is a macro, that checks the return error and, if not null, prints out a message and returns.) This phase does not require the numerical values of
A, that can therefore be changed after the call to
SymbolicFactorization(). However, the nonzero pattern of
A cannot be changed.
The numeric factorization is performed by
The values of
RHS must be set before solving the linear system, which simply reads
Should the user need to re-factorize the matrix, he or she must call
NumericFactorization(). If the structure of the matrix is changed, he or she must call
SymbolicFactorization(). However, it is supposed that the linear system matrix and the solution and right-hand side vectors are still defined with the same
Please consult the examples reported in the amesos/example subdirectory:
You may encounter problems while trying to use the SuperLU/SuperLU_DIST classes with KLU enables. This is due to a conflict in the colamd algorithm. The version of colamd which is distributed within Amesos is not compatible with the version distributed with SuperLU. This cause the code to crash. You might need to disable KLU to use SuperLU/SuperLU_DIST.
DSCPACK does not support Epetra_RowMatrix's and Epetra_VbrMatrix. DSCPACK has memory leaks. A fix is under development for both of these issues.
Amesos has an incomplete interface to ScaLAPACK under development.
This page last updated 04-Nov-2004.