The CPU Sweetspot in CFD: Why Less is Sometimes More​

Comparte esta noticia:

In Computational Fluid Dynamics (CFD), complex simulations are used to mimic the intricate behaviour of fluids. By using CFD, organisations can trial and test different systems and processes to enhance both the economic and environmental sustainability of their operations. So, whether in anaerobic digestion plants to manage water flow or in oxygen distribution systems in aquaculture, we are using modelling and simulation to support clients around the world to reduce waste, reduce costs and improve their environmental impact.

However, CFD requires significant computational power and the scientists, mathematicians and engineers involved in the calculations must make careful decisions about the number of Central Processing Units (CPUs) to use, to allow for the most efficient parallel computing processes. As seen in Figure 1, we are looking for the optimal number of CPUs.

CPUS sweetspot

Figure 1. Graph showing the correlation between the number of CPUs utilized for the resolution of a CFD model through parallel simulation and the corresponding execution duration. 

A Central Processing Unit is the primary component in a computer (see Figure 2) that performs all computational tasks. In CFD, where the computational load of the calculations is very high, a higher number of CPUs must be used. At a basic level, smaller simulations will need fewer CPUs than larger, more computationally intensive simulations. However, as the number of CPUs increases, so does the need for communication and synchronisation between them and this process can ultimately reduce the speed and efficiency of the calculation process, as the time the CPUs spend communicating with each other outweighs the benefit of having more CPUs working on the calculations. It becomes a classic case of “too many cooks”.

CPUS

Figure 2. Computer motherboard with CPUs. Image by Racool_studio on Freepik. 

The optimal number of CPUs for a CFD simulation depends on various factors, including:

  • The number of elements in the domain (or cells in the mesh) in the CFD simulation
  • The type of equations that are being solved in the CFD simulation
  • The numerical configuration of the CFD simulation (including solver choice, time step size, required accuracy)
  • The hardware being used
  • The time and financial cost

The skill of the modelling team lies partly in being able to analyse all associated variables to identify the optimal number of CPUs. This analysis involves domain decomposition strategies, load-balancing algorithms and careful profiling of simulations. By understanding the scaling behaviour of their codes and the hardware characteristics of their systems, teams can optimise resource utilisation and achieve the best possible performance.

As the demand for high-quality CFD continues to grow, the pursuit of efficient and effective parallel computing will remain mission-critical. This means that the skill of finding the perfect balance between computational power and communication load will only become more important.

FAQs

 

1. What are some specific examples or case studies where finding the optimal number of CPUs for a CFD simulation led to significant performance improvements or cost savings?

In our experience we have found cases in which using a larger number of CPUs made the resolution of the simulation more time consuming and more expensive. By optimising the number of CPUs used, we found a 50% reduction in the computing time as well as a 60% reduction in the cost involved.

2. How does the choice of numerical algorithms or solvers used in the CFD simulation affect the optimal number of CPUs required for efficient parallel computing? 

The numerical algorithms and solvers employed in CFD simulations can have a significant impact on the optimal CPU count. For instance, certain iterative solvers may exhibit better parallel scaling than others, allowing for more efficient utilisation of larger numbers of CPUs. Similarly, algorithms with varying levels of data dependencies or communication patterns can influence the parallel efficiency and resource requirements. 

3. Are there any emerging hardware or software technologies that could help mitigate the communication overhead between CPUs in parallel computing, potentially allowing for more efficient scaling with larger numbers of CPUs? 

Emerging technologies like high-performance interconnects (such as Nvidia NVLink and Intel Omni-Path) and specialised communication accelerators (such as Nvidia GPUDirect) aim to reduce the overhead of CPU-to-CPU communication, potentially enabling more efficient parallel scaling across larger CPU counts. Additionally, software techniques like asynchronous communication and overlapping computation with communication can help mitigate communication bottlenecks in parallel computing applications like CFD.

Contenidos

Noticias relacionadas

Get to know the modeling and simulation industry with Modela’s whitepaper 

Leer más

Rheology: Understanding its importance for the biogas industry

Leer más