Introduction NEMO main features Examples A Fortran 95 object-oriented parallel code for the numerical solution of PDEs NEMO (Numerical Engine for Multiphysics Operators) Marco Rorro e-mail:[email protected]CASPUR Inter-Univ. Computing Consortium Seminario di Modellistica differenziale numerica Rome, October 27, 2009 Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
41
Embed
A Fortran 95 object-oriented parallel code for the ...Introduction NEMO main features Examples A Fortran 95 object-oriented parallel code for the numerical solution of PDEs NEMO (Numerical
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
IntroductionNEMO main features
Examples
A Fortran 95 object-orientedparallel code for the
numerical solution of PDEsNEMO (Numerical Engine for Multiphysics Operators)
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Main references
S. Toninel, Development of a New Parallel Code for ComputationalContinuum Mechanics Using Object-Oriented Techniques, PhD Thesis,Universitá di Bologna, 2006.(http://www.ce.uniroma2.it/nemo/toninel_phd.pdf)
J.H. Ferziger and M. Peric, Computational Methods for Fluid Dynamics,Third ed. Springer, 2002.
S. Filippone and A. Buttari, PSBLAS-2.0 User’s Guide. A ReferenceGuide for Parallel Sparse BLAS library, 2006.
S. V. Patankar, Numerical Heat Transfer and Fluid Flow, First ed. Seriesin Computational Methods in Mechanics and Thermal Sciences. Taylor& Francis, 1980.
H. K. Versteeg and W. Malalasekera, An Introduction to ComputationalFluid Dynamics - The Finite Volume Method, First ed. Prentice Hall,1995.
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Main references
S. Toninel, Development of a New Parallel Code for ComputationalContinuum Mechanics Using Object-Oriented Techniques, PhD Thesis,Universitá di Bologna, 2006.(http://www.ce.uniroma2.it/nemo/toninel_phd.pdf)
J.H. Ferziger and M. Peric, Computational Methods for Fluid Dynamics,Third ed. Springer, 2002.
S. Filippone and A. Buttari, PSBLAS-2.0 User’s Guide. A ReferenceGuide for Parallel Sparse BLAS library, 2006.
S. V. Patankar, Numerical Heat Transfer and Fluid Flow, First ed. Seriesin Computational Methods in Mechanics and Thermal Sciences. Taylor& Francis, 1980.
H. K. Versteeg and W. Malalasekera, An Introduction to ComputationalFluid Dynamics - The Finite Volume Method, First ed. Prentice Hall,1995.
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Object-Oriented programming in Fortran 95The PSBLAS library
OO languages for scientific computing
The programming language chosen for supporting anobject-oriented formulation should satisfy the followingrequisites:
Data abstractionEncapsulationInheritancePolymorphismOperator overloading
Besides this, one should also account forcomputational efficiencydebugging and maintaining possibilitiescross-platform portability
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Object-Oriented programming in Fortran 95The PSBLAS library
NEMO and PSBLAS
NEMO is designed for running on distributed memoryparallel systems, according to the Message Passingparadigm. In particular the numerical algorithms whichrequire great effort in order to be parallelized are theiterative methods for the solution of the linear systemarising from the discretization of the PDE.This task is accomplished by means of the Parallel SparseBLAS library (http://www.ce.uniroma2.it/psblas)whose development was addressed by S. Filippone and M.Colajanni (2000) and S. Filippone and A. Buttari.
It provides a large set of very efficient preconditioners andnon-stationary, iterative, methods from the Krylov subspacefamily.Preconditioners and iterative methods are invoked bycalling single subroutines in a manner completelytransparent to the user.
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Object-Oriented programming in Fortran 95The PSBLAS library
NEMO and PSBLAS
NEMO is designed for running on distributed memoryparallel systems, according to the Message Passingparadigm. In particular the numerical algorithms whichrequire great effort in order to be parallelized are theiterative methods for the solution of the linear systemarising from the discretization of the PDE.This task is accomplished by means of the Parallel SparseBLAS library (http://www.ce.uniroma2.it/psblas)whose development was addressed by S. Filippone and M.Colajanni (2000) and S. Filippone and A. Buttari.
It provides a large set of very efficient preconditioners andnon-stationary, iterative, methods from the Krylov subspacefamily.Preconditioners and iterative methods are invoked bycalling single subroutines in a manner completelytransparent to the user.
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Object-Oriented programming in Fortran 95The PSBLAS library
The PSBLAS library consist of
computational routinessparse matrix by dense matrix productsparse triangular system solution for block diagonalmatricesvector and matrix normdense matrix sumsdot product
auxiliary routinescommunication descriptor allocationdense and sparse matrix allocationdense and sparse matrix build and updatesparse matrix and data distribution preprocessing
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Object-Oriented programming in Fortran 95The PSBLAS library
The PSBLAS library consist of
Preconditioner routinesDiagonal scalingIncomplete LU (ILU) factorizationAdditive SchwarzMultilevel Schwarz
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
Partitioning example
Block partition Metis partitition
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
Reordering
In order to reduce the bandwith and profile of connectivitymatrix A
Bandwith = max{|i − j | : aij 6= 0
}(1)
Profile =N∑
i=1
di , di = i − fi , fi = min{j : aij 6= 0} (2)
NEMO implement the reordering algorithm developed by Gibbset al. (Gibbs, Poole and Stockmeyer An algorithm for reducingthe bandwith and the profile of a sparse matrix, SIAM J. ofNum. Anal., 1976).The renumbering improve also the partition.
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
Reordering example
sparsity pattern without reordering sparsity pattern with GPS reordering
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
Reordering + partitioning example
Block partition without reordering Block partitition with GPS reordering
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
Mesh main features I
triangles, quadrilaterals or generic polygons (2D)tetrahedra, pyramids, prism, hexahedra or genericpolyhedra (3D)
3D hybrid mesh with mixed tetrahedra, pyramids, prism and hexaedra
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
type vectorprivatereal(kind(1.d0)) :: xreal(kind(1.d0)) :: yreal(kind(1.d0)) :: z
end type vectorMarco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
The vector class II
interface operator(+)module procedure vec_sum
end interface...containselemental function vec_sum(a,b)type(vector) :: vec_sumtype(vector), intent(in) :: a, bvec_sum%x = a%x + b%xvec_sum%y = a%y + b%yvec_sum%z = a%z + b%z
end function vec_sum...end module class_vector
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
The mesh class
UML diagram of the mesh class
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
The field class
UML diagram of the field class
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
The PDE class
UML diagram of the PDE class
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver
Operators
Operators acting on Field ObjectsGradient of scalar and vector fieldsDivergence of vector field
Operators acting on PDEsTime derivative of scalar and vector variablesLaplacian (div(Γgradφ)) of scalar and vector variablesDivergence of scalar variables and vector variablesScalar Source
Marco Rorro NEMO: Numerical Engine for Multiphysics Operators
IntroductionNEMO main features
Examples
Partitioning and ReorderingGeometry and mesh capabilitiesPDE solver