Research on Parallel Computing Algorithm of the Second Harmonic Generation Coefficients of Nonlinear Optical Crystals Based on MPI

The second harmonic generation (SHG) coefficients of nonlinear optical crystals play an important role in measuring the nonlinear optical properties of materials, but it is time-consuming to get the SHG coefficients by the theoretical calculation. In this paper, we proposed two sorts of parallel computing schemes for the SHG coefficients based on Message Passing Interface (MPI). If the amount of nodes is small, we will choose the the master slave model and statically allocated tasks, on the other hand, we will select the work pool mode for large amount of nodes, which can prevent the main node to suffer bottlenecks and get a sufficient load balancing. The experimental results show that with the master slave model, the efficiency reaches to 98% when using 4 nodes and declines with the nodes becoming large, while the work pool mode reaches the stable efficiency of 85% in the parallel computing with more than 24 processors.