Intel Parallel Advisor Workflow David Valentine Computer Science Slippery Rock University.

Slides:



Advertisements
Similar presentations
1 Unit 02. Visual Studio Visual Studio.NET Creating Projects Project Anatomy Using the IDE Code Snippets.
Advertisements

Productivity Tools For SAS . SAS ® users today ASAP ™Enhancement complementSoft introduces ASAP ™ an innovative productivity tool for SAS ® Diagramming.
Code Composer Department of Electrical and Computer Engineering
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
UNIT 12 LO4 BE ABLE TO CREATE WEBSITES Cambridge Technicals.
Intel® performance analyze tools Nikita Panov Idrisov Renat.
2008 Physiological Measurements Focusing on measurements that assess the function of the major body systems 1.
Click to add your Title Click to Write your name. Make sure it looks like this. Author: Nancy Power Point.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Guide To UNIX Using Linux Third Edition
 Go to Control Panel of your System  Click on System and Security.
With Alex Conger – President of Webmajik.com FrontPage 2002 Level I (Intro & Training) FrontPage 2002 Level I (Intro & Training)
Presented by Brian Griffin On behalf of Manu Goel Mohit Goel Nov 12 th, 2014 Building a dynamic GUI, configurable at runtime by backend tool.
September 2008 IT Software Development Guide.
Introduction 01_intro.ppt
Project Source Code Structure and Build Process ● Remember consistency matters as source code structure, build process, and release processes are all intertwined.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
Scalable Game Development William Roberts Senior Game Engineer
Lesson 26: Preparing a Presentation. 2 Learning Objectives After studying this lesson, you will be able to:  Edit document properties  Create and print.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Programming with Visual C++ A short review of the process.
Website Editing From Gingerweb The Image Gallery.
Programming with Visual Studio 2005.NET A short review of the process.
Programming with Visual Studio.NET A short review of the process.
Eclipse and JUnit. Eclipse Terms The Workbench Perspective –Collection of editors and views –Exampes: Java Pers., Debugging Persp. Editors (create a file)
WDO-It! 102 Workshop: Using an abstraction of a process to capture provenance UTEP’s Trust Laboratory NDR HP MP.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
Module 8: Managing Software Distribution. Collections Packages Programs Advertisements Collections Packages Programs Advertisements How Software.
The Basics of Microsoft Word Getting Started and Formatting your paper.
CPS120: Introduction to Computer Science Compiling a C++ Program From The Command Line.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Web Page-Chapter 6 Forms. Inserting a Form  Display the Insert bar  Click the arrow to the right of the display category on the Insert bar and then.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
Cs423-cotter1 Windows Operating Environment. cs423-cotter2 Windows Operating Environment 32 bit operating environment – Windows XP Microsoft Visual Studio.net,.net2005,
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Open project in Microsoft Visual Studio → build program in “Release” mode.
GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July  Tucson, Arizona GDT Tips.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
1 Visual Studio 2005 Options for Debug Mode: C++, Fortran, Linker December 8, 2009 Intel Compiler Version
Tuning Threaded Code with Intel® Parallel Amplifier.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
EML 2023 – Modeling, Parts Lecture 1.1 –Configuring SolidWorks.
Using the HTML and CSS Validation Services
ASP.NET Web Controls.
CE-105 Spring 2007 Engr. Faisal ur Rehman
Important terms Black-box testing White-box testing Regression testing
Quick Start Guide for Visual Studio 2010
Important terms Black-box testing White-box testing Regression testing
Intel® Parallel Studio and Advisor
Visual Studio 2005 Options for Release Mode: C++, Fortran, Linker
1. Open Visual Studio 2008.
Microsoft Visual Studio
Founded in Silicon Valley in 1984
Title Learning activity – Hot Spot MONASH LIBRARY
ILogic What’s New.
To insert this slide into your presentation
To insert this slide into your presentation
To insert this slide into your presentation
Creating Reports.
To insert this slide into your presentation
To insert this slide into your presentation
To insert this slide into your presentation
To insert this slide into your presentation
To insert this slide into your presentation
Presentation transcript:

Intel Parallel Advisor Workflow David Valentine Computer Science Slippery Rock University

Parallel Advisor: the goal Find the sections of your application that, when parallelized, will give you the best performance gains and scalability, while maintaining correct results

Advisor Workflow (from.NET) “Open Advisor Work flow” Can also get here from Tools- Intel Advisor XE 2013-Open Advisor XE Workflow Simple, 5-step process -all analysis done on your serial code

