【问题标题】:Using gprof with LULESH benchmark将 gprof 与 LULESH 基准测试一起使用
【发布时间】:2016-02-18 03:39:49
【问题描述】:

我一直在尝试编译和运行 LULESH 基准测试

https://codesign.llnl.gov/lulesh.php

https://codesign.llnl.gov/lulesh/lulesh2.0.3.tgz

使用 gprof 但我总是遇到分段错误。我在 Makefile 中更新了这些说明:

CXXFLAGS = -g -pg -O3 -I. -Wall 

LDFLAGS = -g -pg -O3

[andrestoga@n01 lulesh2.0.3]$ mpirun -np 8 ./lulesh2.0 -s 16 -p -i 10
--------------------------------------------------------------------------
mpirun noticed that process rank 2 with PID 30557 on node n01 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------

在 gprof 的网页中说:

如果您在支持共享的系统上运行程序 库中的分析支持代码可能会遇到问题 在该库完全被调用之前调用的共享库 初始化。这通常由遇到的程序检测到 运行时出现分段错误。解决方案是链接 针对包含分析的库的静态版本 支持代码,gcc 用户可以通过-static' or -static-libgcc' 命令行选项来完成。例如:

 gcc -g -pg -static-libgcc myprog.c utils.c -o myprog

我添加了 -static 命令行选项,但也遇到了分段错误。

我找到了一个 pdf,他们在其中通过添加命令行选项 -pg 更新 Makefile 来分析 LULESH。虽然他们没有说他们所做的改变。

http://periscope.in.tum.de/releases/latest/pdf/PTF_Best_Practices_Guide.pdf

第 11 页

有人可以帮帮我吗?

最好的,

【问题讨论】:

  • 如果你发布一个堆栈跟踪可能会有所帮助。
  • 谢谢!如何生成堆栈跟踪?
  • 确保您的ulimit 设置正确(例如ulimit -c unlimited),然后运行gdb prog core,然后运行where
  • 抱歉,我没有使用 ulimit 或 gdb 的经验。 ulimit在哪一部分设置?
  • 我在终端“ulimit -c unlimited”中运行,然后运行我的程序并生成这些文件:core.6493 core.6495 core.6494 core.6496。然后我运行“gdb prog core”并得到“prog:没有这样的文件或目录。/home/andrestoga/LULESH/lulesh2.0.3/core:没有这样的文件或目录。”然后是“where”,我得到了“(gdb) where No stack。”

标签: c++ gcc makefile gprof


【解决方案1】:

确保所有库都已加载:

  1. openmpi(你已经完成了)
  2. 海合会

您可以尝试使用参数来确定问题是否出在您的机器上。如果机器不支持这样数量的进程,通过查看架构拓扑来查看它支持多少进程(MPI 或非 MPI)。这将允许您确定可以在系统中启动的正确数量的作业/流程。

跑得很快:

mpirun -np 1 ./lulesh2.0 -s 1 -p -i 1

Running problem size 1^3 per domain until completion
Num processors: 1
Num threads: 2
Total number of elements: 1

To run other sizes, use -s <integer>.
To run a fixed number of iterations, use -i <integer>.
To run a more or less balanced region set, use -b <integer>.
To change the relative costs of regions, use -c <integer>.
To print out progress, use -p
To write an output file for VisIt, use -v
See help (-h) for more options

cycle = 1, time = 1.000000e-02, dt=1.000000e-02
Run completed:  
 Problem size        =  1 
 MPI tasks           =  1 
 Iteration count     =  1 
 Final Origin Energy = 4.333329e+02 
Testing Plane 0 of Energy Array on rank 0:
    MaxAbsDiff   = 0.000000e+00
    TotalAbsDiff = 0.000000e+00
    MaxRelDiff   = 0.000000e+00


Elapsed time         =       0.00 (s)
Grind time (us/z/c)  =        518 (per dom)  (       518 overall)
FOM                  =  1.9305019 (z/s)

【讨论】:

    猜你喜欢
    • 2011-01-18
    • 2010-10-29
    • 1970-01-01
    • 2014-05-25
    • 2011-02-26
    • 1970-01-01
    • 2012-05-10
    • 1970-01-01
    • 2010-11-14
    相关资源
    最近更新 更多