Data Visualisation

Data Visualisation

Figure 2
Figure 2

Guard supports three approaches to the reporting of differences: text, bitmaps, and advanced visualization techniques through external visualisation utilities. Text output is the simplest; the actual values and differences are printed on standard output.

The second approach is more suited to array comparisons, where text output may be excessive. In this case, only two values are printed: the maximum difference between corresponding array elements, and the total cumulative difference between all elements. Most of the information is reported in a rectangular bitmap displayed on the screen. In this bitmap, white pixels denote values that are the same, and black pixels denote values that are different. This simple array visualization is particularly useful for detecting erroneous loop bounds and addressing expressions, because these types of error tend to generate regular patterns on the display. An example of such a visualisation in shown in Figure 2. In this case, a number of columns of the two arrays differ, and this is clearly seen as a black stripe on the right hand side of the array visualisation. Arrays with more than two indices can be folded onto two dimensions using a number of standard techniques.

Figure 3
Figure 3

The most powerful technique supported by Guard involves the use of commercial data exploration and visualization software such as IBM's Data Explorer (DX). A complete set of differences can be saved to a file using a parameter on the assert command. Values from the file can then be displayed using DX. This use of advanced visualization techniques is well suited to the display of differences in arrays with more than two dimensions. Animations can be used to convey the development of differences as the two programs execute. Figure 3 and 4 show a few examples of the visualisation of errors using DX. In both of these cases an error surface is plotted which shows the regions of three dimensional space in which the error exceeds a threshold. For example, in Figure 3 the difference between the temperature variable is shown in red when it exceeds 0.1% relative error.

Figure 4
Figure 4

In figure 4, the red region indicates where error exceeds 10%, and the yellow region indicates where the error exceeds 5%. This image shows that the error only occurs in half of the space, which corresponds to a region which models the physics of pollution transport over land rather than water. The picture also shows that the error is transported vertically, implicating the physics code responsible for vertical advection. Displaying the error surface in this way provides a great deal of information about the potential source of the error, including its possible location. For example, the position of the error may exclude some routines of the code which do not manipulate that region of space.

Figure 5
Figure 5

More complex dynamic data strcutures can also be visualised. In Figure 5, we shows a set of particiles in a particle-in-cell code, and also show the pointer links between the particles. In this visualisation, the black links are where the pointer values are the same in the two codes, whereas the coloured ones are where they differ.

Figure 6
Figure 6

It is also possible to create movies that show the dynamic behaviour of the differences between data structures as the programs execute. Figure 6 shows the same iso surface information that appears in Figure 3, but it can be seen to evolve as the programs execute. Seeing this"evolution" can be very helpful in isolating errors.