Tutorial: Where to Add Parallelism with Intel® Advisor 2015 and a C/C++ Sample
At this point, you would normally:
Rebuild the target in release mode.
Re-run the Suitability Report to see how your Correctness fixes impact the predicted maximum speedup.
Decide if the predicted maximum speedup benefit is worth the effort to add parallelism to your target.
If you decide to add parallelism to your target, you would:
Because we are trying to keep this tutorial short, we replaced Intel Advisor annotations with parallel framework code for you.
To explore how we made these replacements, just open the *.cpp file that interests you:
Parallel Framework |
File |
---|---|
Intel® Cilk™ Plus |
3_nqueens_cilk.cpp |
OpenMP* |
3_nqueens_omp.cpp |
Intel® Threading Building Blocks (Intel® TBB) |
3_nqueens_tbb.cpp |
The steps for replacing annotations with parallel framework code are fully explained in Intel Advisor Help.
If you also want to build a parallel version of a target in release mode - to, perhaps, compare actual parallel execution time to actual serial execution time - make sure you do the following:
For Intel Cilk Plus and Intel TBB targets: Build the target using an Intel compiler.
For Intel TBB targets: Define the TBBROOT environment variable.
In a terminal session, use an export command to identify the path of the installed Intel compiler files, including the tbb\ directory. For example, if you used the default path during installation, type export TBBROOT=/opt/intel/<composer-install-dir>/tbb.
After you convert Intel Advisor annotations to parallel framework code, test the resulting parallel application for correctness and verify its actual parallel performance using the Intel® Inspector and Intel® VTune™ Amplifier respectively.