计算机应用 ›› 2014, Vol. 34 ›› Issue (4): 1014-1018.DOI: 10.11772/j.issn.1001-9081.2014.04.1014

• 先进计算 • 上一篇    下一篇

自动并行化中不规则循环的通信代码生成

傅立国1,2,姚远1,2,丁锐1,2   

  1. 1. 数学工程与先进计算国家重点实验室,郑州 450001
    2. 信息工程大学,郑州 450001;
  • 收稿日期:2013-09-29 修回日期:2013-12-16 出版日期:2014-04-01 发布日期:2014-04-29
  • 通讯作者: 傅立国
  • 作者简介:傅立国(1989-),男,山东沂水人,硕士研究生,主要研究方向:并行编译;
    姚远(1972-),男,河南开封人,教授,博士,CCF会员,主要研究方向:先进编译技术、高性能计算;
    丁锐(1985-),男,河南滑县人,博士,CCF会员,主要研究方向:并行编译。
  • 基金资助:

    “核高基”国家科技重大专项

Communication code generation for automatic parallelization of irregular loops

FU LiGuo1,2,YAO Yuan1,2,DING Rui1,2   

  1. 1. Information Engineering University, Zhengzhou Henan 450001, China
    2. State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou Henan 450001, China
  • Received:2013-09-29 Revised:2013-12-16 Online:2014-04-01 Published:2014-04-29
  • Contact: FU LiGuo
  • Supported by:

    National High Technology Research and Development Program

摘要:

不规则计算在大规模并行应用中广泛存在。在面向分布存储结构的自动并行化过程中,较难在编译时为不规则循环生成并行代码。并行代码中的通信代码对程序运行结果的正确性以及加速效果有着严重的影响。通过分析程序的数组重分布图,使用部分冗余的通信方式来维持不规则数组访问的生产者消费者关系,可以在编译时为一类常见的不规则循环自动生成有效的通信代码。该方法使用计算分解和数组引用的访问表达式求解不规则数组在各处理器的本地定义集作为通信的数据集,分析针对此类不规则循环划分的通信策略,继而生成相应的通信代码。实验测试的结果取得了预期的加速效果,验证了方法的有效性。

Abstract:

Irregular computing exists in large scale parallel application widely and the automatic parallelization on distributed memory is hardly to generate parallel code for irregular loops at compile-time. The communication code of the parallel code influences the correctness and the efficiency to the runout of the program. It could automatically generate useful communication code for a common class of irregular loops at compile-time by using the approach of partial communication redundancy, that needed analyzing the array redistribution graph of the program to maintain the producer-consumer relation of irregular array references. The approach searched the local definition set of the irregular array on each processor by computation decomposition and accessed expression of array references as the communication data set, then analyzed the communication strategies for such irregular loops and generated the corresponding communication code. The experimental results show the validity of the approach and the expectant speedup of test applications.

中图分类号: