1 / 25

C TADEL

C TADEL. A Generator of Efficient Numerical Code. Physical processes. Can be described by a set of equations Can be simulated on a computer High-level languages for efficiency. Maintaining Models. Large amount of code Out of date documentation Debugging. Multi-Architecture.

jadyn
Télécharger la présentation

C TADEL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CTADEL A Generator of Efficient Numerical Code

  2. Physical processes • Can be described by a set of equations • Can be simulated on a computer • High-level languages for efficiency

  3. Maintaining Models • Large amount of code • Out of date documentation • Debugging

  4. Multi-Architecture • Different computer architectures require different optimizations • Default libraries are to generic

  5. Overview • Motivation • Ctadel system • Examples • Current work

  6. Motivation • Problems can be described on an abstract level • Maintaining of specification easier then large program • Code generator takes care of architecture dependent optimizations • Automatic documentation generation

  7. Model specification • Mathematical oriented • Application Driven Code • Fortran 77 • Fortran 90 • HPF CTADEL Transformation Database • Solving methods • Optimizing transformations Documentation • LaTeX • HTML Black-box

  8. Scripts Parser Symbolic evaluator Inference engine DICE GPAS Synthesizer LaTex Generator HTML Generator Code Generator Rule-base Internal

  9. Inference Engine • Type information • primary types (integer,floating points,...) • units (m/s,...) • grid types (staggered,…) • For example, discrete solution based on grid type

  10. GPAS Reduction System • Simplify and optimize expressions with a given set of rules df(atan(X), 1) => {1}/({1} + X^{2})

  11. DICE • Common subexpression elimination on high-level -- array based • Usage of domain/range information • Hardware cost model: • costs of load/stores: temporaries • avoid ‘expensive’ operations

  12. Ex. Specifications xfo :: float field(x,y,z) on surface_o. xfo = (ra - atmrad - ocnrad - sl % local radiation itensity where ra = rad((j-1)*dyo+(ny1-1)*dya+0.5*dyo) % atmospheric radiation where atmrad=xb*asto % sensible and latent flux where sl = lambda*(sst-asto) % ocean infrared where ocnrad = xc * sst ).

  13. Example Application • Dynamic routines for a weather forecast model (hirlam) [Robert van Engelen] • Turbulence scheme (hirlam) • Dynamics for a coupled Atmosphere/Ocean model • Convection scheme • …..

  14. 30% Experiments (1) Quasi-geostrophic climate dynamics

  15. Experiments (2) Convection scheme

  16. Future Extensions/Work • Templates • abstraction to the developer • implementation of numerical optimized code at backend • Semi-lagrangian methods

  17. CPU X t 0 t CPU Y 1 t 2 Semi-Lagrangian Formulations v

  18. Semi-Lagrangian S.L. drawbacks : computational expensive • Iterative search for  • Interpolation to find A’ • Communication cost S.L. advantages • Less time-steps needed compared with Eulerian

  19. Experiments

  20. Communication and Computation

  21. cpu1 cpu2 cpu3 Halo on Demand Full Halo cpu4 cpu6 cpu5 cpu7 cpu8 cpu9 Communication patterns

  22. Halo On Demand • Analyze data at runtime • Determine wind direction • Only transmit/receive necessary data • Experiments • 2 different sizes input data grids (114x100x31 and 456x400x31) • DAS2 with 1x1,2x2,….,11x11 nodes • MPI library for communication

  23. Transferred Data

  24. Speedup Normal Size

  25. Conclusions • Code generated from a high-level specification can compete with hand-written code • Automatic documentation generation • Dissertation: soon

More Related