Presentation is loading. Please wait.

Presentation is loading. Please wait.

11 Software Solutions Group - Developer Products Division The Intel Parallel Inspector: Giving users more confidence in parallel software development Paul.

Similar presentations


Presentation on theme: "11 Software Solutions Group - Developer Products Division The Intel Parallel Inspector: Giving users more confidence in parallel software development Paul."— Presentation transcript:

1 11 Software Solutions Group - Developer Products Division The Intel Parallel Inspector: Giving users more confidence in parallel software development Paul Petersen January 30, 2009

2 2 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Agenda Introducing the Intel® Parallel Inspector Designing the Parallel Inspector UI issues in the Parallel Inspector Concluding thoughts and next steps

3 3 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Threaded development requires additional tools Common practice client parallel programming: –low-level –non-deterministic New challenges not addressed by current tools –Correctness –how will we eliminate new errors like deadlocks & data races? –Memory Leaks –how will we fix leaks and corruption in parallel code? –Scalability –how will software perform as cores increase? –Maintainability –how easy is the code to maintain as cores increase? Multi-core changes all the rules

4 4 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Parallel Composer –Code Parallel Inspector –Debug Parallel Amplifier –Tune

5 5 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. What is the Parallel Inspector? A dynamic analysis tool integrated with the Microsoft* Visual Studio designed to: –Find invalid memory accesses and leaks –Find unsynchronized data-races and deadlocks Focused on analysis of C++ applications compiled to native code Usable on standard application builds –Debug builds (preferable) –Release builds with symbols

6 6 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Designing the Parallel Inspector

7 7 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Common Infrastructure Boost: C++ Libraries –http://www.boost.org/http://www.boost.org/ Pin: A dynamic instrumentation toolkit –http://www.pintool.org/http://www.pintool.org/ Scons: A software construction tool –http://www.scons.org/http://www.scons.org/ TBB: Threading Building Blocks –http://www.threadingbuildingblocks.org/http://www.threadingbuildingblocks.org/ wxWidgets: cross Platform GUI Library –http://www.wxwidgets.org/http://www.wxwidgets.org/

8 8 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Analysis Engines Built Using Pin

9 9 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Types of Errors in Parallel Programs Compiler Syntax Errors –Usually localized “typos” –Inconsistency between use and definition Serial Execution Errors –Breakpoint debuggers are effective –Typically deterministic Parallel Execution Errors –Interactions on data between two or more threads –Cross function, file, or even module boundaries –Globally consistent solution usually required –Typically non-deterministic

10 10 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Relevant Microsoft* Windows APIs AllocateUserPhysicalPages FreeUserPhysicalPages MapUserPhysicalPages MapUserPhysicalPagesScatter HeapAlloc HeapCompact HeapCreate HeapDestroy HeapFree HeapLockHeap QueryInformation HeapReAlloc VirtualAlloc VirtualAllocEx NumaVirtualFree VirtualFreeEx GlobalAlloc LocalAlloc GlobalFree LocalFree GlobalLock LocalLock GlobalReAlloc LocalReAlloc GlobalUnlock LocalUnlock _calloc_dbg _expand _expand_dbg AcquireSRWLockExclusive AcquireSRWLockShared InitializeConditionVariable InitializeSRWLock ReleaseSRWLockExclusive ReleaseSRWLockShared SleepConditionVariableCS SleepConditionVariableSRW WakeAllConditionVariable WakeConditionVariable DeleteCriticalSection EnterCriticalSection InitializeCriticalSection InitializeCriticalSectionAndSpinCount InitializeCriticalSectionEx LeaveCriticalSection SetCriticalSectionSpinCount TryEnterCriticalSection CreateEventA CreateEventW CreateEventEx OpenEventA OpenEventW PulseEvent ResetEvent SetEvent InitOnceBeginInitialize InitOnceComplete InitOnceExecuteOnce InitOnceInitialize SetWaitableTimer InitializeSListHead InterlockedFlushSList InterlockedPopEntrySList InterlockedPushEntrySList QueryDepthSList RtlFirstEntrySList RtlInitializeSListHead RtlInterlockedFlushSList RtlInterlockedPopEntrySList RtlInterlockedPushEntrySList RtlQueryDepthSList ChangeTimerQueueTimer CreateTimerQueue CreateTimerQueueTimer DeleteTimerQueue DeleteTimerQueueEx DeleteTimerQueueTimer MsgWaitForMultipleObjects MsgWaitForMultipleObjectsEx RegisterWaitForSingleObject SignalObjectAndWait UnregisterWait UnregisterWaitEx WaitForMultipleObjects WaitForMultipleObjectsEx WaitForSingleObject WaitForSingleObjectEx WaitForTimerCallback CancelWaitableTimer CreateWaitableTimer CreateWaitableTimerEx OpenWaitableTimer

