A new parallel environment for interactive simulations implementing safe multithreading with MPI

This work presents a new parallel environment for interactive simulations. This environment integrates a MPI-based parallel simulation engine, a visualization module, and a user interface that supports modification of simulation parameters and visualization at runtime. This requires multiple threads, one to execute the simulation or the visualization, and other to receive user input. Since many MPI implementations are not thread-safe, it is proposed a new parallel extension of the Python environment that uses UDP sockets in addition to the calls to the MPI library functions. This approach preserves interactivity, which is required to allow researchers to modify simulation parameters and to visualize results at runtime. The ADKS simulator was chosen as a case study. It is a sequential interactive software for molecular dynamics simulations used in the study of defects in solid materials. The simulation engine was parallelized using non-blocking communication and speedups very close to linear were obtained in the test cases. The proposed approach can be extended to be employed in high performance distributed computing.