POOMA

A C++ Toolkit for High-Performance Parallel Scientific Computing

Jeffrey D. Oldham

CodeSourcery, LLC

All rights reserved. This document may not be redistributed in any form without the express permission of the author.


Table of Contents
Preface
1. How to Read This Book
2. Obtaining, Using, and Modifying POOMA
3. History of POOMA
4. Acknowledgements
1. Getting Started with POOMA
1.1. Getting Started for Impatient Users
1.2. Obtaining POOMA
1.3. Compiling the POOMA Library
1.3.1. DANGER: Configuration Options
1.4. Writing and Compiling POOMA Programs
1.4.1. DANGER: initialize and finalize
1.5. Supporting Distributed Computation
1.5.1. Obtaining and Installing the MM Shared Memory Library
1.5.2. Obtaining and Installing the Cheetah Messaging Library
1.5.3. Configuring POOMA When Using Cheetah
2. Introduction
2.1. POOMA Goals
2.2. POOMA is Open-Source Software
3. A Tutorial Introduction
3.1. Hand-Coded Implementation
3.2. Element-wise Array Implementation
3.3. Data-Parallel Array Implementation
3.4. Stencil Array Implementation
3.5. Distributed Array Implementation
3.6. Data-Parallel Field Implementation
3.7. Distributed Field Implementation
4. Overview of POOMA Concepts
4.1. POOMA Containers
4.1.1. Choosing a Container
4.1.2. Declaring Sequential Containers
4.1.3. Declaring Distributed Containers
4.2. Computation Modes
4.3. Computation Environment
5. Array Containers
5.1. Containers
5.2. Arrays
5.3. Domains
5.3.1. Declaring Domains
5.3.2. Using Domains
5.4. Declaring Arrays
5.5. Using Arrays
5.6. DynamicArrays
6. Engines
6.1. The Concept
6.2. Types of Engines
7. Data-Parallel Expressions
7.1. Expressions with More Than One Container Value
7.2. Using Data-Parallel Expressions
7.3. Implementation of Data-Parallel Statements
7.3.1. Naïve Implementation
7.3.2. Portable Expression Template Engine
8. Container Views
A. DANGER: Programming with Templates
A.1. Templates Execute at Compile-Time
A.2. Template Programming for POOMA Users
A.3. Template Programming Used to Write POOMA
B. DANGER: Overview of POOMA Sources
B.1. Structure of the Files
B.2. POOMA Coding Conventions
B.2.1. POOMA Namespace
B.2.2. Formatting
B.2.3. Preprocessor
B.2.4. Global Variables
B.2.5. Classes
B.2.6. Functions
B.2.7. Friends
B.2.8. Compile-Time Programming
B.2.9. Constants
B.2.10. Type Casting
B.2.11. Errors and Exceptions
C. UML Class Diagrams
C.1. Arrays
C.2. Fields, Meshes, and Centerings
C.2.1. Meshes
C.2.2. Centerings
C.3. Vectors, TinyMatrixs, Tensors
C.4. Domains
C.5. Engines
C.6. Distributed Computation
Glossary
List of Tables
1-1. Configuration Options
4-1. POOMA Concepts
4-2. POOMA Container Summary
4-3. Choosing a POOMA Container
5-1. Declaring One-Dimensional Locs
5-2. Declaring Multidimensional Locs
5-3. Declaring One-Dimensional Intervals
5-4. Declaring Multidimensional Intervals
5-5. Declaring One-Dimensional Ranges
5-6. Declaring Multidimensional Ranges
5-7. Declaring One-Dimensional Grids
5-8. Declaring Multidimensional Grids
5-9. Some Domain Accessors
5-10. Declaring Arrays
5-11. Initializing Arrays' Domains
5-12. Array Internal Type Definitions and Compile-Time Constants
5-13. Array Accessors
5-14. Changing a DynamicArray's Domain
6-1. Types of Engines
7-1. Operators Permissible for Data-Parallel Expressions
7-2. Mathematical Functions Permissible for Data-Parallel Expressions
7-3. Comparison Functions Permissible for Data-Parallel Expressions
7-4. Miscellaneous Functions Permissible for Data-Parallel Expressions
A-1. Correspondences Between Run-Time and Compile-Time Constructs
A-2. More Correspondences Between Run-Time and Compile-Time Constructs
B-1. Toolkit Directories and Files
B-2. Source Code Directories (Within src)
B-3. Filename Suffixes
C-1. Abbreviations
List of Figures
2-1. How POOMA Fits Into the Scientific Process
3-1. Doof2d Averagings
3-2. Adding Arrays
3-3. Applying a Stencil to an Array
3-4. The POOMA Distributed Computation Model
4-1. Concepts For Declaring Containers
4-2. Array and Field Mathematical and Computational Concepts
7-1. Adding Arrays with Different Domains
7-2. Annotated Parse Tree for -A + 2*B
C-1. Explanation of UML Class Diagrams
C-2. Relationship Between Array and DynamicArrays
C-3. Array Diagram
C-4. DynamicArray Diagram
C-5. Field
C-6. Meshes
C-7. NoMesh
C-8. UniformRectilinearMesh
C-9. Centering Classes
C-10. Vectors
C-11. TinyMatrixs
C-12. TinyMatrixEngines
C-13. Tensors and TensorEngines
C-14. Full and Diagonal TensorEngines
C-15. Antisymmetric and Symmetric TensorEngines
C-16. Domains
C-17. Engines
C-18. Brick and CompressibleBrick Engines
C-19. Dynamic and MultiPatch Engines
C-20. Remote Engines
C-21. Partitions
C-22. Grid Partitions
C-23. Other Partitions
C-24. Guard Layers
C-25. DomainLayout
C-26. DynamicLayout
C-27. GridLayout
C-28. UniformGridLayout
C-29. SparseTileLayout
C-30. Relationships Among Context Mappers
C-31. Context Mappers
List of Examples
1-1. A "Hello, POOMA" Program
3-1. Hand-Coded Implementation of Doof2d
3-2. Element-wise Array Implementation of Doof2d
3-3. Data-Parallel Array Implementation of Doof2d
3-4. Stencil Array Implementation of Doof2d
3-5. Distributed Stencil Array Implementation of Doof2d
3-6. Data-Parallel Field Implementation of Doof2d
3-7. Distributed Data-Parallel Field Implementation of Doof2d
5-1. Copying Arrays
5-2. Using Array Member Functions
5-3. Example Using DynamicArrays
A-1. Classes Storing Pairs of Values
A-2. Templated Class Storing Pairs of Values