Journal of Computer Applications ›› 2016, Vol. 36 ›› Issue (3): 628-632.DOI: 10.11772/j.issn.1001-9081.2016.03.628

Previous Articles     Next Articles

Graphics processor unit parallel computing in Matlab and its application in topology optimization

CAI Yong1,2, LI Sheng1   

  1. 1. School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;
    2. State Key laboratory of Advanced Design and Manufacture for Vehicle Body (Hunan University), Changsha Hunan 410082, China
  • Received:2015-06-01 Revised:2015-08-03 Online:2016-03-10 Published:2016-03-17
  • Supported by:
    This work is partially supported by the Key Project of National Natural Science Foundation of China (61232014) and the Open Fund of State Key Laboratory of Advanced Design and Manufacturing for Vehicle Body (31415007).

Matlab的图形处理器并行计算及其在拓扑优化中的应用

蔡勇1,2, 李胜1   

  1. 1. 北京大学 信息科学与技术学院, 北京 100871;
    2. 汽车车身先进设计制造国家重点实验室(湖南大学), 长沙 410082
  • 通讯作者: 蔡勇
  • 作者简介:蔡勇(1986-),男,湖南长沙人,博士,主要研究方向:基于图形处理器的通用并行计算、计算辅助工程;李胜(1974-),男,北京人,副教授,博士,CCF会员,主要研究方向:基于图形处理器的物理仿真、并行计算。
  • 基金资助:
    国家自然科学基金重点项目(61232014);湖南大学汽车车身先进设计制造国家重点实验开放基金资助项目(31415007)。

Abstract: The hardware cost of fast computing of structural topology optimization based on traditional parallel computing method is high and the efficiency of coding development is low. In order to solve the problems, an entire parallel computing method of Bi-directional Evolutionary Structural Optimization (BESO) based on Matlab and Graphics Processor Unit (GPU) was proposed. Firstly, the advantages, disadvantages and application range of three kinds of GPU computing methods used for GPU parallel computing in Matlab were discussed. Secondly, the built-in function was introduced to directly realize parallel computing of the math operations between vector and dense matrix, the MEX function was introduced to realize the fast computing of sparse finite element equations by CUSOLVER library, and the Parallel Thread eXecution (PTX) code was introduced to realize the parallel computing of the optimization decisions of the element sensitivity analysis and other decisions in the topology optimization. The numerical examples show that the GPU parallel computing program based on Matlab has a high coding efficiency, and can avoid the precision difference between the different programming languages. The GPU parallel computing program can ultimately achieve a considerable speedup with the same results.

Key words: parallel computing, Graphics Processor Unit (GPU), topology optimization, Matlab, finite element analysis

摘要: 针对传统并行计算方法实现结构拓扑优化快速计算的硬件成本高、程序开发效率低的问题,提出了一种基于Matlab和图形处理器(GPU)的双向渐进结构优化(BESO)方法的全流程并行计算策略。首先,探讨了Matlab编程环境中实现GPU并行计算的三种途径的优缺点和适用范围;其次,分别采用内置函数直接并行的方式实现了拓扑优化算法中向量和稠密矩阵的并行化计算,采用MEX函数调用CUSOLVER库的形式实现了稀疏格式有限元方程组的快速求解,采用并行线程执行(PTX)代码的方式实现了拓扑优化中单元敏度分析等优化决策的并行化计算。数值算例表明,基于Matlab直接开发GPU并行计算程序不仅编程效率高,而且还可以避免不同编程语言间的计算精度差异,最终使GPU并行程序可以在保持计算结果不变的前提下取得可观的加速比。

关键词: 并行计算, 图形处理器, 拓扑优化, Matlab, 有限元分析

CLC Number: