Parallel Computing with Matlab CBI Lab Parallel Computing Toolbox TM An Introduction Oct. 27, 2011 By: CBI Development Team.

Slides:



Advertisements
Similar presentations
Introduction to Grid Application On-Boarding Nick Werstiuk
Advertisements

MATLAB Parallel Computing Toolbox A.Hosseini Course : Professional Architecture.
Parallel Computing in Matlab
EHarmony in Cloud Subtitle Brian Ko. eHarmony Online subscription-based matchmaking service Available in United States, Canada, Australia and United Kingdom.
A Dynamic World, what can Grids do for Multi-Core computing? Daniel Goodman, Anne Trefethen and Douglas Creager
SALSA HPC Group School of Informatics and Computing Indiana University.
NODEMANAGER WEBLOGIC SERVER. 1.Creating logical machines 2.Using nodemanager for server startup and shutdown GETTING STARTED.
Setting up of condor scheduler on computing cluster Raman Sehgal NPD-BARC.
Introduction CSCI 444/544 Operating Systems Fall 2008.
Parallel Computing in Matlab An Introduction. Overview Offload work from client to workers Run as many as eight workers (newest version) Can keep client.
CompuNet Grid Computing Milena Natanov Keren Kotlovsky Project Supervisor: Zvika Berkovich Lab Chief Engineer: Dr. Ilana David Spring, /
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Parallel Computing with MATLAB
HPCC Mid-Morning Break Interactive High Performance Computing Dirk Colbry, Ph.D. Research Specialist Institute for Cyber Enabled Discovery.
18.337: Image Median Filter Rafael Palacios Aeronautics and Astronautics department. Visiting professor (IIT-Institute for Research in Technology, University.
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
Matlab ® Distributed Computing Server CBI Laboratory Release: R2012a Sept. 28, 2012 By: CBI Development Team.
Parallelization with the Matlab® Distributed Computing Server CBI cluster December 3, Matlab Parallelization with the Matlab Distributed.
© 2008 The MathWorks, Inc. ® ® Parallel Computing with MATLAB ® Silvina Grad-Freilich Manager, Parallel Computing Marketing
Connecting OurGrid & GridSAM A Short Overview. Content Goals OurGrid: architecture overview OurGrid: short overview GridSAM: short overview GridSAM: example.
ICOM 5995: Performance Instrumentation and Visualization for High Performance Computer Systems Lecture 7 October 16, 2002 Nayda G. Santiago.
 Introduction to Operating System Introduction to Operating System  Types Of An Operating System Types Of An Operating System  Single User Single User.
Hadoop/MapReduce Computing Paradigm 1 Shirish Agale.
03/27/2003CHEP20031 Remote Operation of a Monte Carlo Production Farm Using Globus Dirk Hufnagel, Teela Pulliam, Thomas Allmendinger, Klaus Honscheid (Ohio.
1 Dryad Distributed Data-Parallel Programs from Sequential Building Blocks Michael Isard, Mihai Budiu, Yuan Yu, Andrew Birrell, Dennis Fetterly of Microsoft.
Debugging and Profiling GMAO Models with Allinea’s DDT/MAP Georgios Britzolakis April 30, 2015.
Parallel Computing with MATLAB Jemmy Hu SHARCNET HPC Consultant University of Waterloo May 24,
1 © 2012 The MathWorks, Inc. Parallel computing with MATLAB.
Module 9: Preparing to Administer a Server. Overview Introduction to Administering a Server Configuring Remote Desktop to Administer a Server Managing.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
HYDRA: Using Windows Desktop Systems in Distributed Parallel Computing Arvind Gopu, Douglas Grover, David Hart, Richard Repasky, Joseph Rinkovsky, Steve.
MATLAB Harri Saarnisaari, Part of Simulations and Tools for Telecommunication Course.
Datasets on the GRID David Adams PPDG All Hands Meeting Catalogs and Datasets session June 11, 2003 BNL.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
The Alternative Larry Moore. 5 Nodes and Variant Input File Sizes Hadoop Alternative.
Processes Introduction to Operating Systems: Module 3.
Parallel Computing with MATLAB Jemmy Hu SHARCNET HPC Consultant University of Waterloo Feb. 1, 2012.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
11 CLUSTERING AND AVAILABILITY Chapter 11. Chapter 11: CLUSTERING AND AVAILABILITY2 OVERVIEW  Describe the clustering capabilities of Microsoft Windows.
CPSC 171 Introduction to Computer Science System Software and Virtual Machines.
Page 1 Printing & Terminal Services Lecture 8 Hassan Shuja 11/16/2004.
NGS computation services: APIs and.
© Geodise Project, University of Southampton, Workflow Support for Advanced Grid-Enabled Computing Fenglian Xu *, M.
Parallel Computing with MATLAB Modified for 240A UCSB Based on Jemmy Hu University of Waterloo
Scaling up R computation with high performance computing resources.
Geant4 GRID production Sangwan Kim, Vu Trong Hieu, AD At KISTI.
Enables businesses achieve greater efficiency by sharing data and processes Shared application data across legal entities – Party, Location, Products,
Using ROSSMANN to Run GOSET Studies Omar Laldin ( using materials from Jonathan Crider, Harish Suryanarayana ) Feb. 3, 2014.
INTRODUCTION TO HIGH PERFORMANCE COMPUTING AND TERMINOLOGY.
Compute and Storage For the Farm at Jlab
Matlab® Distributed Computing Server
The Distributed Application Debugger (DAD)
Understanding and Improving Server Performance
Experience of PROOF cluster Installation and operation
OGSA HPC cluster usecase for reference Model v.02
Module 9: Preparing to Administer a Server
Processes and threads.
Spark Presentation.
Tango Administrative Tools
NGS computation services: APIs and Parallel Jobs
Section 1: Introduction to Simics
Chapter 4: Threads.
Oct. 27, By: CBI Development Team
Multithreaded Programming
What’s New in Work Queue
Operating System Introduction.
Chapter 4: Threads & Concurrency
Module 9: Preparing to Administer a Server
Process Management -Compiled for CSIT
Presentation transcript:

Parallel Computing with Matlab CBI Lab Parallel Computing Toolbox TM An Introduction Oct. 27, 2011 By: CBI Development Team

Overview Parallel programming environment configuration modes of operation ( preferred modes ) Programming constructs Distributed Loop using parfor Single Program Multiple Data using pmode ( Similar to MPI paradigm ) Parfor performance analysis

Environment Starting Matlab ® from within CBI environment Code Development can also take place on any Matlab ® instance having access to the Parallel Computing Toolbox (tm)

Environment 2 main user workflows 1) Development & testing environment  Use Local Configuration for development & testing of code utilizing Parallel Computing Toolbox (tm) functionality(parfor, [spmd pmode]). 2) Running the PCT enabled developed code on Matlab ® Distributed Server Cluster  Use batch job submission to Distributed Server Cluster of the same Parallel Computing Toolbox (tm) enabled code. Same Code using parfor & spmd --> 2 running environments

