Choosing a Small, Representative Data Set for the Correctness Tool

When using the Correctness tool, Intel recommends that you use a Debug configuration build. Visual Studio allows different build configurations to set unique values for the properties. By using #ifdef preprocessor directives in your source code and modifying your project's Debugging properties, you can set up your application to control how your program behaves, so that:

  • A Release build behaves like a full customer workload.
  • A Debug build behaves like a small testing workload.

When you run the Correctness tool, it executes the target against the supplied data set. If you supplied a full data set for the Correctness tool, this would require a runtime of 50 to several hundred times longer than the normal execution time of the target executable.

Data set size and workload have a direct impact on target execution time and analysis speed.

For example, it takes longer to process a 1000x1000 pixel image than a 100x100 pixel image. A possible reason: You may have loops with an iteration space of 1...1000 for the larger image, but only 1...100 for the smaller image. The exact same code paths may be executed in both cases. The difference is the number of times these code paths are repeated.

You can control analysis cost without sacrificing completeness by minimizing this kind of unnecessary repetition from your target's execution.

Instead of choosing large, repetitive data sets, choose small, representative data sets that fully create tasks with minimal to moderate work per task. Minimal to moderate means just enough work to demonstrate all the different behaviors a task can perform.

Your objective: In as short a runtime period as possible, execute as many paths and the maximum number of tasks (parallel activities) as you can afford, while minimizing the repetitive computation within each task to the bare minimum needed for good code coverage.

Data sets that run in about ten seconds or less are ideal. You can always create additional data sets to ensure all your code is checked.

To modify the input data set in Visual Studio, do one of the following:

  • Specifying Properties for the project or configuration. For example, right-click the startup project's name to display the context menu:
    1. Choose Properties > Configuration properties > Debugging.
    2. Select the type of configuration this change will apply to by selecting the type under Configuration, such as Active(Debug), Debug, Release, or All Configurations. By default, properties for Debug and Release configuration are maintained separately.
    3. Edit the Command Arguments to select the appropriate data set.
    4. Click OK.
  • Specifying a different startup project that already has a reduced data set.
  • Modifying the program's sources (perhaps using #ifdef directives) and rebuilding the target.


If you run this configuration often, consider creating a new configuration perhaps called Correctness for this small data set.

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