Performance and Optimization

Before I jump into the results, I would like to provide some insights into the typical process of performance optimization of a code. Performance analysis involves

For example, we have three functions in our code –

Finding the Bottleneck

Profiling showed that for most applications the pressure solver in

Optimizing the Solver

Optimization is the second step towards improving the overall runtime of the code. While there are many techniques involved in optimizing a certain segment of the code, the most important ones for this development were:

- Optimizing vector-vector calculations
- Optimizing matrix-vector calculations
- Storing the sparse matrix in an efficient and compact way

Improvements in Runtime

Different tests were conducted after the optimizations were made. They are represented by the bar graphs below.

Figure 1. Computational time for a 1.3 million cell weir simulation with

In Figure 1, ITMIN is the minimum number of iterations of the pressure solver. Irrespective of the number of iterations there is a decrease in elapsed time compared to the original solver. But as the number of iterations increase, the performance gains are more significant. For ITMIN=10, the elapsed time has dropped down by more than 50%. Figure 2 shows some real-world applications where significant improvements in runtimes are observed.

Figure 2. Computational time comparisons for some typical real-world applications of

How Will Users Benefit?

Pressure solver is a critical component of the overall fluid dynamics equations solver because of its use in most CFD applications. Therefore, this new development in

Labels: CFD software, FLOW-3D Cast v4., FLOW-3D v11.1, GMRES, pressure solver, runtime improvements, software development, solver optimization