Development Environment Validate the local configuration

Development Environment Check details, Find how many “workers” are available Since this is the local configuration, with a 4 core system, 4 workers can be used efficiently. ( Note: local config has a maximum of 8 workers ). We will use 5 workers on a 4 core system in later examples by changing the ClusterSize configuration parameter. In local mode, each worker(“lab”) maps to a different operating system Process. 1 through 8 Labs “Workers” available ( can be set up to 8 in local config)

Development Environment Testing & Development Modes Within the local development environment, constructs from the Parallel Computing Toolbox (tm) can be used in a few ways:  1) Command line ( e.g. parfor directly from command line )  2) Script( e.g. parfor from a.m file called from command line )  3) Function( e.g parfor from a.m function )  4) Pmode ( interactive command line ). This follows the single program multiple data paradigm. Pmode is equivalent to spmd construct. Key difference is that Pmode allows you to see the output of each lab interactively, whereas spmd construct does not. Communication between labs is allowed, similar to MPI.

Development Environment Command line ( e.g. parfor directly from command line ) tic matlab pool open local 4 n = 300 M = magic(n); R = rand(n); parfor i = 1:n for j = 1:10000 A(i) = sqrt(sum(M(i,:).*R(n+1-i,:))); end toc matlab pool close

Development Environment Command line ( e.g. parfor directly from command line ) tic Matlab® pool open local 4 n = 300 M = magic(n); R = rand(n); parfor i = 1:n for j = 1:10000 A(i) = sqrt(sum(M(i,:).*R(n+1-i,:))); end toc Matlab® pool close There must be enough work in the loop to overcome the creation of the pool of workers. ~ 38 seconds ( 1 worker) ~ 19 seconds ( 4 workers ) Note: If there is no Matlab ® pool open, parfor still works, it just uses only 1 worker. Workers are mapped to a separate Matlab ® process when running local configuration.

