Implementing Chares in a High-Level Scripting Language

Slides:



Advertisements
Similar presentations
pa 1 Porting BETA to ROTOR ROTOR Projects Presentation Day, June by Peter Andersen.
Advertisements

High Productivity Computing Systems for Command and Control 13 th ICCRTS: C2 for Complex Endeavors Bellevue, WA June 17 – 19, 2008 Scott Spetka – SUNYIT.
Remote Procedure Call Design issues Implementation RPC programming
Compiler Design PROJECT PRESENTATION : COMPILER FOR OBJECTIVE C Harshal Waghmare Jeet Kumar Nandan Kumar Vishal Agrawal.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
What iS RMI? Remote Method Invocation. It is an approach where a method on a remote machine invokes another method on another machine to perform some computation.
Chapter 9 Subprograms Sections 1-5 and 9. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Introduction Two fundamental abstraction facilities.
Interact: RETSINA’s Agent Editor Provides a GUI interface to agent’s task and reduction libraries Allows –quick development of new libraries –easy extensions.
Communication in Distributed Systems –Part 2
Charm++ Load Balancing Framework Gengbin Zheng Parallel Programming Laboratory Department of Computer Science University of Illinois at.
Parallel Programming in Java with Shared Memory Directives.
7 th Annual Workshop on Charm++ and its Applications ParTopS: Compact Topological Framework for Parallel Fragmentation Simulations Rodrigo Espinha 1 Waldemar.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Advanced / Other Programming Models Sathish Vadhiyar.
A Little Language for Surveys: Constructing an Internal DSL in Ruby H. Conrad Cunningham Computer and Information Science University of Mississippi.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Charm++ Data-driven Objects L. V. Kale. Parallel Programming Decomposition – what to do in parallel Mapping: –Which processor does each task Scheduling.
Charm++ Data-driven Objects L. V. Kale. Parallel Programming Decomposition – what to do in parallel Mapping: –Which processor does each task Scheduling.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Workload Scheduler plug-in for JSR 352 Java Batch IBM Workload Scheduler IBM.
Cody Scoggins, Dion de Jong, Victor Reynolds References:  902/is-lua-interesting-from-a- programming-language-design-
Visit for more Learning Resources
Programming Languages Dan Grossman 2013
Jim Fawcett CSE687 – Object Oriented Design Spring 2016
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Chapter 1 Introduction.
Scope History of Ruby. Where can you use Ruby? General Features.
Goals Give you a feeling of what Eclipse is.
LiveViz – What is it? Charm++ library Visualization tool
The Mach System Sri Ramkrishna.
GRASP: Visibility and Design
Compiler Construction (CS-636)
SOFTWARE DESIGN AND ARCHITECTURE
Review: Chapter 5: Syntax directed translation
Lecture 14: Iteration and Recursion (Section 6.5 – 6.6)
Lecture 25 More Synchronized Data and Producer/Consumer Relationship
Chapter 1 Introduction.
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Indexer AKEEL AHMED.
Distributed Systems - Comp 655
Exception Handling Chapter 9.
Designing with Java Exception Handling
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Your First Java Application
Milind A. Bhandarkar Adaptive MPI Milind A. Bhandarkar
Introduction to Python
Support for ”interactive batch”
GENERAL VIEW OF KRATOS MULTIPHYSICS
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
Analysis models and design models
MySQL Migration Toolkit
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Tonga Institute of Higher Education
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Review CSE116 2/21/2019 B.Ramamurthy.
AIMS Equipment & Automation monitoring solution
Designing with Java Exception Handling
Inheritance and Polymorphism
Introduction to Computer Science
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Java Remote Method Invocation
An Orchestration Language for Parallel Objects
CSCE 314: Programming Languages Dr. Dylan Shell
The Grid Component Model and its Implementation in ProActive
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Jim Fawcett CSE687 – Object Oriented Design Spring 2015
Presentation transcript:

