1 / 19

kajny@ida.liu.se

GridModelica High Level Modeling on the Grid Kaj Nyström Dept. of Computer and Information Science, Linköping University MathCore Engineering AB kajny@ida.liu.se. kajny@ida.liu.se. Modeling – The way of doing things. Modeling (like talk) is cheap, considering the alternatives

lauren
Download Presentation

kajny@ida.liu.se

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. GridModelica High Level Modeling on the Grid Kaj Nyström Dept. of Computer and Information Science, Linköping University MathCore Engineering AB kajny@ida.liu.se kajny@ida.liu.se

  2. Modeling – The way of doing things • Modeling (like talk) is cheap, considering the alternatives • Modeling is almost always possible • Modeling gives extensive data even where physical measuring might not always be possible, or is too expensive. • Modeling is fast, especially on large systems • Limiting factors: • Model complexity • Computational power kajny@ida.liu.se

  3. Modeling – The way of doing things(2) • Factors limiting usage of modeling • Conservative engineers • Domain knowledge • Model complexity • Computational power kajny@ida.liu.se

  4. Modeling – Dealing with complexity • Traditionally high performance models have been written in C or Fortran. • The Modelica language provides an object oriented approach to modeling. • Main benefits from our point of view: • Acausal: No need to do the mathematical dirtywork yourself anymore. • Connection oriented: Well defined interface betweenall components (very useful for parallelization). • Reusable: Extensive object libraries exists. kajny@ida.liu.se

  5. Modeling – Dealing with complexity(2) Example: The DC-motor kajny@ida.liu.se

  6. Modeling – Dealing with complexity(3) Example: The DC-motor, modelica source code model dcmotor Modelica.Electrical.Analog.Basic.Resistor Resistor1; Modelica.Electrical.Analog.Basic.Ground Ground1; Modelica.Electrical.Analog.Basic.Inductor Inductor1; Modelica.Electrical.Analog.Basic.EMF EMF1; Modelica.Electrical.Analog.Sources.ConstantVoltage ConstantVoltage1; Modelica.Electrical.Analog.Basic.Resistor Resistor2(R=10); equation connect(Resistor1.p, ConstantVoltage1.p) ; connect(Resistor1.n, Inductor1.p); connect(Inductor1.n, EMF1.p); connect(ConstantVoltage1.n, Ground1.p); connect(EMF1.n, Ground1.p); connect(EMF1.flange_b, Inertia1.flange_a); connect(Resistor2.p, Resistor1.p); connect(Resistor2.n, Resistor1.n); end dcmotor; kajny@ida.liu.se

  7. Modeling – Dealing with complexity(4) Another example: A robot, including visualization kajny@ida.liu.se

  8. Problem 2: Computational Power • The Grid is the solution (?) – Computational power for the masses. • Nordugrid middleware • Resources: Nordugrid and our own cluster • This provides the computational power we needbut it also just brings us to the next (big) problem: kajny@ida.liu.se

  9. Problem no 2: Computational Power • The Grid is the solution (?) – Computational power for the masses. • Nordugrid middleware • Resources: Nordugrid and our own cluster • This provides the computational power we needbut it just brings us to the next (big) problem: • Partitioning! kajny@ida.liu.se

  10. Partitioning models on the Grid An example: a+b+c+d=10a+b+c=2c-d=-2a+b-d=4 How would you solve this system? kajny@ida.liu.se

  11. Partitioning models on the Grid (2) • The grid has special features/misfeatures: • Latency, latency, latency, latency… • Heterogenity • Close to infinite resources • Unpredictability • Unreliability kajny@ida.liu.se

  12. Partitining the models • We attack the problem on different levels • High level partitioning - New Modelica constructs to enable parallelism. • Medium level partitioning - Shared level memory model (GridNestStep). • Low level partitioning – Parallelizing the generated C-code. kajny@ida.liu.se

  13. High Level Partitioning • Partitioning at Modelica model level • Done by adding partitioning constructs to the language and modification of the Modelica compiler. • Considered methods are: • Weak Operators/Variables (Francesco Casella) • Transmission Line Modeling method (Christos Christopoulos) • Modelica specific ideas kajny@ida.liu.se

  14. High Level Partitioning (2) • The weak variables method • Partition the model into physical domains • Identify boundary variables • Treat these variables as parameters on both sides of boundary. • Use fast fixed step solvers but with different step-size for both subsystems kajny@ida.liu.se

  15. High Level Partitioning (3) • The transmission line modeling method • Partition the model fast and slow subsystems • Insert delaying TLM-element between subsystems • Calculate approximate loss in precision and compensate if possible kajny@ida.liu.se

  16. Medium Level Partitioning • Grid level parallelization with GridNestStep • Shared memory model for the grid • Specific adaption for the grid is neccesary, maximize time between syncs is absolutely vital. kajny@ida.liu.se

  17. Low Level Partitioning • Primarily by task merging and common parallelization techniques in parallel solvers • Task merging: • Partition code very fine grained • Achive parallelism by a sequence of duplicating tasks and merging very small jobs, depending on computational and communication cost. • This can be done adaptively for large jobs kajny@ida.liu.se

  18. Wrap up • Parallelizing solving of large equation systems is hard. • Latency is our worst enemy • Different variants of speculative execution might be our best friends • The grid might be a hype, but it is a useful hype. kajny@ida.liu.se

  19. Thank you for your attention Questions? kajny@ida.liu.se

More Related