New Language Features For Parallel and Asynchronous Execution Morten Kromberg Dyalog LTD Dyalog’13.

Slides:



Advertisements
Similar presentations
Tridion 5.3 Templates.
Advertisements

C++ Introduction.
MPI Message Passing Interface
Reliable Scripting Using Push Logic Push Logic David Greaves, Daniel Gordon University of Cambridge Computer Laboratory Reliable Scripting.
MINJAE HWANG THAWAN KOOBURAT CS758 CLASS PROJECT FALL 2009 Extending Task-based Programming Model beyond Shared-memory Systems.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Potential Languages of the Future Chapel,
CSE 1302 Lecture 21 Exception Handling and Parallel Programming Richard Gesick.
Chapter 3 Data Abstraction: The Walls. © 2005 Pearson Addison-Wesley. All rights reserved3-2 Abstract Data Types Modularity –Keeps the complexity of a.
Exceptions in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CS220 Software Development Lecture: Multi-threading A. O’Riordan, 2009.
Exception Handling An Exception is an indication of a problem that occurs during a program’s execution. Exception handling enables the programmer to create.
Java ThreadsGraphics Programming Graphics Programming: Java Threads.
Java Review 2 – Errors, Exceptions, Debugging Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
4.7.1 Thread Signal Delivery Two types of signals –Synchronous: Occur as a direct result of program execution Should be delivered to currently executing.
Lecture 2 – MapReduce CPE 458 – Parallel Programming, Spring 2009 Except as otherwise noted, the content of this presentation is licensed under the Creative.
Morten Kromberg CTO, Dyalog Ltd. Technical News from Dyalog SWEDAPL Göteborg April 2015.
Parallel Programming with v14.0. Parallel Paths to Parallel Performance 1.Parallel Compiler Research –”Concurrent Dfns Compiler” targets fine-grained.
Gitte Christensen Welcome. Slide 1 Welcome to record breaking 126 participants.
Fabien Viale 1 Matlab & Scilab Applications to Finance Fabien Viale, Denis Caromel, et al. OASIS Team INRIA -- CNRS - I3S.
Table-Driven Acceptance Testing Mario Aquino Principal Software Engineer Object Computing, Inc.
Components and Concurrency in ESMF Nancy Collins Community Meeting July 21, GMAO Seasonal.
Java Programming Exceptions Handling. Topics: Learn about exceptions Try code and catch Exceptions Use the Exception getMessage() method Throw and catch.
And other languages…. must remember to check return value OR, must pass label/exception handler to every function Caller Function return status Caller.
Technical Road Map Update Morten Kromberg, CTO. Show of Hands Workshops Today: –Putting Dyalog’s Latest Features to Use –MiServer 3.0 – A Framework for.
John Daintree Chief Architect Dyalog Andy Shiers Chief Operations Officer Dyalog RIDE.
Parallel Interactive Computing with PyTrilinos and IPython Bill Spotz, SNL (Brian Granger, Tech-X Corporation) November 8, 2007 Trilinos Users Group Meeting.
Programming Models & Runtime Systems Breakout Report MICS PI Meeting, June 27, 2002.
Technical Road Map Morten Kromberg 0. 1 (Same Old) Focus Areas -Performance -(includes parallel computing) -Portability -(includes user interfaces) -Language.
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 4 – Thread Concepts Outline 4.1 Introduction 4.2Definition of Thread 4.3Motivation for.
Java Software Solutions Lewis and Loftus Chapter 14 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Advanced Flow of Control --
Concurrent Aggregates (CA) Andrew A. Chien and William J. Dally Presented by: John Lynn and Ryan Wu.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
CS 346 – Chapter 4 Threads –How they differ from processes –Definition, purpose Threads of the same process share: code, data, open files –Types –Support.
Software Construction Lecture 18 Software Testing.
Issues Autonomic operation (fault tolerance) Minimize interference to applications Hardware support for new operating systems Resource management (global.
COMPUTER PROGRAMMING. Iteration structures (loops) There may be a situation when you need to execute a block of code several number of times. In general,
CUDA - 2.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Fortress John Burgess and Richard Chang CS691W University of Massachusetts Amherst.
Graphene So what’s the most efficient way to spam all your Facebook friends? Team Adith Tekur (System Architect/Tester) Neha Rastogi (System Integrator)
Message-Passing Computing Chapter 2. Programming Multicomputer Design special parallel programming language –Occam Extend existing language to handle.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Concurrency & Dynamic Programming.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Exceptions in C++. Exceptions  Exceptions provide a way to handle the errors generated by our programs by transferring control to functions called handlers.
Fall 2008Programming Development Techniques 1 Topic 20 Concurrency Section 3.4.
Lecture 12  Namespaces  Exceptions  Type casting  Pre-processor directives.
Lecture10 Exception Handling Jaeki Song. Introduction Categories of errors –Compilation error The rules of language have not been followed –Runtime error.
Parallel Computing Presented by Justin Reschke
And other languages…. must remember to check return value OR, must pass label/exception handler to every function Caller Function return status Caller.
#DYNA16 vecdb The Dyalog Vector Database Workshop W2: Managing Data with Dyalog Morten Kromberg, CXO.
#DYNA16 Dyalog Version 15.0 Highlights Jay Foad, John Daintree Dan Baronet, Brian Becker Morten Kromberg.
APL TANNER SMITH ALEXA BREELANDTYLER SIMS. Overview  Functional Language  Named after the book A Programming Language  Paradigms:  Array, functional,
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Parallel Programming With Futures and Isolates Morten Kromberg, CXO.
Chapter 4 – Thread Concepts
16 Exception Handling.
Road Map - The User Experience
Chapter 4 – Thread Concepts
Indexer AKEEL AHMED.
Designing with Java Exception Handling
Pragmatic Functional and Parallel Programming
Jay Foad & Adám Brudzewsky
Webinar # April 2017 Isolates in the Cloud
MPI-Message Passing Interface
Name: Rubaisha Rajpoot
Module 10: Implementing Managed Code in the Database
Chapter 4: Threads & Concurrency
Introduction to Programming
Human Computer Interaction Lecture 14 HCI in Software Process
Presentation transcript:

New Language Features For Parallel and Asynchronous Execution Morten Kromberg Dyalog LTD Dyalog’13

Futures and Isolates Features which allow the user to explicitly express parallelism in a ”natural” way In the interpreter, futures and isolates enable coarse-grained ”task” parallelism –”coarse” = units of ~100ms or more In a compiler, futures can be used to express fine-grained, or ”data” parallelism Futures & Isolates3

Isolates An Isolate tastes, smells, looks like a Dyalog namespace, except that... Expressions executed in the isolate run in a separate process from the main interpreter thread (”in parallel”) Futures & Isolates4

Isolates in Action Futures & Isolates X←1 2 3 X←4 5 X←6 7 I3←¤¨3 ⍴⊂ '' I3.({+/ ⍵ ÷ ⍴⍵ }X) I3.X←(1 2 3)(4 5)(6 7)

Futures The result of an expression executed in an Isolate is a Future Futures can be passed as arguments to functions without blocking Structural functions can work on arrays containing futures without blocking Primitives which need to reference the value will block Futures & Isolates6

The Parallel Operator Monadic operator parallel ( ∥ ) derives a function which creates an empty isolate on the fly and executes the operand inside it (thus returning a future): sums←{+/ ⍳⍵ } ∥ ¨ ⍳ 100 ⍝ returns 100 ”futures” - IMMEDIATELY ⍴ sums ⍝ structural functions do not ”realize” futures 100 partitions←(25/ ⍳ 4) ⊂ sums ⍝ Also returns immediately ⍴ partitions ⍝ 4 partitions 4 ⍴ ¨partitions ⍝ Each containing 25 futures /+/ ∥ ¨partitions ⍝ 4 threads to do sums (blocks) (We used parallel threads to compute the end result) Futures & Isolates7

Demo Version 14.0 Implementation of ¤ and ∥ are APL models Futures & Isolates8 PrimitiveModel ¤isolate.New ∥ isolate.llEach

Isolate Design Issues How to share code between isolate(s) & parent? –Memory-mapped shared code file? How to share data? –Enhance memory-mapped files? –”Memcached” or other tools? How to call back to parent or to other isolates –Synchronization / threading / serialization Futures & Isolates9

Design Issues... Performance: Thread pooling / scheduling, interaction between futures & isolates Left argument to ¤ to specify WHERE to launch process? –On the cloud, in a cluster, etc Error handling / debugging –RIDE ”process manager” project... Futures & Isolates10

Goal Provide ”deterministic” parallelism in a form which integrates well with APL thinking Bang for the buck, here and now, for coarse grained (~100ms or more) parallelism Notation has potential to extend to compiled APL for fine-grained data parallel applications Futures & Isolates11

Credits Magic Namespaces: J Daintree & J Scholes Futures: J Foad APL Model: Phil Last Futures & Isolates12

In Dyalog v14.0 Partly Implemented in APL and labelled as ”experimental” –Somde details might change –Included in mainstream 14.0 to encourage customers to experiment with real applications It is a model, but please try it and give us feedback on features Futures & Isolates13