Development Environment (Interactive SPMD Mode: Pmode) Parallel Command Window vs Serial Command Window  User can observe all labs at once  Each lab maps to a separate process when running in local mode

Development Environment (Interactive Mode: Pmode) Each worker can process different parts of the data Data can be combined from all workers and then sent back to the client session for plotting

Development Environment (Interactive Mode: Pmode) Each worker only works on a piece of the matrix Results are gathered on lab 1 Client session requests the complete data set to be sent to it using lab2client

Preferred Work Environment Preferred method to develop code is running local. Preferred method to run code is batch mode. Same program using constructs from the Parallel Computing Toolbox(tm) will work in either local mode or batch mode in conjunction with the Distributed Compute Server.

Performance analysis & additional examples In local mode, the client Matlab® session maps to an operating system process, containing multiple threads. Each lab requires the creation of a new operating system process, each with multiple threads. Since a thread is the scheduled OS entity, all threads from all Matlab® processes will be competing for cores. Using the same number of labs as there are cores is recommended, but not more labs than available hardware cores.

Performance analysis & additional examples All the Parallel Toolbox constructs can be tested in local mode, the “lab” abstraction allows the actual process used for a lab to reside either locally or on a distributed server node.

Performance analysis & additional examples Process instantiation on local node carries overhead Why? 14 vs 24 vs 45 seconds While 4 local labs is better than 1 local lab, doing the work on the Matlab® client process was faster in this example, because there was not enough work to be done. Next example: Add more compute work per lab

Performance analysis & additional examples If there is enough computation, process instantiation overhead is overcome ( 48 seconds down to 26 seconds ) Process instantiation overhead quantification

Performance analysis & additional examples Performance Analysis: Different data sizes Different amounts of computation Different # of labs ( workers ) Hardware: 4 cores ClusterSize set to 5 to allow creating 5 labs on a 4 core system. ( The default is having ClusterSize = # of physical cores, with a limit of 8 in a local configuration )

Performance analysis & additional examples Performance Analysis: Different data sizes Different amounts of computation Different # of labs ( workers ) Hardware: 4 cores

Performance analysis & additional examples Performance Analysis: Different data sizes Different amounts of computation Different # of labs ( workers ) Hardware: 4 cores

Performance analysis & additional examples Performance Analysis: Different data sizes Different amounts of computation Different # of labs ( workers ) Hardware: 4 cores

Future Presentations Additional examples of parfor, and spmd construct After program is developed in local mode: Move to Batch mode Examples of batch mode Using the Distributed Compute Server Preferred development process examples Profiling parallel code( mpiprofile ) Data distribution strategies Inter-lab communication Compiling.m code for serial & parallel environment using Compiler Toolbox. GPU Matlab® Programming using GPU Toolbox.

CBI Laboratory Development team: Zhiwei Wang, Director David Noriega, Yung Lai, Jean-Michel Lehker, Nelson Ramirez

References (1) (2) (3) (4) (5) (6) _instructions.html (7) (8) (9)