11 11 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. (and more) Relevant Windows APIs WaitMessage RtlUnwind RtlUnwind2 RtlUnwindEx RtlVirtualUnwind InterlockedCompareExchange InterlockedCompareExchange64 InterlockedCompareExchangePointer InterlockedDecrement InterlockedDecrement64 InterlockedExchange InterlockedExchange64 InterlockedExchangeAdd InterlockedExchangeAdd64 InterlockedExchangePointer InterlockedIncrement _free_dbg _malloc_dbg _realloc_dbg calloc free malloc Realloc CreateMutexA CreateMutexW CreateMutexEx OpenMutexA OpenMutexW ReleaseMutex CreateSemaphoreA CreateSemaphoreW CreateSemaphoreExt OpenSemaphoreA OpenSemaphoreW ReleaseSemaphore SetThreadpoolCallbackRunsLong SetThreadpoolThreadMaximum SetThreadpoolThreadMinimum SetThreadpoolTimer SetThreadpoolWait StartThreadpoolIo SubmitThreadpoolWork RegisterWaitForSingleObject UnregisterWaitEx SendMessageCallback SendMessageTimeout SendNotifyMessageA SendNotifyMessageW ConvertFiberToThread ConvertThreadToFiber ConvertThreadToFiberEx CreateFiber CreateFiberEx DeleteFiber FiberProc FlsAlloc FlsFree FlsGetValue FlsSetValue IsThreadAFiber SwitchToFiber CloseHandle DuplicateHandle GetHandleInformation SetHandleInformation BroadcastSystemMessage BroadcastSystemMessageEx GetMessageA GetMessageW PeekMessageA PeekMessageW PostMessageA PostMessageW PostQuitMessage PostThreadMessageA PostThreadMessageW RegisterWindowMessage ReplyMessageSendAsyncProc SendMessage

12 12 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Memory Access Error Detection

13 13 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Race Data Race Error Detection Happens-Before Thread #1 Thread #2 X=4 X=2X=3X=1 … X=1; LeaveCriticalSection( &cs ); X = 2; EnterCriticalSection ( &cs ); X = 3; …. … EnterCriticalSection( &cs ); X = 4; LeaveCriticalSection( &cs ); …

14 14 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Parallel Program Error Terminology Observation –An action that happened at a location, e.g. –The allocation of an object, or lock –A memory reference to an object –An acquisition of a lock Problem –Observations connected by a local relationship, e.g. –An uninitialized memory read –An out of order lock access –A data race Problem Set –A set of Problems that share an observation, e.g. –A group of unsynchronized memory references –The uninitialized read to objects from a specific allocation site –A deadlock cycle

15 15 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Global Relationships A link in the graph exists when an observation belongs to a problem O8 P5 P6 P1 P2 P3 P4 O1 O3 O4 O9 O6 O5 O2 O7 Observation #3 Problem #4 This generates a Problem Set Problems { P2,P5,P6 } Observations { O1,O2,O3,O4,O9 } Focus on #2

16 16 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. UI issues in the Parallel Inspector

17 17 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Leverage Visual Studio

18 18 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Configure Memory Error Detection

19 19 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Configure Threading Error Detection

20 20 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. During Execution: Event Log View

21 21 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Summarize with the Overview

22 22 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Explore with the Details View

23 23 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Sources View - Threading Errors

24 24 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Sources View – Memory Errors

25 25 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Concluding thoughts and next steps

26 26 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Conclusions The Intel Parallel Inspector establishes a safety-net to help increase the confidence in parallel software development The investment in the common infrastructure will be leveraged for enhancements and is available to researchers Many challenges remain: –Reducing overhead of analysis –Reducing required memory usage –Improving accuracy of results –Refining UI concepts –Extending to support more platforms

27 27 Software Solutions Group Developer Products Division Copyright © 2009, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners. Product Plans, dates, and specifications are preliminary and subject to change without notice. Intel Parallel Studio BETA – Sign up!


Download ppt "11 Software Solutions Group - Developer Products Division The Intel Parallel Inspector: Giving users more confidence in parallel software development Paul."

Similar presentations


Ads by Google