Implementing Chares in a High-Level Scripting Language LuaCharm: Implementing Chares in a High-Level Scripting Language Thiago Ponte, Noemi Rodriguez PUC-Rio – Brazil

If you optimize everything, you will always be unhappy. Don Knuth

Outline Introduction Objectives Lua LuaCharm Tests Summary Future Work

Introduction Scripting languages have been drawing much attention over the past years Dynamism, flexibility and simplicity are the main focus of scripting languages Parallel computing has not yet explored the potential of scripting

Objectives Integrate Charm++ and Lua in way that: Chares can be implemented in Lua Chares implemented in Lua are perceived as regular C++ chares Chares can have their implementation changed at runtime Allow flow of control to be writen in a high level language

Lua Developed at PUC-Rio Has become an important language

Lua

Lua fast, lightweight, powerful, embeddable scripting language dynamic typing; types are associated to values, not variables all values are first class single data-structuring facility tables implement associative arrays metadata mechanisms allow semantics to be extended

Lua Lua offers a object-oriented like syntax, in which objects are implemented as tables Previous experience in integrating Lua with other systems such as Corba and COM and languages, such as Java and .NET myObj = { … foo = function(self, …) -- lua code end, } myObj:foo(…) myObj = {} function myObj:foo(…) -- lua code end myObj:foo(…)

LuaCharm LuaCharm is an extension of Charm++ through changes in parser and code generator Developed after studying existing binding between Lua and Python LuaCharm offers a mechanism to implement chares in Lua The parser generates a façade C++ class responsible for the execution of the corresponding method in Lua

LuaCharm Changes in the interface file and code generator: Inclusion of the attribute lua to be used in chares, followed by the name of the file implementing the chare Besides the methods declared in the interface file, an updateChare method is created, and it may be used to execute a chunk of lua code inside the chare

LuaCharm Exports a library to Lua that allows instantiation of chares in a simples Lua-like manner Chares returned to Lua can be called with the “object-oriented” syntax of Lua

LuaCharm – Chare definition chare [lua "luaChare.lua"] luaChare{ entry luaChare(); entry someLuaMethod(); } luaChare = { ckNew = function() -- lua code end, someLuaMethod = function() end -- chare instantiation c = charm.luaChare() -- calling a remote method c.someLuaMethod()

Integrating with Load Balancing Chares implemented in Lua can be migrated by the load balancer. The Lua implementation must implement a pack and a unpack method to migrate values. pack must return a string, which unpack will receive as parameter

Tests Adaptive Quadrature of the ex function between 0 and 15 Implementations using bag of tasks and division in fixed intervals Four different approaches: Standard Charm++ implementation Controller in Lua and workers in C++ Both chares in Lua Both chares in Lua, but the workers using a library implemented in C for the mathematical calculations

Tests – Bag of Tasks Bag of tasks sends an interval to a worker N; Worker checks if interval should be broken down; If yes, sends back part of the interval; Calculates the result for its interval; Send back the result.

Tests First approach using bag of tasks in the mainchare and a chare group for workers. Tested in 8 processors 1 Impl 2 Impl 3 Impl 4 Impl Time(s) 29.75 29.85 168.77 30.59 Increase in relation to 1 0.35% 467.36% 2.82%

Tests Second approach, using an array of 500 chares, where each is responsible for a pre-determined part of the problem. Tested in 8 processors 1ª Impl 2ª Impl 3ª Impl 4ª Impl Time(s) 10.01 67.83 Increase in relation to 1 0% 577.66% 0.03%

Summary Even when the chares were all implemented in Lua, but with a C library for the mathematical work, the increase in processing time was acceptable Since Lua chares are regular chares, profiling results are easy to read

Future Work Optimizations in the generated code Experiments with runtime redefinitions application strategy load balancer Restrictions in the implementation: Read-only variables Array reductions Using Messages Synchronous non-blocking remote calls using coroutines

Thank You Questions? More details? Coming soon…  tponte@inf.puc-rio.br http://luaforge.net/luacharm ?