如何使用 OpenMP 提高并行代码的性能

问题描述 投票:0回答:0

我正在使用 OpenMP 研究二维泊松方程并行求解器。求解器是使用逐点 Gauss-Seidel 和 Thomas 算法开发的。这些代码是在 GNU 编译器上执行的,没有使用 4 线程和 8 线程进行优化。对于 258 x 258 和 514 x 514 的网格大小,执行时间的减少非常小。

使用 Gprof 工具分析代码。据观察,每个函数所花费的单独时间减少了,但总执行时间的减少并没有减少。 For 4 threads the flat profile isfor 8 threads the flat profile is。帮助我进一步提高代码的性能,并建议我使用开源工具及其教程或材料来提高性能。

parallel-processing openmp gnu poisson gprof
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.