Presentation is loading. Please wait.

Presentation is loading. Please wait.

TAXI Code Overview and Status Timmie Smith November 14, 2003.

Similar presentations


Presentation on theme: "TAXI Code Overview and Status Timmie Smith November 14, 2003."— Presentation transcript:

1 TAXI Code Overview and Status Timmie Smith November 14, 2003

2 Transport Problem Example Oil Well Logging Tool Shaft dug at possible well location Radioactive sources placed in shaft with monitoring equipment Simulation allows for verification of new techniques and tools

3 Problem Specification Given a configuration at time T Spatial domain divided into cells Energy range divided into groups Quadrature set chosen for angular integrals Fixed Sources, Boundary Conditions, and Initial Conditions Compute particle flux at time T +  T Particle flux at time T +  T Reaction rates, etc., during time step

4 TAXI Data Structures Spatial domain decomposed into Cells Cells are stored in a grid Cell contains Elements Elements are the base spatial data structure Material definitions stored as in time- dependent neutronics problems Number densities stored by cell Microscopic cross sections stored by isotope Element Cell Grid

5 Aggregation in TAXI Angle Sets Angles in AngleSet generate same dependences Energy Group Sets Cell Sets Code computes aggregation User can specify an aggregation if they want Work function operates on GroupSet-AngleSet-CellSet combination

6 STAPL Overview Standard Template Adaptive Parallel Library Superset of C++ STL pContainers – generic distributed containers pAlgorithms – generic parallel algorithms pRange - abstract view of partitioned data binds pContainers and pAlgorithms view of dist. data, random access, data dependences Example: parallel sorting a distributed vector stapl::pvector pv(100); … initialize pv … stapl::p_sort( pv.get_prange() );

7 The STAPL Programming Environment ARMI MPIOpenMPPthreadsNative pAlgorithmspContainers User Code pRange

8 Grid Overview ArbitraryPGrid is derived from BaseSpatialGrid pGraph Grid is templated on cell type (brick, polyhedral, etc.) element type (whole_cell, corner,...) It contains instantiations of cells (one per graph_vertex) faces (really graph_edges) It contains methods for putting outgoing-surface intensities into graph_edges getting incoming-surface intensities from graph_edges both of these are (angleset  groupset) at a time Graph Vetex Cell Graph Edge

9 Cell Overview Cell class doesn ’ t contain much. list of isotopes and their number densities list of elements list of vertex indices The “ element ” concept gives us great generality and flexibility. There is one element for each “ fundamental ” spatial unknown. For example: simple methods with one unknown per cell use the “ whole-cell ” element methods with one unknown per vertex per cell use the “ corner ” element

10 Element Overview Elements contain: volumetric sources (scattering and total) the solution (angular moments for generating the scattering source; also the angular intensities in a time-dependent problem) Most of the code is unaware of problem geometry or discretization method. It just loops over elements Work function processes the Cells in a STAPL pRange

11 TAXI Setup Energy and Angle objects constructed Grid partition decided Specialized STAPL scheduling algorithms used Partition information distributed Grid constructed in parallel Cells and Elements created and inserted pRanges built on grid Specialized STAPL scheduler determines pRanges pRange dependence graphs are directed

12 TAXI Algorithm

13 TAXI Implementation History C++ selected for implementation Wanted to use STL and STAPL Prototype implemented with C++ and MPI STAPL components weren ’ t fully implemented STAPL didn ’ t support distributed memory systems STAPL has advanced ARMI Runtime System provides a consistent base for development Allows STAPL to run on distributed memory systems pContainers provide data distribution and parallel operations pRange supports hierarchical decomposition of data Scheduling components incorporated into STAPL

14 STAPLing TAXI Custom Data Structures Distributed 3D vector class User managed distribution 3D indexing (e.g. foo[x][y][z]) Stored Cells and CellSets CellSet class Explicit list of graph vertex ids (Cells in the CellSet) List of ids provided cell sweep order

15 STAPLing TAXI pGraph stores Cells Each pGraph vertex is a Cell pGraph edges identify neighboring cells Arbitrary grids now possible 2D grids also possible pRange used to represent CellSet General representation of dependences between CellSets Multiple execution orders of cells in subrange possible

16 pRange Dependence Graph Numbers are cellset indices Colors indicate processors angle-set Aangle-set Bangle-set Cangle-set D

17 1 25 36 47 8 1013 18211215 141711 9 22251619 26292023 302427 2831 32 angle-set A 4 38 27 16 5 1116 1924914 152010 12 23281318 27321722 312126 2530 29 angle-set B Adding a reflecting boundary 32 3128 3027 2926 25 2320 15122118 191622 24 1181714 741310 396 52 1 angle-set C 29 3025 3126 3227 28 2217 1492419 181323 21 1052015 611611 2127 83 4 angle-set D

18 A second reflecting boundary 1 25 36 47 8 1013 18211215 141711 9 22251619 26292023 302427 2831 32 angle-set A 4 38 27 16 5 1116 1924914 152010 12 23281318 27321722 312126 2530 29 angle-set B 32 3128 3027 2926 25 2320 15122118 191622 24 1181714 741310 396 52 1 angle-set C 29 3025 3126 3227 28 2217 1492419 181323 21 1052015 611611 2127 83 4 angle-set D

19 Opposing reflecting boundary 1 25 36 47 8 1013 18211215 141711 9 22251619 26292023 302427 2831 32 angle-set A 4 38 27 16 5 1116 1924914 152010 12 23281318 27321722 312126 2530 29 angle-set B 32 3128 3027 2926 25 2320 15122118 191622 24 1181714 741310 396 52 1 angle-set C 29 3025 3126 3227 28 2217 1492419 181323 21 1052015 611611 2127 83 4 angle-set D

20 STAPLing TAXI Abstracting Communication Explicit MPI calls in driver function replaced with calls to ARMI methods pGraph uses ARMI to transfer information between threads when necessary ARMI fences replace MPI barriers Fences required during problem initialization Most fences handled inside STAPL

21 Effects of STAPLing Problem Time to Completion Average 2.16 times slower but improving rapidly Currently 15 global barriers in the ASCI code There is opportunity for improvement

22 Effects of STAPLing Reduced code size Code reduced ~6,000 lines. Currently 13,000 lines and shrinking Elimination of classes MPI wrappers XYZSpace CellSet Code Reorganization Problem class reorganized Eliminated explicit grid distribution Use of pRanges

23 TAXI Driver void driver() { BaseProblem* problem = read_problem(*input_stream, *output_stream, *error_stream); problem->solve(); problem->report(); } BaseProblem* read_problem(istream& input_stream, ostream& output_stream, ostream& error_stream){ ProblemInput* pinput = new ProblemInput(input_stream); Hex_cell_creator creator(*pinput); BaseEnergyAggregation egs; XMLObject xml_input = pinput->getTagObject("prototype")[0]; egs.init_from_input(xml_input, output_stream); asci_preprocessing::ASCI_Regular_pRange_Preprocessor* sched = build_brick_scheduler(creator.dimx(), creator.dimy(), creator.dimz(), egs, *pinput); BaseProblem* bp= new GenericSweepProblem (pinput, creator, egs, sched, output_stream, error_stream); return bp; }

24 Questions?


Download ppt "TAXI Code Overview and Status Timmie Smith November 14, 2003."

Similar presentations


Ads by Google