Overview of Adding Parallelism

The best performance improvements from adding parallel processing (parallelism) to a program occur when many cores are busy most of the time doing useful work. Achieving this requires a lot of analysis, knowledge, and testing.

Because your serial program was not designed to allow parallel execution, as you convert parts of it to use parallelism, you may encounter unexpected errors that occur only during parallel execution. Instead of wasting effort on portions of a program that use almost no CPU time, you must focus on the hotspots, and the functions between the main entry point and each hotspot.

If you naively add parallelism to a program without proper preparation, unpredictable crashes, program hangs, and wrong answers can result from incorrect parallel task interactions. For example, you may need to add synchronization to avoid incorrect parallel task interactions, but this must be done carefully because locking overhead and serial synchronization can reduce the benefits of the parallelism.

Intel Advisor helps you:

  • Find the possible code regions where you could add parallelism.

  • Choose the code regions best-suited for parallelism. This includes measuring approximate parallel performance so you can experiment with different possible parallel code regions.

  • Find and eliminate potential data sharing problems before parallelism is introduced.

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