作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2022, Vol. 48 ›› Issue (1): 155-162. doi: 10.19678/j.issn.1000-3428.0060569

• 先进计算与数据处理 • 上一篇    下一篇

一种针对线性循环结构的非线性静态调度策略

李亚朋1,2, 庞建民2,3, 徐金龙2,3, 聂凯2,3   

  1. 1. 郑州大学 中原网络安全研究院, 郑州 450001;
    2. 中国人民解放军战略支援部队信息工程大学数学工程与先进计算国家重点实验室, 郑州 450001;
    3. 中国人民解放军战略支援部队信息工程大学, 郑州 450001
  • 收稿日期:2021-01-12 修回日期:2021-03-02 发布日期:2021-03-05
  • 作者简介:李亚朋(1993-),男,硕士研究生,主研方向为高性能计算、编译优化;庞建民,教授、博士;徐金龙,讲师、博士;聂凯,博士研究生。
  • 基金资助:
    之江实验室重大科研项目“先进工业互联网安全平台”(2018FD0ZX01)。

A Nonlinear Static Scheduling Strategy for Linear Loop Structure

LI Yapeng1,2, PANG Jianmin2,3, XU Jinlong2,3, NIE Kai2,3   

  1. 1. Zhong Yuan Network Security Research Institute, Zhengzhou University, Zhengzhou 450001, China;
    2. State Key Laboratory of Mathematical Engineering and Advanced Computing, PLA Strategic Support Force Information Engineering University, Zhengzhou 450001, China;
    3. PLA Strategic Support Force Information Engineering University, Zhengzhou 450001, China
  • Received:2021-01-12 Revised:2021-03-02 Published:2021-03-05

摘要: 现有OpenMP调度策略通常采用动态策略处理程序中的线性循环结构,存在负载不均衡和调度开销大的问题。提出一种针对线性递增或线性递减循环结构的非线性静态调度策略Nonlinear_static。将线性循环负载均匀变化参数与总负载、负载峰值、线程数相结合构建调度模型,计算循环迭代在线程上的映射,使迭代块大小呈非线性递增或递减趋势。将线性循环的负载平均地分配在每个线程上,并在开源OMPi编译器中进行编码。在Adjoint Convolution、Compute Pots、Matrix Multiplication、Mandelbrot Set应用程序上进行多线程调度,实验结果表明,相比静态调度、动态调度、指导调度等策略,Nonlinear_static调度策略在处理线性循环结构时执行时间缩短了5%~10%,且具有无调度开销的优点。

关键词: OpenMP调度策略, 负载均衡, 调度开销, 静态调度, 线性循环

Abstract: The existing OpenMP scheduling strategies usually use a single dynamic scheduling strategy to deal with linear loops, leading to unbalanced loads and high scheduling overhead.To solve the problem, this paper proposes a nonlinear static scheduling strategy (Nonlinear_static) for linearly increasing or linearly decreasing loops. Nonlinear_static combines the loads of linear loops change parameter, and the total load, peak load as well as the number of threads to construct a scheduling model.The model is used to calculate the mappings of loop iterations on threads, making the value of iteration blocks increasing or decreasing nonlinearly.Nonlinear_static strategy distributes the values of nonlinearly iterative blocks to different threads, so that each thread gets the same load, and encode them in the open-source OMPi compiler.Multi-threaded scheduling is carried out on Adjoint Convolution, Compute Pots, Matrix Multiplication, Mandelbrot Set applications.The experimental results show that compared with the static scheduling strategy, dynamic scheduling strategy and guided scheduling strategy, the execution time of Nonlinear_static is reduced by 5%~10% for threads when dealing with linear loops.It also displays common advantages of static scheduling, such as zero scheduling cost.

Key words: OpenMP scheduling strategy, load balancing, scheduling overhead, static scheduling, linear loop

中图分类号: