PyTrilinos::Amesos::Scalapack Class Reference

Inheritance diagram for PyTrilinos::Amesos::Scalapack:

Inheritance graph
[legend]
Collaboration diagram for PyTrilinos::Amesos::Scalapack:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def SymbolicFactorization
def NumericFactorization
def Solve
def GetProblem
def MatrixShapeOK
def SetUseTranspose
def UseTranspose
def Comm
def SetParameters
def NumSymbolicFact
def NumNumericFact
def NumSolve
def PrintTiming
def PrintStatus
def GetTiming
def __init__
def SymbolicFactorization
def NumericFactorization
def Solve
def GetProblem
def MatrixShapeOK
def SetUseTranspose
def UseTranspose
def Comm
def SetParameters
def NumSymbolicFact
def NumNumericFact
def NumSolve
def PrintTiming
def PrintStatus
def GetTiming

Public Attributes

 this


Detailed Description

Amesos_Scalapack: A serial and parallel dense solver. For now, we
implement only the unsymmetric ScaLAPACK solver.

Amesos_Scalapack, an object-oriented 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 fill-in
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% non-zeros.

The matrix is quite dense. Amesos_Scalapack will be well on any matrix
whose L and U factors contain 20% or more non-zeros.

Execution time is less important than robustness. Amesos_Scalapack is
among the most robust parallel direct solvers.

Common control parameters :

Amesos_Scalapack supports the following parameters which are common to
across multiple Amesos solvers: ParamList.set("MaxProcs", int
MaximumProcessesToUse ); By default, this is set to -1, which causes
Amesos_Scalapack to use a heuristic to determine how many processes to
use. If set to a postive value, MaximumProcessesToUse,
Amesos_Scalapack will use MaximumProcessesToUse provided that there
are that many processes available. Testing should be performed with
MaximumProcessesToUse set to some value larger than one to force
parallel execution.

ParamList.set("PrintTiming", bool );

ParamList.set("PrintStatus", bool );

ParamList.set("ComputeVectorNorms", bool );

ParamList.set("ComputeTrueResidual", bool );

ParamList.set("OutputLevel", int );

ParamList.set("DebugLevel", int );

