1 Network Access to Charm Programs: CCS Orion Sky Lawlor 2003/10/20.

Slides:



Advertisements
Similar presentations
RPC Robert Grimm New York University Remote Procedure Calls.
Advertisements

XML in the real world (2) SOAP. What is SOAP? ► SOAP stands for Simple Object Access Protocol ► SOAP is a communication protocol ► SOAP is for communication.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Ameoba Designed by: Prof Andrew S. Tanenbaum at Vrija University since 1981.
Distributed components
The Museum Project The Museum Project Yoav Gvili & Asaf Stein Supervisor : Alexander Arlievsky.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
CSCI 4550/8556 Computer Networks Comer, Chapter 3: Network Programming and Applications.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Lesson 3 Remote Method Invocation (RMI) Mixing RMI and sockets Rethinking out tic-tac-toe game.
Fundamentals of Python: From First Programs Through Data Structures
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Installing Samba Vicki Insixiengmay Jonathan Krieger.
Windows Server MIS 424 Professor Sandvig. Overview Role of servers Performance Requirements Server Hardware Software Windows Server IIS.
Charm++ Load Balancing Framework Gengbin Zheng Parallel Programming Laboratory Department of Computer Science University of Illinois at.
1 LiveViz – What is it? Charm++ library Visualization tool Inspect your program’s current state Client runs on any machine (java) You code the image generation.
By: Joel Rodriguez.  International student from Mexico  Delicias, Chihuahua Mexico  Spanish  Sports and Music.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
1 3 Web Proxies Web Protocols and Practice. 2 Topics Web Protocols and Practice WEB PROXIES  Web Proxy Definition  Three of the Most Common Intermediaries.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
Flash Remoting Chafic Kazoun Senior Flash Developer - B-Line Express Work: Play:
SSC2: Web Services. Web Services Web Services offer interoperability using the web Web Services provide information on the operations they can perform.
1 I-Logix Professional Services Specialist Rhapsody IDF (Interrupt Driven Framework) CPU External Code RTOS OXF Framework Rhapsody Generated.
2005/03/03JSS Extension1/20 Java Serial Stream Adapter for IBM/Rational Robot & Test Manager © Zyntax Consulting BV.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
1 JavaScript. 2 What’s wrong with JavaScript? A very powerful language, yet –Often hated –Browser inconsistencies –Misunderstood –Developers find it painful.
CSCI 6962: Server-side Design and Programming Web Services.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Cli/Serv.: Chat/121 Client/Server Distributed Systems v Objectives –discuss a client/server based chat system –mention two other ways of chatting.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Concurrent Programming and Threads Threads Blocking a User Interface.
TCP Sockets Reliable Communication. TCP As mentioned before, TCP sits on top of other layers (IP, hardware) and implements Reliability In-order delivery.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
Chapter 4 Applets Cop Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your.
NetLogger Using NetLogger for Distributed Systems Performance Analysis of the BaBar Data Analysis System Data Intensive Distributed Computing Group Lawrence.
Ghost Elements. Ghost Elements: Overview Most FEM programs communicates via shared nodes, using FEM_Update_field Most FEM programs communicates via shared.
Parallelizing Spacetime Discontinuous Galerkin Methods Jonathan Booth University of Illinois at Urbana/Champaign In conjunction with: L. Kale, R. Haber,
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Charm++ Tutorial Presented by: Abhinav Bhatele Chao Mei Aaron Becker.
Implementation: Charm++ Orion Sky Lawlor
1 Charm++ Tutorial Parallel Programming Laboratory, UIUC.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Chapter 5: MULTIMEDIA DATABASE MANAGEMENT SYSTEM ARCHITECTURE BIT 3193 MULTIMEDIA DATABASE.
1 Charm++ Tutorial Parallel Programming Laboratory, UIUC.
1 Rocket Science using Charm++ at CSAR Orion Sky Lawlor 2003/10/21.
FlowLevel Client, server & elements monitoring and controlling system Message Include End Dial Start.
1 Charm++ Tutorial Parallel Programming Laboratory, UIUC.
Charm++ Tutorial Presented by: Lukasz Wesolowski Pritish Jetley.
1 Charm++ Tutorial Parallel Programming Laboratory, UIUC.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
JLink Linking Mathematica with Java and the other way round…
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
The Distributed Application Debugger (DAD)
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
The Object-Oriented Thought Process Chapter 14
LiveViz – What is it? Charm++ library Visualization tool
In-situ Visualization using VisIt
Parallel Objects: Virtualization & In-Process Components
Module 1: Getting Started
Screen shots – Load imbalance
Introduction of Week 5 Assignment Discussion
Presentation transcript:

