Amesos Package Browser (Single Doxygen Collection) Development

Amesos_Scalapack: A serial and parallel dense solver. For now, we implement only the unsymmetric ScaLAPACK solver. More...
#include <Amesos_Scalapack.h>
Protected Attributes  
int  iam_ 
int  NumGlobalElements_ 
int  NumGlobalNonzeros_ 
int  nprow_ 
int  npcol_ 
int  ictxt_ 
int  m_per_p_ 
int  DescA_ [10] 
Epetra_Map *  ScaLAPACK1DMap_ 
Epetra_CrsMatrix *  ScaLAPACK1DMatrix_ 
Epetra_Map *  VectorMap_ 
std::vector< double >  DenseA_ 
std::vector< int >  Ipiv_ 
int  NumOurRows_ 
int  NumOurColumns_ 
bool  UseTranspose_ 
const Epetra_LinearProblem *  Problem_ 
double  ConTime_ 
double  SymTime_ 
double  NumTime_ 
double  SolTime_ 
double  VecTime_ 
double  MatTime_ 
bool  TwoD_distribution_ 
int  grid_nb_ 
int  mypcol_ 
int  myprow_ 
Epetra_CrsMatrix *  FatOut_ 
int  nb_ 
int  lda_ 
Epetra_Time *  Time_ 
Private Member Functions  
int  RedistributeA () 
int  ConvertToScalapack () 
int  PerformNumericFactorization () 
Amesos_Scalapack (const Epetra_LinearProblem &LinearProblem)  
Amesos_Scalapack Constructor.  
~Amesos_Scalapack (void)  
Amesos_Scalapack Destructor.  
int  SymbolicFactorization () 
Performs SymbolicFactorization on the matrix A.  
int  NumericFactorization () 
Performs NumericFactorization on the matrix A.  
int  Solve () 
Solves A X = B (or A^{T} X = B)  
const Epetra_LinearProblem *  GetProblem () const 
Get a pointer to the Problem.  
bool  MatrixShapeOK () const 
Returns true if SCALAPACK can handle this matrix shape.  
int  SetUseTranspose (bool UseTranspose) 
SetUseTranpose(true) is more efficient in Amesos_Scalapack.  
bool  UseTranspose () const 
Returns the current UseTranspose setting.  
const Epetra_Comm &  Comm () const 
Returns a pointer to the Epetra_Comm communicator associated with this matrix.  
int  SetParameters (Teuchos::ParameterList &ParameterList) 
Updates internal variables.  
int  NumSymbolicFact () const 
Returns the number of symbolic factorizations performed by this object.  
int  NumNumericFact () const 
Returns the number of numeric factorizations performed by this object.  
int  NumSolve () const 
Returns the number of solves performed by this object.  
void  PrintTiming () const 
Print timing information.  
void  PrintStatus () const 
Print information about the factorization and solution phases.  
void  GetTiming (Teuchos::ParameterList &TimingParameterList) const 
Extracts timing information from the current solver and places it in the parameter list. 
Amesos_Scalapack: A serial and parallel dense solver. For now, we implement only the unsymmetric ScaLAPACK solver.
Amesos_Scalapack, an objectoriented wrapper for LAPACK and ScaLAPACK, will solve a linear systems of equations: A X = B
using Epetra objects and the ScaLAPACK library, where A
is an Epetra_RowMatrix and X
and B
are Epetra_MultiVector objects.
Amesos_Scalapack can be competitive for matrices that are not particularly sparse. ScaLAPACK solves matrices for which the fillin is roughly 10% to 20% of the matrix size in time comparable to that achieve by other Amesos classes. Amesos_Scalapack scales well and hence its performance advantage will be largest when large number of processes are involved.
Amesos_Scalapack uses the ScaLAPACK functions PDGETRF and PDGETRS if more than one process is used. If only one process is used, Amesos_ScaLAPACK uses the LAPACK function PDGETRF and PDGETRS.
AmesosScaLAPACK uses full partial pivoting and will therefore provide answers that are at least as accurate as any direct sparse solver.
AmesosScalapack makes sense under the following circumstances:
There is sufficient memory to store the entrie dense matrix. 8*n^2/p bytes will be required on each process. AND one of the following
The matrix is relatively small and dense. Amesos_Scalapack will solve matrices less than 100 by 100 faster than other Amesos classes unless the matrices are very sparse.
The matrix is relatively dense and many processes are available. If a thousand processes are available, Amesos_Scalapack should be competetive with other sparse direct solvers even for matrices whose L and U factors contain only 5% nonzeros.
The matrix is quite dense. Amesos_Scalapack will be well on any matrix whose L and U factors contain 20% or more nonzeros.
Execution time is less important than robustness. Amesos_Scalapack is among the most robust parallel direct solvers.
Amesos_Scalapack supports the following parameters which are common to across multiple Amesos solvers:
Amesos_Scalapack supports the following parameters specific to Amesos_Scalapack.
Teuchos::ParameterList ScalapackParams = ParameterList.sublist("Scalapack") ;
None of the following limitations would be particularly difficult to remove.
The present implementation limits the number of right hand sides to the number of rows assigned to each process. i.e. nrhs < n/p.
The present implementation does not take advantage of symmetric or symmetric positive definite matrices, although ScaLAPACK has separate routines to take advantages of such matrices.
Definition at line 146 of file Amesos_Scalapack.h.
Amesos_Scalapack::Amesos_Scalapack  (  const Epetra_LinearProblem &  LinearProblem  ) 
Amesos_Scalapack Constructor.
Creates an Amesos_Scalapack instance, using an Epetra_LinearProblem, passing in an alreadydefined Epetra_LinearProblem object.
Note: The operator in LinearProblem must be an Epetra_RowMatrix.
Definition at line 50 of file Amesos_Scalapack.cpp.
Amesos_Scalapack::~Amesos_Scalapack  (  void  ) 
Amesos_Scalapack Destructor.
Completely deletes an Amesos_Scalapack object.
Definition at line 71 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::SymbolicFactorization  (  )  [virtual] 
Performs SymbolicFactorization on the matrix A.
There is no symbolic factorization phase in ScaLAPACK, as it operates only on dense matrices. Hence, Amesos_Scalapack::SymbolicFactorization() takes no action.
Implements Amesos_BaseSolver.
Definition at line 778 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::NumericFactorization  (  )  [virtual] 
Performs NumericFactorization on the matrix A.
In addition to performing numeric factorization on the matrix A, the call to NumericFactorization() implies that no change will be made to the underlying matrix without a subsequent call to NumericFactorization().
preconditions:
postconditions:
Implements Amesos_BaseSolver.
Definition at line 789 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::Solve  (  void  )  [virtual] 
Solves A X = B (or A^{T} X = B)
preconditions:
postconditions:
Implements Amesos_BaseSolver.
Definition at line 810 of file Amesos_Scalapack.cpp.
const Epetra_LinearProblem* Amesos_Scalapack::GetProblem  (  )  const [inline, virtual] 
Get a pointer to the Problem.
Implements Amesos_BaseSolver.
Definition at line 246 of file Amesos_Scalapack.h.
bool Amesos_Scalapack::MatrixShapeOK  (  )  const [virtual] 
Returns true if SCALAPACK can handle this matrix shape.
Returns true if the matrix shape is one that SCALAPACK can handle. SCALAPACK only works with square matrices.
Implements Amesos_BaseSolver.
Definition at line 769 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::SetUseTranspose  (  bool  UseTranspose  )  [inline, virtual] 
SetUseTranpose(true) is more efficient in Amesos_Scalapack.
Implements Amesos_BaseSolver.
Definition at line 267 of file Amesos_Scalapack.h.
bool Amesos_Scalapack::UseTranspose  (  )  const [inline, virtual] 
Returns the current UseTranspose setting.
Implements Amesos_BaseSolver.
Definition at line 270 of file Amesos_Scalapack.h.
const Epetra_Comm& Amesos_Scalapack::Comm  (  )  const [inline, virtual] 
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
Implements Amesos_BaseSolver.
Definition at line 273 of file Amesos_Scalapack.h.
int Amesos_Scalapack::SetParameters  (  Teuchos::ParameterList &  ParameterList  )  [virtual] 
Updates internal variables.
<br >Preconditions:
<br >Postconditions:
Implements Amesos_BaseSolver.
Definition at line 657 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::NumSymbolicFact  (  )  const [inline, virtual] 
Returns the number of symbolic factorizations performed by this object.
Implements Amesos_BaseSolver.
Definition at line 295 of file Amesos_Scalapack.h.
int Amesos_Scalapack::NumNumericFact  (  )  const [inline, virtual] 
Returns the number of numeric factorizations performed by this object.
Implements Amesos_BaseSolver.
Definition at line 298 of file Amesos_Scalapack.h.
int Amesos_Scalapack::NumSolve  (  )  const [inline, virtual] 
Returns the number of solves performed by this object.
Implements Amesos_BaseSolver.
Definition at line 301 of file Amesos_Scalapack.h.
void Amesos_Scalapack::PrintTiming  (  )  const [virtual] 
Print timing information.
Implements Amesos_BaseSolver.
Definition at line 1015 of file Amesos_Scalapack.cpp.
void Amesos_Scalapack::PrintStatus  (  )  const [virtual] 
Print information about the factorization and solution phases.
Implements Amesos_BaseSolver.
Definition at line 994 of file Amesos_Scalapack.cpp.
void Amesos_Scalapack::GetTiming  (  Teuchos::ParameterList &  TimingParameterList  )  const [inline, virtual] 
Extracts timing information from the current solver and places it in the parameter list.
Reimplemented from Amesos_BaseSolver.
Definition at line 310 of file Amesos_Scalapack.h.
int Amesos_Scalapack::RedistributeA  (  )  [private] 
Definition at line 124 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::ConvertToScalapack  (  )  [private] 
Definition at line 510 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::PerformNumericFactorization  (  )  [private] 
Definition at line 694 of file Amesos_Scalapack.cpp.
int Amesos_Scalapack::iam_ [protected] 
Definition at line 355 of file Amesos_Scalapack.h.
int Amesos_Scalapack::NumGlobalElements_ [protected] 
Definition at line 357 of file Amesos_Scalapack.h.
int Amesos_Scalapack::NumGlobalNonzeros_ [protected] 
Definition at line 358 of file Amesos_Scalapack.h.
int Amesos_Scalapack::nprow_ [protected] 
Definition at line 363 of file Amesos_Scalapack.h.
int Amesos_Scalapack::npcol_ [protected] 
Definition at line 364 of file Amesos_Scalapack.h.
int Amesos_Scalapack::ictxt_ [protected] 
Definition at line 365 of file Amesos_Scalapack.h.
int Amesos_Scalapack::m_per_p_ [protected] 
Definition at line 366 of file Amesos_Scalapack.h.
int Amesos_Scalapack::DescA_[10] [protected] 
Definition at line 367 of file Amesos_Scalapack.h.
Epetra_Map* Amesos_Scalapack::ScaLAPACK1DMap_ [protected] 
Definition at line 369 of file Amesos_Scalapack.h.
Epetra_CrsMatrix* Amesos_Scalapack::ScaLAPACK1DMatrix_ [protected] 
Definition at line 371 of file Amesos_Scalapack.h.
Epetra_Map* Amesos_Scalapack::VectorMap_ [protected] 
Definition at line 373 of file Amesos_Scalapack.h.
std::vector<double> Amesos_Scalapack::DenseA_ [protected] 
Definition at line 374 of file Amesos_Scalapack.h.
std::vector<int> Amesos_Scalapack::Ipiv_ [protected] 
Definition at line 375 of file Amesos_Scalapack.h.
int Amesos_Scalapack::NumOurRows_ [protected] 
Definition at line 376 of file Amesos_Scalapack.h.
int Amesos_Scalapack::NumOurColumns_ [protected] 
Definition at line 377 of file Amesos_Scalapack.h.
bool Amesos_Scalapack::UseTranspose_ [protected] 
Definition at line 380 of file Amesos_Scalapack.h.
const Epetra_LinearProblem* Amesos_Scalapack::Problem_ [protected] 
Definition at line 381 of file Amesos_Scalapack.h.
double Amesos_Scalapack::ConTime_ [protected] 
Definition at line 385 of file Amesos_Scalapack.h.
double Amesos_Scalapack::SymTime_ [protected] 
Definition at line 386 of file Amesos_Scalapack.h.
double Amesos_Scalapack::NumTime_ [protected] 
Definition at line 387 of file Amesos_Scalapack.h.
double Amesos_Scalapack::SolTime_ [protected] 
Definition at line 388 of file Amesos_Scalapack.h.
double Amesos_Scalapack::VecTime_ [protected] 
Definition at line 389 of file Amesos_Scalapack.h.
double Amesos_Scalapack::MatTime_ [protected] 
Definition at line 390 of file Amesos_Scalapack.h.
bool Amesos_Scalapack::TwoD_distribution_ [protected] 
Definition at line 395 of file Amesos_Scalapack.h.
int Amesos_Scalapack::grid_nb_ [protected] 
Definition at line 396 of file Amesos_Scalapack.h.
int Amesos_Scalapack::mypcol_ [protected] 
Definition at line 397 of file Amesos_Scalapack.h.
int Amesos_Scalapack::myprow_ [protected] 
Definition at line 398 of file Amesos_Scalapack.h.
Epetra_CrsMatrix* Amesos_Scalapack::FatOut_ [protected] 
Definition at line 399 of file Amesos_Scalapack.h.
int Amesos_Scalapack::nb_ [protected] 
Definition at line 404 of file Amesos_Scalapack.h.
int Amesos_Scalapack::lda_ [protected] 
Definition at line 405 of file Amesos_Scalapack.h.
Epetra_Time* Amesos_Scalapack::Time_ [protected] 
Definition at line 407 of file Amesos_Scalapack.h.