ParamList.set("ComputeTrueResidual", bool );  Amesos_Scalapack
supports the following parameters specific to Amesos_Scalapack.
Teuchos::ParameterList ScalapackParams =
ParameterList.sublist("Scalapack") ; ScalapackParams.set("2D
distribution", bool ); By default this is set "true". In general,
because a two dimensional data distribution generally produces faster
results. However, in some cases, a one dimensional data distribution
may provide faster execution time. The code for the one dimensional
data distribution uses a different data redistribution algorithm and
uses the transpose of the matrix internally (all of which is
transparent to the user).

ScalapackParams.set("grid_nb", bool ); By default this is set to 32.
On some machines, it may be possible to improve performance by up to
10% by changing the value of grid_nb. (16,24,48,64 or 128) are
reasonable values to try. For testing on small matrices, small values
of grid_nb will (if "MaxProcs" is set to a value greater than 1)
force the code to execute in parallel. Limitations:

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.

C++ includes: Amesos_Scalapack.h 

Member Function Documentation

def PyTrilinos::Amesos::Scalapack::__init__ (   self,
  args 
)

__init__(self, LinearProblem LinearProblem) -> Scalapack

Amesos_Scalapack::Amesos_Scalapack(const Epetra_LinearProblem
&LinearProblem)

Amesos_Scalapack Constructor.

Creates an Amesos_Scalapack instance, using an Epetra_LinearProblem,
passing in an already- defined Epetra_LinearProblem object.

Note: The operator in LinearProblem must be an Epetra_RowMatrix. 

def PyTrilinos::Amesos::Scalapack::__init__ (   self,
  args 
)

__init__(self, LinearProblem LinearProblem) -> Scalapack

Amesos_Scalapack::Amesos_Scalapack(const Epetra_LinearProblem
&LinearProblem)

Amesos_Scalapack Constructor.

Creates an Amesos_Scalapack instance, using an Epetra_LinearProblem,
passing in an already- defined Epetra_LinearProblem object.

Note: The operator in LinearProblem must be an Epetra_RowMatrix. 

def PyTrilinos::Amesos::Scalapack::Comm (   self,
  args 
)

Comm(self) -> Comm

const Epetra_Comm&
Amesos_Scalapack::Comm() const

Returns a pointer to the Epetra_Comm communicator associated with this
matrix. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::Comm (   self,
  args 
)

Comm(self) -> Comm

const Epetra_Comm&
Amesos_Scalapack::Comm() const

Returns a pointer to the Epetra_Comm communicator associated with this
matrix. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::GetProblem (   self,
  args 
)

GetProblem(self) -> LinearProblem

const
Epetra_LinearProblem* Amesos_Scalapack::GetProblem() const

Get a pointer to the Problem. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::GetProblem (   self,
  args 
)

GetProblem(self) -> LinearProblem

const
Epetra_LinearProblem* Amesos_Scalapack::GetProblem() const

Get a pointer to the Problem. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::GetTiming (   self,
  args 
)

GetTiming(self, ParameterList TimingParameterList)

void
Amesos_Scalapack::GetTiming(Teuchos::ParameterList
&TimingParameterList) const

Extracts timing information from the current solver and places it in
the parameter list. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::GetTiming (   self,
  args 
)

GetTiming(self, ParameterList TimingParameterList)

void
Amesos_Scalapack::GetTiming(Teuchos::ParameterList
&TimingParameterList) const

Extracts timing information from the current solver and places it in
the parameter list. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::MatrixShapeOK (   self,
  args 
)

MatrixShapeOK(self) -> bool

bool
Amesos_Scalapack::MatrixShapeOK() const

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. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::MatrixShapeOK (   self,
  args 
)

MatrixShapeOK(self) -> bool

bool
Amesos_Scalapack::MatrixShapeOK() const

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. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumericFactorization (   self,
  args 
)

NumericFactorization(self) -> int

int
Amesos_Scalapack::NumericFactorization()

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:  GetProblem().GetOperator() != 0 (return -1)

MatrixShapeOk( GetProblem().GetOperator()) == true (return -6) NOT
IMPLEMENTED

The non-zero structure of the matrix should not have changed since the
last call to SymbolicFactorization(). Irrelevant for Amesos_Scalapack.

The distribution of the matrix should not have changed since the last
call to SymbolicFactorization(). Irrelevant for Amesos_Scalapack.

postconditions: nprow_, npcol_, DescA_

DenseA will be factored

Ipiv_ contains the pivots

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumericFactorization (   self,
  args 
)

NumericFactorization(self) -> int

int
Amesos_Scalapack::NumericFactorization()

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:  GetProblem().GetOperator() != 0 (return -1)

MatrixShapeOk( GetProblem().GetOperator()) == true (return -6) NOT
IMPLEMENTED

The non-zero structure of the matrix should not have changed since the
last call to SymbolicFactorization(). Irrelevant for Amesos_Scalapack.

The distribution of the matrix should not have changed since the last
call to SymbolicFactorization(). Irrelevant for Amesos_Scalapack.

postconditions: nprow_, npcol_, DescA_

DenseA will be factored

Ipiv_ contains the pivots

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumNumericFact (   self,
  args 
)

NumNumericFact(self) -> int

int
Amesos_Scalapack::NumNumericFact() const

Returns the number of numeric factorizations performed by this object.

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumNumericFact (   self,
  args 
)

NumNumericFact(self) -> int

int
Amesos_Scalapack::NumNumericFact() const

Returns the number of numeric factorizations performed by this object.

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumSolve (   self,
  args 
)

NumSolve(self) -> int

int
Amesos_Scalapack::NumSolve() const

Returns the number of solves performed by this object. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumSolve (   self,
  args 
)

NumSolve(self) -> int

int
Amesos_Scalapack::NumSolve() const

Returns the number of solves performed by this object. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumSymbolicFact (   self,
  args 
)

NumSymbolicFact(self) -> int

int
Amesos_Scalapack::NumSymbolicFact() const

Returns the number of symbolic factorizations performed by this
object. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::NumSymbolicFact (   self,
  args 
)

NumSymbolicFact(self) -> int

int
Amesos_Scalapack::NumSymbolicFact() const

Returns the number of symbolic factorizations performed by this
object. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::PrintStatus (   self,
  args 
)

PrintStatus(self)

void
Amesos_Scalapack::PrintStatus() const

Print information about the factorization and solution phases. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::PrintStatus (   self,
  args 
)

PrintStatus(self)

void
Amesos_Scalapack::PrintStatus() const

Print information about the factorization and solution phases. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::PrintTiming (   self,
  args 
)

PrintTiming(self)

void
Amesos_Scalapack::PrintTiming() const

Print timing information. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::PrintTiming (   self,
  args 
)

PrintTiming(self)

void
Amesos_Scalapack::PrintTiming() const

Print timing information. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::SetParameters (   self,
  args 
)

SetParameters(self, ParameterList ParameterList) -> int

int
Amesos_Scalapack::SetParameters(Teuchos::ParameterList &ParameterList)

Updates internal variables.

<br >Preconditions: None.

<br >Postconditions: Internal variables controlling the factorization
and solve will be updated and take effect on all subsequent calls to
NumericFactorization() and Solve().

All parameters whose value are to differ from the default values must
be included in ParameterList. Parameters not specified in
ParameterList revert to their default values.

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::SetParameters (   self,
  args 
)

SetParameters(self, ParameterList ParameterList) -> int

int
Amesos_Scalapack::SetParameters(Teuchos::ParameterList &ParameterList)

Updates internal variables.

<br >Preconditions: None.

<br >Postconditions: Internal variables controlling the factorization
and solve will be updated and take effect on all subsequent calls to
NumericFactorization() and Solve().

All parameters whose value are to differ from the default values must
be included in ParameterList. Parameters not specified in
ParameterList revert to their default values.

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::SetUseTranspose (   self,
  args 
)

SetUseTranspose(self, bool UseTranspose) -> int

int
Amesos_Scalapack::SetUseTranspose(bool UseTranspose)

SetUseTranpose(true) is more efficient in Amesos_Scalapack.

If SetUseTranspose() is set to true,

AT X = B is computed

else

A X = B is computed 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::SetUseTranspose (   self,
  args 
)

SetUseTranspose(self, bool UseTranspose) -> int

int
Amesos_Scalapack::SetUseTranspose(bool UseTranspose)

SetUseTranpose(true) is more efficient in Amesos_Scalapack.

If SetUseTranspose() is set to true,

AT X = B is computed

else

A X = B is computed 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::Solve (   self,
  args 
)

Solve(self) -> int

int
Amesos_Scalapack::Solve()

Solves A X = B (or AT X = B).

preconditions:  GetProblem().GetOperator() != 0 (return -1)

MatrixShapeOk( GetProblem().GetOperator()) == true (return -6) NOT
IMPLEMENTED

X and B must have the same shape (NOT CHECKED)

X and B must have fewer than nb right hand sides. EPETRA_CHK_ERR(-2)

GetProblem()->CheckInput (see Epetra_LinearProblem::CheckInput() for
return values)

The matrix should not have changed since the last call to
NumericFactorization().

postconditions: X will be set such that A X = B (or AT X = B), within
the limits of the accuracy of the the Scalapack solver.

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::Solve (   self,
  args 
)

Solve(self) -> int

int
Amesos_Scalapack::Solve()

Solves A X = B (or AT X = B).

preconditions:  GetProblem().GetOperator() != 0 (return -1)

MatrixShapeOk( GetProblem().GetOperator()) == true (return -6) NOT
IMPLEMENTED

X and B must have the same shape (NOT CHECKED)

X and B must have fewer than nb right hand sides. EPETRA_CHK_ERR(-2)

GetProblem()->CheckInput (see Epetra_LinearProblem::CheckInput() for
return values)

The matrix should not have changed since the last call to
NumericFactorization().

postconditions: X will be set such that A X = B (or AT X = B), within
the limits of the accuracy of the the Scalapack solver.

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::SymbolicFactorization (   self,
  args 
)

SymbolicFactorization(self) -> int

int
Amesos_Scalapack::SymbolicFactorization()

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.

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::SymbolicFactorization (   self,
  args 
)

SymbolicFactorization(self) -> int

int
Amesos_Scalapack::SymbolicFactorization()

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.

Integer error code, set to 0 if successful. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::UseTranspose (   self,
  args 
)

UseTranspose(self) -> bool

bool
Amesos_Scalapack::UseTranspose() const

Returns the current UseTranspose setting. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.

def PyTrilinos::Amesos::Scalapack::UseTranspose (   self,
  args 
)

UseTranspose(self) -> bool

bool
Amesos_Scalapack::UseTranspose() const

Returns the current UseTranspose setting. 

Reimplemented from PyTrilinos::Amesos::BaseSolver.


The documentation for this class was generated from the following files:

Generated on Thu Dec 17 11:00:19 2009 for PyTrilinos by  doxygen 1.5.9