Different Builds needed at Different Steps in the Workflow Workflow StageRelease BuildDebug Build Survey Target (Annotate Sources) Check Suitability XXX Check Correctness (Add Parallel Framework) XXX Release BuildOptions C/C++ > General tabDebug Info Format > Program Database (/Zi) Compiler: OptimizationOptimization > Maximize Speed (/O2) Inline Function Expansion > Only_inline (/Ob1) Compiler: Code GenerationRuntime Library > MultiThreaded DLL (/MD or /MDd) Linker OptionsGenerate Debug Info > Yes (/DEBUG)

Different Builds needed at Different Steps in the Workflow Workflow StageRelease BuildDebug Build Survey Target (Annotate Sources) Check Suitability XXX Check Correctness (Add Parallel Framework) XXX Debug BuildOptions C/C++ > General tabDebug Info Format > Program Database (/Zi) or (/ZI) Compiler > OptimizationDisabled (/Od) Code GenerationRuntime Library > Multi-Threaded DLL (/MD) or Multi-Threaded Debug DLL (/MDd) Linker > DebuggingGenerate Debug Info > YES (/DEBUG)

Work Flow Step 1: Survey Target This “hot spot” tool needs a “Release Mode” configuration along with Project Properties: – C/C++ General tab: Debug info to /Zi or /ZI Optimization: Max Speed /O2 & Only_Inline /Ob1 Code Generation: Runtime Library to Multi-threaded /MD or /MDd – Linker- Debugging set to YES (/DEBUG) Build Project Click “Collect Survey Data”

Look at Survey Report 100% of time spent in the loop in function trap. Double click to see the code involved.

Summary Report We can see all the time was spent in a single, time- consuming loop. We now have a target to parallelize.

Step 2: Annotate Source The Workflow Advisor gives us 5 tasks: 1.Specify the Intel Advisor XE Include directory a.I prefer to set.NET IDE for this. Tools-Options-Projects & Solutions-VC++ Directories- b.Then drop the box “Show directories for” to Include Files c.Browse to “C:\Program Files\Intel\Advisor XE 2013\include” 2.Include the annotation definitions a)Go to top of code (in #include’s) and right click b)Select Intel Advisor XE 2013 – Insert Annotation Definitions Reference and the #include will be inserted for you. 3.Specify the library name and directory

Checking Suitability 4.Insert the actual Annotations: highlight & rt-click ANNOTATE_SITE_BEGIN(MySite1); for(int i=1; i<numIntervals; i++) {//get the interior points ANNOTATE_TASK_BEGIN(MyTask1); x = xLo + i*width; area += f(x); ANNOTATE_TASK_END(MyTask1); } ANNOTATE_SITE_END(MySite1);

Checking Suitability 5.Rebuild project (Release configuration) The Survey & Suitability tools take RELEASE build The Correctness tool (when we get there) takes a DEBUG build.

Suitability Report We can almost double speed on dual core But the tasks are VERY small

Check Correctness Rebuild Project with Debug configuration a.Compiler: Debug (/Zi) b.Compiler: Optimization Disabled (/Od) c.Compiler: Code Generation Runtime Library (/MD or /MDd) d.Linker Debugging: Generate Debug info YES (/DEBUG) And KNOCK DOWN THE ITERATIONS!  Correctness takes a LONG LONG time

We find a data race error Each thread tries to update “area”; we have a data race. (There is also a bug in Advisor)

Fix data race with lock ANNOTATE_SITE_BEGIN(MySite1); for(int i=1; i<numIntervals; i++) {//get the interior points ANNOTATE_TASK_BEGIN(MyTask1); x = xLo + i*width; ANNOTATE_LOCK_ACQUIRE(&area) area += f(x);//add the interior value ANNOTATE_LOCK_RELEASE(&area) ANNOTATE_TASK_END(MyTask1); } ANNOTATE_SITE_END(MySite1);

Run Correctness again Clean bill of health!

Now add Parallel Framework #pragma omp parallel for default(none) \ //make newbie list ALL private(x) \//each thread has own x shared(numIntervals, xLo, width) \ //all share these reduction(+:area)//threads combine areas at end for(int i=1; i<numIntervals; i++) {//get the interior points x = xLo + i*width;//makes each iteration independent of others area += f(x);//add the interior value *** } Will also need to add: – #include – Properties-Configuration- C/C++ -Language-OpenMP Support > Yes

Watch it run! 100% core usage!

Now on to the Nifties… Please respect the work of colleagues DO NOT POST SOURCE CODE Give credit back to the authors DO NOT POST SOURCE CODE Feel free to tweak the assignments DO NOT POST SOURCE CODE