arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2209.04317cs.DC
收藏

OpenMP环路变换和并行结构的能量效率评估

Energy-Efficiency Evaluation of OpenMP Loop Transformations and Runtime Constructs

Henrik Valter, Axel Karlsson, Miquel Pericàs

摘要:

OpenMP是HPC应用程序中并行编程的事实上的API。这些程序通常在数据中心计算,其中能源消耗是一个主要问题。虽然以前的工作几乎完全集中在性能上,但我们在这里从能源消耗的角度分析了OpenMP的各个方面。通过在数据中心节点上执行新颖的微基准测试和通用基准测试套件并测量能耗来完成此分析。三个主要方面进行了分析:直接生成的循环平铺和展开,并行循环和明确的任务,以及处理阻塞线程的政策。对于循环平铺和展开,我们发现,平铺可以产生显着的能源节省一些,主要是未优化的程序,而直接生成的展开提供了非常小的改进,在最好的情况下,并退化性能majorly在最坏的情况下。对于第二个方面,我们发现,并行循环产生更好的结果比明确的任务循环的情况下,两者都可以使用。这在更细粒度的工作负载中变得更加突出。对于第三个,我们发现,显着的节能可以通过不去同步等待线程,而是让他们旋转,在一个更高的功耗为代价。我们还分析了编译器的选择如何影响上述问题,通过编译程序与ICC,Clang和GCC,并发现,虽然没有严格优于其他人,他们可以产生非常不同的结果相同的编译程序。作为最后一步,我们结合所有结果的发现,并提出新颖的编译器指令以及有关如何减少OpenMP程序中能耗的一般建议。

英文摘要:

OpenMP is the de facto API for parallel programming in HPC applications. These programs are often computed in data centers, where energy consumption is a major issue. Whereas previous work has focused almost entirely on performance, we here analyse aspects of OpenMP from an energy consumption perspective. This analysis is accomplished by executing novel microbenchmarks and common benchmark suites on data center nodes and measuring the energy consumption. Three main aspects are analysed: directive-generated loop tiling and unrolling, parallel for loops and explicit tasking, and the policy of handling blocked threads. For loop tiling and unrolling, we find that tiling can yield significant energy savings for some, mostly unoptimised programs, while directive-generated unrolling provides very minor improvement in the best case and degenerates performance majorly in the worst case. For the second aspect, we find that parallel for loops yield better results than explicit tasking loops in cases where both can be used. This becomes more prominent with more fine-grained workloads. For the third, we find that significant energy savings can be made by not descheduling waiting threads, but instead having them spin, at the cost of a higher power consumption. We also analyse how the choice of compiler affects the above questions by compiling programs with each of ICC, Clang and GCC, and find that while neither is strictly better than the others, they can produce very different results for the same compiled programs. As a final step, we combine the findings of all results and suggest novel compiler directives as well as general recommendations on how to reduce energy consumption in OpenMP programs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