Skip main navigation

Introduction to week 4

Watch Dr. Geert Jan Bex introducing week 4 of the course focus on professional tools (ARM DDT, ITAC and GDB) for debugging parallel programs.
9.2
In the last week’s section we discussed GDB and Valgrind for debugging serial code. And you already got some hands-on experience with those tools. Over time CPU architecture got more sophisticated, and in order to exploit that hardware we just have to turn to parallel programming, either using multiple threads on a single CPU or multiple processes distributed over many computer nodes, for instance using MPI. However, parallel programming is hard, and it actually opens its very own can of worms, unintented. Data shared between threads or processes, data access and execution have to be syncronised. On a more fundamental level, say bye-bye to the determinism.
67.7
You get “heisenbugs”: now you see the bug, and now you don’t. And that depends on the execution order. So, all this serves as even more motivation to use professional tools when debugging parallel code. DDT, which is a part of ARM Forge suit of parallel development tools, is such a debugger. It has a really nice graphical user interface and many features that make debugging parallel code a lot easier. To verify some MPI constructs, or figure out some problems with MPI communication, ITAC (Intel Trace Analyser and Collector tool) is quite valuable. And speaking of valuable, DDT and ITAC are actually commercial products, and the licenses are really, really expensive.
128.8
So, we’ll also revisit our good old friend GDB and see what it can do for us in a parallel context. So, in this section you’ll see how to use DDT, ITAC and GDB to find bugs in parallel code effectively and efficiently.

Week 4 learning goals

During this week, you’ll learn about

  • Finding bugs in MPI code using a debugger,
  • Exploring data in MPI code,
  • Debugging OpenMP code,
  • Debugging hybrid MPI/OpenMP code,
  • Finding race conditions and deadlocks in OpenMP code using runtime verification tools,
  • Finding deadlocks and other problems in MPI code using runtime verification tools.
This article is from the free online

Defensive Programming and Debugging

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education