Graphical Interface and Solver Communication Architecture in CMPS
November 19, 2024
In this article, I would like to discuss the interface and solver communication architecture of the CMPS software, which we are currently developing. This system aims to provide an efficient connection between a user-friendly interface and the solver running in the background, which is crucial for both user experience and performance.
When developing CMPS, our primary goal was to make computational fluid dynamics (CFD) analyses as accessible and flexible as possible. In this context, the communication between the graphical user interface (GUI) and the solver plays a critical role. The seamless and fast transfer of user-defined parameters to the solver, as well as the meaningful and instant display of solver results on the GUI, significantly enhance the user experience.
Communication Architecture in CMPS
For the communication architecture in CMPS, we adopted asynchronous messaging and data transfer methods. To reduce the workload between the solver and GUI, these two components operate on separate processors and communicate through message queues. This architecture ensures that users can continuously monitor the analysis process without experiencing any lag or freezing in the user interface. Particularly, the data from the solver is displayed interactively and in real time on the GUI, with features such as contour plots and flow lines.
Summary of the Architecture
This architecture can be summarized as follows:
Communication across three groups of processes:
The GUI can manage multiple simulations (referred to as "cortexes") and send/receive data to/from them. For instance, one simulation might run on your local machine while another is on a remote parallel computing system.
Network-agnostic operation:
These three groups of processes can operate over any network. For example, the GUI might run on a desktop at home, the cortex on a remote server, and the computational nodes on a cluster system.
Compatibility with all cluster and cloud computing methods:
The architecture is designed to work seamlessly with various cluster and cloud computing approaches.
Real-Time Data Processing
Is real-time data processing possible?
With the appropriate hardware, we have made this achievable at the software level. This requires transmitting millions of data points from computational nodes to the GUI and post-processing units. Currently, almost all known fastest methods are supported by MPI (Message Passing Interface) libraries. Therefore, MPI is used in the background whenever possible. In other cases, the system switches to optimized communication protocols. For example:
If hardware like InfiniBand is available, it is used automatically.
In other scenarios, the fastest TCP protocols are selected.
When applicable, DMA (Direct Memory Access) and shared memory can also be utilized.
Challenges
The solver's intensive computational operations had to be executed without disrupting the stability of the GUI. To achieve this, we effectively integrated multithreading approaches and asynchronous data transfer. This ensured a smooth user experience, enabling users to observe different stages of CFD analyses seamlessly.
Dr. BORA KALPAKLI