VivaMP - a tool for OpenMP
- OpenMP parallel programming technology: advantages and disadvantages
- A tool for supporting OpenMP-solution developers
- Advantages of static analysis over other methods of searching parallel errors
At present, Viva64 and VivaMP software products are included in PVS-Studio as parts of it and are no longer distributed as separate applications. Please use PVS-Studio program to obtain the necessary possibilities of code verification.
|OpenMP support in PVS-Studio had been dropped after version 5.20. If you have any questions, feel free to contact our support.|
The tool for programmers VivaMP is intended for helping OpenMP-based parallel software developers. The article gives a brief description of the program product.
The modern processor (whether in a desktop or in a laptop) has several cores. Most often there are two cores and more rarely three or four. But very soon even eight cores in a usual desktop computer will be a common thing. That's why the most progressive software developers start thinking right now how to make their programs parallel. That is how to load all the available processor's cores. And although it would be an absolutely correct solution to develop a new parallel version of the program product, it is actually the existing sequential version that is usually "parallelized". There are many different parallel programming technologies but we are interested first of all in OpenMP technology as the most promising for systems with common memory, that is the most promising for paralleling programs intended for desktop computers. It allows you to make the existing program parallel by rewriting its separate sections. All this seems (and actually is) very attractive to developers but here we face a problem. Support of OpenMP technology is implemented in existing developing means so that it is very easy to make errors which are not diagnosed . Because of this developing OpenMP-solutions becomes even more complicated.
To make the process of developing OpenMP-solutions less complicated OOO "Program Verification Systems" creating program products in the sphere of code analysis has developed the program product VivaMP.
VivaMP is a C/C++ code analyzer intended for searching errors in existing OpenMP-programs and for simplifying the process of developing new OpenMP-programs. If there are errors in a parallel program which cannot be diagnosed by the compiler VivaMP will find them. After that the developer can easily correct these errors using the Help system embedded into VivaMP.
Technically, VivaMP tool is implemented as an add-in module (AddIn) for Visual Studio 2005/2008 (figure 1).
Figure 1 - VivaMP tool is embedded into Microsoft Visual Studio 2005/2008 environment
After testing a separate file, project or whole solution the analyzer prints the list of potential errors the developer should look through into Error List. You can get information on each error in the Help system integrating into MSDN.
VivaMP tool allows you to:
- find old errors in existing OpenMP-solutions;
- detect errors in new OpenMP-solutions being developed;
- get information on correcting errors in the Help system;
- increase performance of OpenMP-based solutions;
- investigate most of the possible errors in OpenMP-solutions using both the documentation and the demo-program ParallelSample attached to the VivaMP distribution kit.
The stated ways of using VivaMP make this tool useful both for first-time OpenMP-programmers and their more experienced colleagues.
VivaMP tool is a static code analyzer. This means that unlike dynamic analyzers it doesn't require launching the program being tested to detect errors, and the result of the static analyzer's work doesn't depend on the execution environment. Static analysis allows you to test the code which receives control rarely or which is executed when processing rare errors.
Verification of parallel programs with the help of static analysis method is considered to be difficult and ineffective as it is impossible to detect errors occurring when different program parts interact. But in case of OpenMP technology you can effectively use static analysis. It is because of OpenMP technology's "local" character. As a rule, parallel code in programs is gathered in one place and this helps perform detailed static analysis for detecting errors. To learn more about this subject see the article "Testing parallel programs" .
If you develop parallel programs using OpenMP technology you need to get acquainted with VivaMP tool. It will help you make development of OpenMP-solutions much simpler and quicker.