DOE/Office of Science/ASCR (Sandia National Laboratories)

Slides:



Advertisements
Similar presentations
1 Coven a Framework for High Performance Problem Solving Environments Nathan A. DeBardeleben Walter B. Ligon III Sourabh Pandit Dan C. Stanzione Jr. Parallel.
Advertisements

Advanced Computational Software Scientific Libraries: Part 2 Blue Waters Undergraduate Petascale Education Program May 29 – June
1 A Common Application Platform (CAP) for SURAgrid -Mahantesh Halappanavar, John-Paul Robinson, Enis Afgane, Mary Fran Yafchalk and Purushotham Bangalore.
CSE351/ IT351 Modeling And Simulation Choosing a Mesh Model Dr. Jim Holten.
By. What advantages has it? The Reasons for Choosing Python  Python is free  It is object-oriented  It is interpreted  It is operating-system independent.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
MS17 A Case Study on the Vertical Integration of Trilinos Solver Algorithms with a Production Application Code Organizer: Roscoe A. Bartlett Sandia National.
An approach for solving the Helmholtz Equation on heterogeneous platforms An approach for solving the Helmholtz Equation on heterogeneous platforms G.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Trilinos Software Engineering Technologies.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Integrating Trilinos Solvers to SEAM code Dagoberto A.R. Justo – UNM Tim Warburton – UNM Bill Spotz – Sandia.
Using PyTrilinos 2005 Trilinos Users Group Meeting 1 Nov :30-4:30 Bill Spotz.
Page 1 Trilinos Software Engineering Status and Future Issues Roscoe A. Bartlett Department of Optimization & Uncertainty.
Taking Ownership of Your Package’s Python Interface 2005 Trilinos Users Group Meeting 31 Oct :15-2:15 Bill Spotz.
PyTrilinos: A Python Interface to Trilinos Bill Spotz Sandia National Laboratories Reproducible Research in Computational Geophysics August 31, 2006.
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
Page 1 Trilinos Software Engineering Technologies and Integration Numerical Algorithm Interoperability and Vertical Integration –Abstract Numerical Algorithms.
Chapter 3 Parallel Algorithm Design. Outline Task/channel model Task/channel model Algorithm design methodology Algorithm design methodology Case studies.
Parallel Interactive Computing with PyTrilinos and IPython Bill Spotz, SNL (Brian Granger, Tech-X Corporation) November 8, 2007 Trilinos Users Group Meeting.
Trilinos 101: Getting Started with Trilinos November 6, :30-9:30 a.m. Jim Willenbring Mike Heroux (Presenter)
Strategic Goals: To align the many efforts at Sandia involved in developing software for the modeling and simulation of physical systems (mostly PDEs):
Amesos Sparse Direct Solver Package Ken Stanley, Rob Hoekstra, Marzio Sala, Tim Davis, Mike Heroux Trilinos Users Group Albuquerque 3 Nov 2004.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Solvers Made Easy (to use and use together) Thyra, Stratimikos, Handles and More... Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation.
PyTrilinos: a Python Interface to Selected Trilinos Packages Bill Spotz Trilinos Users Group Meeting November 2, 2004.
Amesos Sparse Direct Solver Package Tim Davis, Mike Heroux, Rob Hoekstra, Marzio Sala, Ken Stanley, Heidi Thornquist, Jim Willenbring Trilinos Users Group.
A Current Overview of the Trilinos Project Jonathan Hu Tenth Copper Mountain Conference on Iterative Methods Monday, April 7 th, 2008 SAND# C.
Scalable Linear Algebra Capability Area Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation,
Thyra from a Developer's Perspective Roscoe A. Bartlett Department 1411: Optimization and Uncertainty Estimation Sandia National Laboratories Sandia is.
New Features in ML 2004 Trilinos Users Group Meeting November 2-4, 2004 Jonathan Hu, Ray Tuminaro, Marzio Sala, Michael Gee, Haim Waisman Sandia is a multiprogram.
An Overview of Trilinos Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin.
1 Stratimikos Unified Wrapper to Trilinos Linear Solvers and Preconditioners Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Teuchos: Utilities for Developers & Users November 2nd, 3:30-4:30pm Roscoe Bartlett Mike Heroux Kris Kampshoff Kevin Long Paul Sexton Heidi.
Introducing Tpetra and Kokkos Chris Baker/ORNL TUG 2009 November CSRI.
Thyra For Developers Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia National Laboratories Trilinos Users Group Meeting (Developers.
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA
Photos placed in horizontal position with even amount of white space between photos and header Sandia National Laboratories is a multi-program laboratory.
ML: A Multilevel Preconditioning Package Copper Mountain Conference on Iterative Methods March 29-April 2, 2004 Jonathan Hu Ray Tuminaro Marzio Sala Sandia.
Combining Trilinos Packages To Solve Linear Systems Michael A. Heroux Sandia National Labs.
C OMPUTATIONAL R ESEARCH D IVISION 1 Defining Software Requirements for Scientific Computing Phillip Colella Applied Numerical Algorithms Group Lawrence.
What’s New for Epetra Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin.
Page 1 Open-Source Software for Interfacing and Support of Large-scale Embedded Nonlinear Optimization Roscoe A. Bartlett
Functional Programming
C Software Life-cycle and Integration Issues for CS&E R&D Software and Experiences from Trilinos (Part I) Roscoe A. Bartlett
CSC391/691 Intro to OpenCV Dr. Rongzhong Li Fall 2016
A survey of Exascale Linear Algebra Libraries for Data Assimilation
Xing Cai University of Oslo
Spark Presentation.
Compiling Dynamic Data Structures in Python to Enable the Use of Multi-core and Many-core Libraries Bin Ren, Gagan Agrawal 9/18/2018.
Functional Programming with Java
ModelEvaluator Scalable, Extendable Interface Between Embedded Nonlinear Analysis Algorithms and Applications Roscoe A. Bartlett Department of Optimization.
Torch 02/27/2018 Hyeri Kim Good afternoon, everyone. I’m Hyeri. Today, I’m gonna talk about Torch.
HPC Modeling of the Power Grid
The Future of Fortran is Bright …
Python for Scientific Computing
Trilinos Software Engineering Technologies and Integration
GPU Implementations for Finite Element Methods
Huanyuan(Wayne) Sheng
GENERAL VIEW OF KRATOS MULTIPHYSICS
What's New in eCognition 9
Communication and Coding Theory Lab(CS491)
Dtk-tools Benoit Raybaud, Research Software Manager.
Embedded Nonlinear Analysis Tools Capability Area
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Parallel Programming in C with MPI and OpenMP
What's New in eCognition 9
What's New in eCognition 9
SPL – PS1 Introduction to C++.
Presentation transcript:

DOE/Office of Science/ASCR (Sandia National Laboratories) PyTrilinos: A Python Interface to Parallel, Object-Oriented Solver Packages for Scientific Computing Bill Spotz DOE/Office of Science/ASCR (Sandia National Laboratories) SIAM Annual Meeting 2008 July 10, 2008

Computational Sciences at Sandia Chemically reacting flows Climate modeling Combustion Compressible flows Computational biology Electrical modeling Heat transfer Load balancing Materials modeling MEMS modeling Mesh generation Optimization and uncertainty quantification Seismic imaging Shock and multiphysics Structural dynamics

The Trilinos Project Provide a central repository for Sandia’s solver technology Increase code-reuse Organized on concept of “packages” Minimize package interdependence Maximize package interoperability Provide a framework for SQE and SQA Compliance with requirements Nightly test harness High degree of developer autonomy Open source: GNU Lesser General Public License Web site: http://trilinos.sandia.gov Next release: Version 9.0, September, 2008 Trilinos Users Group Meeting every November

The Trilinos Project Linear Algebra Services Tools & Utilities Communicators, maps, vectors, matrices, graphs… Linear Algebra Services Complex interface to AztecOO Direct, sparse Tools & Utilities Java Sparse kernels Iterative, sparse Reduction, transformation operators Templated Direct, dense Iterative, sparse, next generation Extensions Generic interface Linear Solvers Epetra Jpetra Tpetra EpetraExt Kokkos RTOp Nonlinear Solvers Primary tools package Teuchos TriUtils Galeri Thyra Isorropia Moertel Didasko PyTrilinos WebTrilinos New_Package Amesos AztecOO Belos Komplex Pliris Stratimikos Common testing tools NOX Matrix gallery Common interface Meta-Solvers Partitioning & load balance Eigensolvers Anasazi Rythmos LOCA MOOCHO Mortar elements Time-stepping algorithms Trilinos examples Continuation algorithms Python Interface Preconditioners Constrained optimization Web interface Package template Incomplete factorization IFPACK ML Claps Meros Multi-level Domain decomposition Segregated, block

The Trilinos Project Recently, the scope of Trilinos has been expanded to include: Meshing Numerical methods Finite element interface Dynamic load balancing Automatic differentiation Probably others…

The Interoperability Problem Ross has talked about the need for (and work on) a common abstract interface Interfaces between Trilinos packages Interfaces between Trilinos and external packages We would like to extend this concept to the python wrappers Interoperability with external python projects, such as SLIMpy Many design decisions still to be made Some early prototyping work has been done

PyTrilinos Linear Algebra Services Linear Solvers Preconditioners Epetra (with extensive NumPy compatibility and integration) EpetraExt (coloring algorithms and some I/O) Linear Solvers Amesos (LAPACK, KLU, UMFPACK, ScaLAPACK, SuperLU, SuperLUDist, DSCPACK, MUMPS) AztecOO Preconditioners IFPACK ML Nonlinear Solvers NOX Meta-Solvers LOCA (python wrappers not yet caught up to recent redesigns) Anasazi Tools and Utilities Teuchos (ParameterLists, communicators, traits and refcount pointers) TriUtils Galeri Thyra (early development stage)

PyTrilinos Design PyTrilinos is a “python package,” meaning a python module with sub-modules Each “Trilinos package” translates into a PyTrilinos sub-module Trilinos package namespaces also become sub-modules PyTrilinos python interfaces match Trilinos C++ interfaces (within reason) Generated by SWIG (simple wrapper interface generator) Some classes made more “pythonic”

PyTrilinos Documentation Trilinos documentation is handled by doxygen: special comments within code Web pages updated twice daily C++ doxygen comments are now automatically converted to python doc strings: >>> from PyTrilinos import Epetra >>> help(Epetra.Vector) Returns standard Epetra_Vector documentation

PyTrilinos.Epetra Communicators Comm SerialComm MpiComm PyComm Maps BlockMap Map LocalMap Vectors MultiVector Vector IntVector SerialDense objects SerialDenseOperator SerialDenseMatrix SerialDenseVector SerialDenseSolver IntSerialDenseMatrix IntSerialDenseVector Graphs CrsGraph Operators Operator RowMatrix CrsMatrix

A Quick Detour… Python lists are not suitable for scientific computing Flexible but inefficient Heterogeneous data, noncontiguous memory NumPy module provides needed functionality Contiguous, homogeneous n-dimensional arrays High-level interface Part of SciPy SciPy is a large, open source package for a wide variety of python interfaces to scientific software: NetLib’s “greatest hits”

PyTrilinos.Epetra and NumPy Array-like classes inherit from numpy.UserArray MultiVector Vector IntVector SerialDenseMatrix SerialDenseVector IntSerialDenseMatrix IntSerialDenseVector Methods throughout Epetra have arguments that accept or produce pointers to C arrays Python input arguments accept python sequences Python output arguments produce ndarrays

PyTrilinos.Teuchos Teuchos::ParameterList Used by several Trilinos packages to set problem parameters Maps string names to arbitrary-type values Python implementation allows dictionary substitutions The following conversions are supported: Python Dir C / C++ bool  int float double string std::string  char * dict  ParameterList wrapped ParameterList

PyTrilinos Demonstration Governing equation: Boundary conditions: Exact solution: CDS: Oscillations:

Parallelism Configure Trilinos with –enable-mpi, and PyTrilinos will also be mpi-enabled Scripts are run in parallel in the standard way: $ mpirun -np 4 python script.py … When Epetra is imported, MPI_Init() is called automatically and MPI_Finialize() is registered with the atexit module. Use the PyComm() function to obtain a communicator, and use a parallel programming paradigm: Global and local IDs Ghost nodes if necessary Epetra Import and Export objects if needed

Conclusions Python lets developers focus on the problem Memory management, garbage collection Powerful, flexible containers Clean, readable syntax PyTrilinos provides access to powerful solver technologies Rapid prototyping Application development Serial, parallel