Correctness and Threading

We have often stated the three main points of parallelism are: Correctness, Scalability, and Maintainability.    We are working to provide better tools to improve all three aspects of software development.  The other month I wrote about Intel Threading Building Blocks which helps provide an abstraction that helps with both maintainability and scalability.    I wonder how many of you are familiar with Intel® Thread Checker?    Intel Thread Checker analyzes software to check for common threading errors such as data races.   My team is looking at new formats to present much of the information we have.  In the spring I led  6 one hour webinars on a variety of threading topics.   This fall we are exploring some shorter videos.  For those interested in a short audiovisual presentation on Intel Thread Checker for Linux, follow this link:   /en-us/videos/introduction-to-intel-thread-checker-for-linux and skip this blog.   For those still reading Intel Thread Checker tracks every memory access and thread api to analyze for data races.  If it identifies memory references by multiple threads where at least one thread alters or writes to memory and there are no controls (e.g. mutex, or critical section) to protect the operations it recognizes this as a race condition.  Thread Checker reports all of these race conditions as diagnostics.   Sometimes I am asked what if a race doesn’t happen?  If the data set exercises the code path, then the race happens.   Just because the resolution of the race occurs in the order you expected doesn’t mean the race condition didn’t happen.  The race just didn’t have any ill effects.  Thread Checker doesn’t know which order of the operations you consider correct, it just points out that the operations are not protected correctly.   It is up to you the developer to select the best solution to eliminate the race.   As you would expect Intel Thread Checker is memory and compute intensive.   It helps find many latent thread issues that are difficult to find any other way.    Check out the 12 minute video on Intel Thread Checker for Linux.  Let me know if you like these shorter video segments.  Let me know if you have questions about Intel Thread Checker too.

For more complete information about compiler optimizations, see our Optimization Notice.