1 Network Access to Charm Programs: CCS Orion Sky Lawlor 2003/10/20

2 Introduction Let’s say you’re running a week- long parallel simulation Say something goes wrong on day two Wouldn’t it be nice to be able to look at (diagnose), and interact with (fix) the job as it’s running? Hurdles: network protocol, firewalls, authentication,...

3 Our Solution Basic network protocol CCS- converse client/server Data to send NetFEM: current FEM mesh liveViz: 2D image of computation liveViz3d: 3D object view pieces Debugger: application state Appspecter: performance data

4 CCS Network Protocol

5 CCS: Converse Client-Server TCP-based protocol (like HTTP) Client sends request to server: String request name Binary request data Server sends binary response back Works even if client behind firewall Allows any sort of interaction Includes authentication component Cryptographic, based on SHA-1

6 CCS Network Protocol CCS Server Code 1.) Send request to server 3.) Send Response to Client Client/CCS Client Library Parallel Application 2.) Call appropriate request handler Request handler name and request data Response data Request data

7 CCS: Advantages Built into Charm++ Just run using “++server” option High performance 500us end-to-end over real networks Saturates fast ethernet Easy to use Register server routine from Charm program Sample client library available in both C and Java

8 NetFEM

9 NetFEM Client: pretty pictures Wave dispersion off a crack

10 NetFEM: Protocol Request/response very simple Give me the latest FEM mesh Here is the latest FEM mesh PUP based network-byte-order binary mesh format PUP_toNetwork4 NetFEM Server Library FEM Application NetFEM Client Request New mesh Response: New Mesh

11 NetFEM: Client Tcl/Tk user interface C++ VTK Visualization (OpenGL)

12 NetFEM: Application Side Can add to any program that deals with FEM meshes Easy to “publish” attributes: NetFEM n=NetFEM_Begin(2,t,NetFEM_POINTAT); NetFEM_Nodes(n,nnodes,(double *)g.coord,"Position (m)"); NetFEM_Vector(n,(double *)g.d,"Displacement (m)"); NetFEM_Vector(n,(double *)g.v,"Velocity (m/s)"); NetFEM_Elements(n,nelems,3,(int *)g.conn,"Triangles"); NetFEM_Scalar(n,g.S11,1,"X Stress (pure)"); NetFEM_Scalar(n,g.S22,1,"Y Stress (pure)"); NetFEM_Scalar(n,g.S12,1,"Shear Stress (pure)"); NetFEM_End(n);

13 LiveViz

14 LiveViz – What is it? Visualization tool Inspect your program’s current state Client runs on any machine (java) You code the image generation 2D and 3D modes

15 LiveViz – Monitoring Your Application LiveViz allows you to watch your application’s progress Can use it from work or home Doesn’t slow down computation when there is no client

16 Running LiveViz Build and run a server cd pgms/charm++/ccs/liveViz/pollserver Make./charmrun server ++server-port n

17 Running LiveViz Run the client cd pgms/charm++/ccs/liveViz/client./run_client [ [ ]] Should get a result window:

18 LiveViz Request Model LiveViz Server Library Client Parallel Application 1.) Get Image 3.) Poll for Request 4.) Poll Request Returns Work 5.) Image Chunk Passed to Library 6.) Send Assembled Image to Client 2.) Buffer Request

