在对Ni-Cu二元合金进行三维模拟时采用了目前最有效的微观组织数值模拟方法—相场法.但是随着空间维数的增多,计算规模小、计算时间长、计算效率低成为突出的问题.为了解决以上问题,探讨基于MPI并行算法求解Ni-Cu二元合金自由生长的三维相场模型,分别采用MPI中点对点通信和组通信对串行程序进行并行设计,并对2种通信模式的加速比进行比较.同时采用不同的划分方法对并行程序中计算域进行划分并比较并行效率.结果表明:MPI并行方法可以使计算规模扩大到1 000个×1 000个×500个网格;在规模相同的情况下,组通信的加速比相对串行程序最高可以达到15.45倍,要高于点对点通信的10.06倍最高加速比;无论计算规模大小,点对点通信均适用,组通信由于数据缓存区的限制,不适用于计算规模较大的情况;面向行划分方式的计算效率和安全性均高于面向块划分方式.
The most effective method at present for numeric simulation of microscopic structure is used for three-dimensional simulation of binary Ni-Cu alloy. But with the increase of the space dimension, the small scope of calculation, long computation time and low computation efficiency has become a prominent problem. In order to resolve foregoing problem, a three-dimensional phase-field model for solving free growth of Ni-Cu binary alloy with MPI parallel algorithm is explored. Parallel design of serial program is conducted by means of point-to-point communication and group communication, and the speedup ratio of the two communication modes is compared to each other. Meantime, the computation domain in parallel programs is divided with different division methods and the parallel efficiency is compared. The result shows that the MPI parallel method can make the size of computation increased to 1 000 gridsX 1 000 grids )〈 500 grids. Under the condition of the same computation size, the speedup ratio of group communication will amount at most to 15.45 times compared to serial program and 10.06 times higher than point-to-point communication. No matter how big or small the computation size is, the point-to-point communication will be applicable while the group communication due to the space limit of data buffer, will be unsuitable for calculation of larger data size. The computational efficiency and safety of line-oriented division mode will be higher than that of block-oriented division mode.