2015-11-16 26 views
1

我一直在試圖編譯和運行LULESH基準使用gprof的與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 

[[email protected] 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

有人能幫助我嗎?

最佳,

+0

它可能會幫助,如果你發佈一個堆棧跟蹤。 – Jason

+0

謝謝!我如何生成堆棧跟蹤? – andrestoga

+0

確保您的'ulimit'設置正確(例如'ulimit -c unlimited'),然後運行'gdb prog core',然後運行'where'。 – Jason

回答

0

確保所有庫被加載:

  1. 了openmpi(你已經這樣做)
  2. GCC

可以用參數,可以讓你嘗試從資源角度確定問題是否屬於您的機器。如果機器不支持這樣的進程數量,通過查看體系結構拓撲,可以查看它支持多少進程(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)