ScaLAPACK - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

ScaLAPACK

Description:

Introduction to the ACTS Collection. Why/How Do We Use These Tools? Tony Drummond ... The DOE ACTS Collection (http://acts.nersc.gov) 7. Hypre Conceptual Interfaces ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 44
Provided by: csBer
Category:

less

Transcript and Presenter's Notes

Title: ScaLAPACK


1
Introduction to the ACTS Collection Why/How Do We
Use These Tools?
Tony Drummond Computational Research
Division Lawrence Berkeley National
Laboratory University of California, Berkeley -
CS267 April 20, 2006 - Berkeley, California
2
Lesson High Quality Software Reusability
Introduction to The ACTS Collection
Hardware - Middleware - Firmware
3
ACTS Numerical Tools Functionality
4
ACTS Numerical Tools Functionality
5
Structure of PETSc
6
Hypre Conceptual Interfaces
7
Hypre Conceptual Interfaces
INTERFACE TO SOLVERS
List of Solvers and Preconditioners per
Conceptual Interface
8
ACTS Numerical Tools Functionality
9
ACTS Numerical Tools Functionality
10
ACTS Numerical Tools Functionality
11
ACTS Numerical Tools Functionality
12
ACTS Numerical Tools Functionality
13
TAO - Interface with PETSc
14
OPT Interfaces
  • Four major classes of problems available
  • NLF0(ndim, fcn, init_fcn, constraint)
  • Basic nonlinear function, no derivative
    information available
  • NLF1(ndim, fcn, init_fcn, constraint)
  • Nonlinear function, first derivative information
    available
  • FDNLF1(ndim, fcn, init_fcn, constraint)
  • Nonlinear function, first derivative information
    approximated
  • NLF2(ndim, fcn, init_fcn, constraint)
  • Nonlinear function, first and second derivative
    information available

15
ACTS Numerical Tools Functionality
16
ACTS Numerical Tools Functionality
17
ACTS Numerical Tools Functionality
18
ACTS Numerical Tools Functionality
19
User Interfaces
Introduction to The ACTS Collection
Command lines
20
User Interfaces
Introduction to The ACTS Collection
PyACTS
Ax b
matlabP
Star-P
View_field(T1)
User
NetSolve
21
Tool Interoperability Tool-to-Tool
TOOL B
TOOL C
TOOL A
TOOL F
TOOL E
TOOL D
Trilinos
Ex 3
22
Component Technology!
Tool C
Tool A
Tool D
Tool B
ESI
CCA
23
Introduction to PETSc
  • Introducción a PETSC
  • Vectors
  • Matrices
  • PETSc viewers
  • Use of Preconditioners in PETSc
  • Some examples using PETSc

24
What is PETSc?
PETSc Portable Extensible Toolkit for Scientific
Computation
  • Developed at Argonne National Laboratory
  • Library that supports work with PDE
  • Public Domain
  • Portable to a variety of platforms
  • Project started in 1991.
  • Written in C with a fortran interface and OO
    flavor

25
(No Transcript)
26
Nonlinear Solvers
Time Steppers
Newton-based Methods
Other
Euler
Backward Euler
Pseudo Time Stepping
Other
Line Search
Trust Region
Krylov Subspace Methods
Richardson
Chebychev
Other
GMRES
CG
CGS
Bi-CG-STAB
TFQMR
Preconditioners
Additive Schwartz
Block Jacobi
Jacobi
ILU
ICC
LU (Sequential only)
Others
Matrices
Compressed Sparse Row (AIJ)
Blocked Compressed Sparse Row (BAIJ)
Block Diagonal (BDIAG)
Dense
Other
Matrix-free
Distributed Arrays
Index Sets
Indices
Block Indices
Stride
Other
Vectors
27
Vectors Fundamental Objects to store fields,
right-hand side vectors, etc. .
Matrices Fundamental Objects to store operators
(like Jacobians)
28
  • Each process owns a piece of the vector
  • VECTOR Types Sequential, MPI or SHARED
  • VecCreate(MPI_Comm Comm,Vec v)
  • comm - MPI_Comm parallel processes
  • v vector
  • VecSetType(Vec,VecType)
  • Valid Types are
  • VEC_SEQ, VEC_MPI, o VEC_SHARED
  • VecSetSizes(Vec v,int n, int N)
  • Where n or N (not both) can be
  • PETSC_DECIDE
  • VecDestroy(Vec )

29
PETSc - Vector Example (in C)
include petscvec.h int main(int argc,char
argv) Vec x
int n 20,m4, ierr
PetscInitialize(argc,argv)
VecCreate(PETSC_COMM_WORLD,x)
VecSetSizes(x,PETSC_DECIDE,n)
VecSetFromOptions(x) lt-- USER_CODEWork with
PETSc VECTOR --gt PetscFinalize()
return 0
30
(No Transcript)
31
  • Types
  • default sparse AIJ MPIAIJ, SEQAIJ
  • block sparse AIJ (for multi-component PDEs)
    MPIAIJ, SEQAIJ
  • symmetric block sparse AIJ MPISBAIJ, SAEQSBAIJ
  • block diagonal MPIBDIAG, SEQBDIAG
  • dense MPIDENSE, SEQDENSE
  • matrix-free
  • MatCreate(MPI_Comm Comm, Mat A)
  • MPI_Comm - group of process that work on A
  • MatSetSizes(Mat A, PetscInt m, PetscInt n,
    PetscInt M, PetscInt N)
  • MatSetType(Mat,MatType)
  • MatDestroy(Mat)

32
  • Single user interface to matrices (operators)
  • Input values to a PETSc matrix
  • MatSetValues(Mat mat,PetscInt m,const PetscInt
    idxm,PetscInt n,const PetscInt idxn,const
    PetscScalar v,InsertMode addv)
  • Matriz-vector multiplication
  • For instance MatMult(A,y,x) (y?x)
  • Matrix viewing
  • MatView()
  • Multiple underlying implementations
  • AIJ, block AIJ, symmetric block AIJ, block
    diagonal, dense, matrix-free, etc.

33
Block-Row distribution per process
M8,N8,m3,nk1 rstart0,rend4
proc 1
M8,N8,m3,nk2 rstart3,rend6
proc 2
M8,N8,m2,n k3 rstart6,rend8
proc 3
  • The values of k1, k2 y k3 depend on the
    application and must be compatible with vector x
    (Axb)
  • MatGetOwnershipRange(Mat A, int rstart, int
    rend)
  • rstart first global row number that belongs
    to a process
  • rend -1 Last row global number that belongs to
    a process

34
PETSc Matrix Example
  • Included in PETSc Distribution
  • PETSC_DIR/src/mat/tutorial/ex2.c
  • PETSC_DIR/src/mat/tutorial/ex5.c

35
  • Obtain basic information on PETSc viewers
  • Run time options
  • Extract data that can be later use by other
    packages/app. programs.
  • vector fields, matrix contents
  • various formats (ASCII, binary)
  • Visualization
  • simple graphics created with X11 to display
    vector campo, non-zero element structure of a
    matrix, etc.

36
  • MatView(Mat A, PetscViewer v)
  • Runtime options available after matrix assembly
  • -mat_view_info Information related to matrix type
  • -mat_view_draw nonzero pattern
  • -mat_view
  • data in ASCII
  • etc.

37
Examples of Viewers and Matrices
  • Included in PETSc Distribution
  • PETSC_DIR/src/mat/tests/ex2.c
  • Using the -mat_view_info_detailed, etc
  • PETSC_DIR/src/mat/tests/ex3.c
  • Using the -mat-view-draw

38
  • Objective Support the solution of Linear System
    of the form,
  • Axb,
  • Krylov Subspace methods are highly dependent of
    the spectrum of the matrix A. The use of
    preconditioners can speed-up their convergence.

KRYLOV SUBSPACE METHODS PRECONDITIONERS R.
Freund, G. H. Golub, and N. Nachtigal. Iterative
Solution of Linear Systems,pp 57-100. ACTA
Numerica. Cambridge University Press, 1992.
39
  • Axb,

40
Main Routine
PETSc
Linear Solvers (SLES)
Solve Ax b
PC
KSP
Application Initialization
Evaluation of A and b
Post- Processing
PETSc code
User code
41
Krylov Methods (KSP)
Preconditioners (PC)
  • Block Jacobi
  • Overlapping Additive Schwarz
  • ICC, ILU via BlockSolve95
  • ILU(k), LU
  • etc.
  • Conjugate Gradient
  • GMRES
  • CG-Squared
  • Bi-CG-stab
  • Transpose-free QMR
  • Chebychev
  • CGNE
  • Many more (check manual)

42
(No Transcript)
43
Time Stepper Types (TS)
TS_EULER - Euler TS_SUNDIALS- SUNDIALS
interface TS_BEULER - Backward Euler TS_PSEUDO-
Pseudo-timestepping
Write a Comment
User Comments (0)
About PowerShow.com