19 Main: Setup worker array, pass data to them Workers: Start looping Send messages to all neighbors with ghost rows Wait for all neighbors to send ghost rows to me Once they arrive, do the regular Jacobi relaxation Calculate maximum error, do a reduction to compute global maximum error If timestep is a multiple of 64, load balance the computation. Then restart the loop. Jacobi 2D Example Structure Main: Setup worker array, pass data to them Workers: Start looping Send messages to all neighbors with ghost rows Wait for all neighbors to send ghost rows to me Once they arrive, do the regular Jacobi relaxation Calculate maximum error, do a reduction to compute global maximum error If timestep is a multiple of 64, load balance the computation. Then restart the loop. Main: Setup worker array, pass data to them Workers: Start looping Send messages to all neighbors with ghost rows Wait for all neighbors to send ghost rows to me Once they arrive, do the regular Jacobi relaxation Calculate maximum error, do a reduction to compute global maximum error If timestep is a multiple of 64, load balance the computation. Then restart the loop.

20 #include void main::main(...) { // Do misc initilization stuff // Now create the (empty) jacobi 2D array work = CProxy_matrix::ckNew(0); // Distribute work to the array, filling it as you do } #include void main::main(...) { // Do misc initilization stuff // Create the workers and register with liveviz CkArrayOptions opts(0);// By default allocate 0 // array elements. liveVizConfig cfg(true, true);// color image = true and // animate image = true liveVizPollInit(cfg, opts);// Initialize the library // Now create the jacobi 2D array work = CProxy_matrix::ckNew(opts); // Distribute work to the array, filling it as you do } LiveViz Setup

21 Adding LiveViz To Your Code void matrix::serviceLiveViz() { liveVizPollRequestMsg *m; while ( (m = liveVizPoll((ArrayElement *)this, timestep)) != NULL ) { requestNextFrame(m); } void matrix::startTimeSlice() { // Send ghost row north, south, east, west,... sendMsg(dims.x-2, NORTH, dims.x+1, 1, +0, -1); }

22 Adding LiveViz To Your Code void matrix::serviceLiveViz() { liveVizPollRequestMsg *m; while ( (m = liveVizPoll((ArrayElement *)this, timestep)) != NULL ) { requestNextFrame(m); } void matrix::startTimeSlice() { // Send ghost row north, south, east, west,... sendMsg(dims.x-2, NORTH, dims.x+1, 1, +0, -1); } void matrix::startTimeSlice() { // Send ghost row north, south, east, west,... sendMsg(dims.x-2, NORTH, dims.x+1, 1, +0, -1); // Now having sent all our ghosts, service liveViz // while waiting for neighbor’s ghosts to arrive. serviceLiveViz(); }

23 Generate an Image For a Request void matrix::requestNextFrame(liveVizPollRequestMsg *m) { // Compute the dimensions of the image bit we’ll send // Compute the image data of the chunk we’ll send – // image data is just a linear array of bytes in row-major // order. For greyscale it’s 1 byte, for color it’s 3 // bytes (rgb). // The liveViz library routine colorScale(value, min, max, // *array) will rainbow-color your data automatically. // Finally, return the image data to the library liveVizPollDeposit((ArrayElement *)this, timestep, m, loc_x, loc_y, width, height, imageBits); }

24 OPTS=-g CHARMC=charmc $(OPTS) LB=-module RefineLB OBJS = jacobi2d.o all: jacobi2d jacobi2d: $(OBJS) $(CHARMC) -language charm++ \ -o jacobi2d $(OBJS) $(LB) –lm jacobi2d.o: jacobi2d.C jacobi2d.decl.h $(CHARMC) -c jacobi2d.C OPTS=-g CHARMC=charmc $(OPTS) LB=-module RefineLB OBJS = jacobi2d.o all: jacobi2d jacobi2d: $(OBJS) $(CHARMC) -language charm++ \ -o jacobi2d $(OBJS) $(LB) -lm \ -module liveViz jacobi2d.o: jacobi2d.C jacobi2d.decl.h $(CHARMC) -c jacobi2d.C Link With The LiveViz Library

25 LiveViz Summary Easy to use visualization library Simple code handles any number of clients Doesn’t slow computation when there are no clients connected Works in parallel, with load balancing, etc.

26 Conclusions CCS provides useful low-level network protocol High-level Charm++ libraries for use with CCS NetFEM, for FEM meshes LiveViz, for arbitrary images many others