• Keine Ergebnisse gefunden

4.4 Visual Simulation of Parallel Algorithms

4.4.3 Clustering approach

Our approach to reducing the effort required to design visual simulations for parallel algorithms is based on analysing a reasonable number of parallel algorithms and clustering them in respect to the effort required for the visualisation. All members of a cluster are, from a visualisation perspective, very similar and can be visualised in the same manner. Providing a visualisation of just any one, this visualisation can be adopted to derive new ones for all other members. Thus, the effort required to visualise the entire cluster is reduced to the work needed to implement one algorithm and adapting the implementation so that it fits to each of the remaining algorithms.

Although we considered all the following classes of algorithms, we examined the ones listed below bold.

• Matrix-Multiplication: (Matrix Vector Algorithm, Fox Algorithm, Can-non Algorithm, DNS Algorithm)

• Systems of Linear Equations: (Back Substitution, Gaussian Elimina-tion, Iterative Methods, Finite Difference Methods)

• Discrete Fourier Transformation: (FFT, Binary Exchange Algorithm, Trans-pose Algorithm )

• Sorting with Divide-&-Conquer: (Parallel Quicksort, Hyperquicksort, Sample Sort, Parallel Merge Sort)

• Dynamic Programming: (Warshall Algorithm, Floyd Algorithm, Global Pairwise Alignment, RNA Secondary Structure Prediction)

• Miscellaneous: (Prefix Evaluation Problem, Odd-Even Transposition Sort, Shearsort)

We chose these algorithms for the following reasons:

4.4. VISUAL SIMULATION OF PARALLEL ALGORITHMS 87

• The selected algorithms of the category “Sorting with Divide-&-Conquer” use sophisticated communication routines, such as BCast, Gather and Scan. This allows for a visual illustration of these forms of communication.

• The algorithms Fox, Cannon, Warshall, Floyd, Back Substitution, and Gaus-sian Elimination cover several aspects of data decomposition and mapping.

• The Matrix-Vector Algorithm combines sophisticated communication routines with elaborate decomposition and mapping.

• The Prefix Evaluation Problem on the one hand, and the Odd-Even Trans-position Sort and Shearsort on the other, use a binary tree and a mesh as communication patterns, respectively.

Thus, the selection allows for a demonstration of many visualisation aspects of parallel algorithms.

Our investigation focuses on the visualisation aspects of the algorithms. We examined how the visualisation of the data structures, the data decomposition and mapping, the communication patterns and the communication routines can affect the visualisation complexity.

All algorithms of the categories Matrix-Multiplication, Linear Systems and Dy-namic Programming use matrices as data structures. Thus, row-wise, column-wise and checkerboard decomposition are typical decomposition methods that can be used for all these algorithms except the Back Substitution algorithm, which uses diagonal decomposition. Similarly, the algorithms of the categories Sorting with Divide-&-Conquer, and Miscellaneous use arrays. These algorithms divide the ar-ray into blocks (subarar-rays) and distribute these subarar-rays among the processes.

As for communication routines, the choice of an appropriate communication routine for an algorithm strongly depends upon its design. We could not find any link between the utilised communication routine on the one hand and the used data or the type of the problem on the other. Both matrix-based and array-based

algorithms, e.g., use primitive and collective communication routines.

One can also observe that there is no connection between the data structures used and the communication routines. Algorithms that use matrices arrays apply the same communication routines.

The communication pattern employed depends in many cases on the underlying data structure and the applied data decomposition method. A matrix-based algo-rithm uses row-wise or column-wise decomposition and one-dimensional mesh as communication pattern. If the data in the matrix is partitioned using checkerboard decomposition, the utilised communication pattern is a two-dimensional mesh. This was noticed, e.g., in the categories Matrix-Multiplication and Sorting with

Divide-&-Conquer. The communication pattern of Fourier Transformation, Hyperquicksort and the Prefix Evaluation Problem, however, are determined independently of the data structures. These algorithms use a butterfly network, hypercube and binary tree, respectively.

Examining the algorithms from a visualisation perspective has revealed the fol-lowing:

• The visualisation complexity highly depends upon the data structure rather than the communication pattern, or the communication routines.

• As the data decomposition is dependent upon the data structure, its visuali-sation is dependent, accordingly, on the visualivisuali-sation of the data structure.

• Since any communication pattern can be modelled as a graph and because the visualisation of any graph does not present a huge challenge, communication patterns do not considerably affect the visualisation complexity.

• The visualisation of the communication routines can be basically accomplished by drawing the path which the data travels towards its destination processes.

Hence, the visualisation of the communication routines does not considerably affect the overall complexity of the visualisation.

4.4. VISUAL SIMULATION OF PARALLEL ALGORITHMS 89 Based on these observations, four clusters were constructed (see Table 4).

Cluster Algorithm(s)

Table 4: Clustering of the investigated algorithms

The Matrix-Algorithms cluster encompasses algorithms that use a matrix as a data structure.

The second cluster includes algorithms which operate on arrays. These algo-rithms use one-dimensional meshes and block decomposition.

The last two clusters contain one algorithm each. None of these analysed al-gorithms can be assigned to any of the first clusters. They apply specific data structures that are not used by any of the remaining algorithms.

By using this clustering strategy, we have successfully created effective visualisa-tions of the algorithms presented in this section with little effort. The clustering of similar algorithms has proven to greatly facilitate the visualisation process. When we compare how much effort usually needed to visualise each algorithm separately to the effort required to implement our approach, one can see that our method has significantly reduced the work needed to implement this rather complex group of al-gorithms. This approach is not restricted to a particular class of parallel algorithms, but can be applied to arbitrary classes as well.