problem of running PG and SSSP
Hi.
There is a seg fault when I am running the SSSP for the data set:
p sp 5 10 a 1 2 5 a 1 3 27 a 1 4 45 a 1 5 32 a 2 1 5 a 2 3 53 a 3 1 27 a 3 2 53 a 4 1 45 a 5 1 32
The error message for SSSP is as follows: $ ./SSSP/test 1 0 ./datasets/test.mtx ./datasets/test.mtx
GPU 0 Tesla K40c has asyncEngineCount 2 15 start to add edge gp_array[0].replica_edge_index[0] = 10 total number of stored edges 10 num gpu:1 Segmentation fault (core dumped)
The error message for PG is as follows (different data set): ./MPG/test 1 0 /datasetpath/hollywood-2009.mtx_ud_gt_ /datasetpath/hollywood-2009.mtx_ud_gt_
GPU 0 Tesla K40c has asyncEngineCount 2 15 start to add edge gp_array[0].replica_edge_index[0] = 112751422 total number of stored edges 112751422 GPU 0 enter Segmentation fault (core dumped)
Is it because my data set is not formatted as required?
This is a more detailed description: After successfully built SSSP, I generated a small graph with 7 edges and 26 direct edges (with (u,v) and (v,u) redundant pairs):
p sp 7 26
a 1 2 3
a 1 3 2
a 1 4 1
a 2 1 3
a 2 3 2
a 2 5 4
a 3 1 2
a 3 2 2
a 3 4 1
a 3 5 2
a 3 6 3
a 4 1 1
a 4 3 1
a 4 6 2
a 4 7 2
a 5 2 4
a 5 3 2
a 5 6 1
a 5 7 2
a 6 3 3
a 6 4 2
a 6 5 1
a 6 7 3
a 7 4 2
a 7 5 2
a 7 6 3
command line is:
./test 1 0 small_graph small_graph
cuda-gdb output is: (cuda-gdb) set args 1 0 small_graph small_graph (cuda-gdb) r Starting program: /data/Compare/Medusa/Medusa_New/Medusa_Forked/SSSP/./test 1 0 small_graph small_graph [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff5d5b700 (LWP 12947)]
GPU 0 Tesla K40c has asyncEngineCount 2 15 [New Thread 0x7ffff555a700 (LWP 12948)] start to add edge gp_array[0].replica_edge_index[0] = 26 total number of stored edges 26 num gpu:1 GPU 0 enter edge array built for GPU 0 Host data structure created InitHostDS Done Medusa Set SSSP Root: set 2(degree:5) in partition 0 async stream created for GPU 0 sync stream created for GPU 0 @@@@edgeArray.size = 26 @@@@vertexArray.size = 7 *** Error in `/data/Compare/Medusa/Medusa_New/Medusa_Forked/SSSP/./test': malloc(): memory corruption: 0x0000000005458e10 ***
So the error was likely to have happened here: https://github.com/JianlongZhong/Medusa/blob/master/MultipleGPU/MultiPublicAPI.h#L172
L172 does not seem to have any problem unless there is a change in the way how to copy data to constant memory. Could you add exit(0) after L172 to make sure it's indeed this line causing the crash (if it does not crash, then it's somewhere else)?
I added exit(0) after that line and it still crashes before the exit(0). So it might be that line of code. Let me switch back to CUDA 7.5 and see if that could solve the issue. Stay tuned.
I switched to CUDA 7.5 and it worked! For now I will just use CUDA 7.5 to generate our results I guess. Thanks for your help @kongfujianlong !
@yzhwang No problem. If you made any change to make Medusa work in higher CUDA versions, you are welcome to send a pull request:-)
Will take a look at the problem after the journal paper deadline. Will submit a pull request if I figure out a way to fix this :-)