Issues with cusp on connected components

56 views
Skip to first unread message

Dharini Jaiganesh

unread,
Jul 11, 2016, 12:42:40 PM7/11/16
to cusp-users
Hi,

I am trying to use cusp to calculate the number of connected components in large graphs. I am using csr file format to read matrix market graph files. I used the following lines to read graphs and calculate cc.

cusp::csr_matrix<int, int, cusp::device_memory> G;

cusp::io::read_matrix_market_file(G, filename);

size_t numparts = cusp::graph::connected_components(G, components);


However, I get different(no. of components) results when I run the code with same dataset on different runs.

Run1 -

command: ./cusp_cc_mtx in-2004.mtx 


output: Connected Components - [CUSP]

Input filename - in-2004.mtx

Number of Connected Components : 542


Run2 :

command: ./cusp_cc_mtx in-2004.mtx 


output: Connected Components - [CUSP]

Input filename - in-2004.mtx

Number of Connected Components : 526


Run3 :

command: ./cusp_cc_mtx in-2004.mtx 


output: Connected Components - [CUSP]

Input filename - in-2004.mtx

Number of Connected Components : 519


Also none of the output is correct as I verified it with a serial code. actual number of components for the above mentioned dataset is 134.

For some larger graphs, I am not able to run cusp. I get the following error,

"[/home/jayadharini/cusp/cusplibrary-0.5.1/cusp/system/cuda/detail/graph/b40c/graph/bfs/enactor_hybrid.cuh, 538] Frontier queue overflow.  Please increase queue-sizing factor.  (CUDA error 9: invalid configuration argument)"


Is there any limit on the input dataset's size?  I ran the cusp code for various datasets and I noticed that I get this error for datasets with large number of connected components. I am able to run it for larger datasets with less number of connected components. Please clarify!


Please view the version of cusp and cuda which I am using.


CUDA   v7.5

Thrust v1.8

Cusp   v0.5


Thanks!


Steven Dalton

unread,
Jul 11, 2016, 12:49:15 PM7/11/16
to cusp-...@googlegroups.com
Hello,

  I suspect the connected components counter is incorrect. Are you compiling for sm_50? There's an issue with Thrust reductions on sm_50 architectures using CUDA 7.5. If you have a developer account then upgrading to CUDA 8.0 also fixes the issue. Can you also try using the current development branch of Cusp? I committed some updates to fix issues related to the BFS implementation used as part of connected components computation. If the graph is small enough you can email it to me so I can reproduce your error and start debugging.

Steve

--
You received this message because you are subscribed to the Google Groups "cusp-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cusp-users+...@googlegroups.com.
To post to this group, send email to cusp-...@googlegroups.com.
Visit this group at https://groups.google.com/group/cusp-users.
For more options, visit https://groups.google.com/d/optout.

Dharini Jaiganesh

unread,
Jul 14, 2016, 12:36:17 PM7/14/16
to cusp-users
Hi Steve,

Thanks for the reply. I am compiling with sm_30. Since I am a student working on university server, I cannot upgrade to CUDA 8.0. I tried running with the current development branch of cusp and I get the following errors,

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/enactor_hybrid.cuh, 484] LevelGridBfsEnactor cudaEventSynchronize throttle_event failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/enactor_hybrid.cuh, 367] EnactorHybrid cudaMemcpy d_iteration failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/enactor_hybrid.cuh, 237] EnactorHybrid cudaFreeHost done failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/enactor_hybrid.cuh, 238] EnactorHybrid cudaEventDestroy throttle_event failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/enactor_hybrid.cuh, 241] EnactorHybrid cudaFree d_iteration failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/../../util/kernel_runtime_stats.cuh, 178] KernelRuntimeStatsLifetime cudaFree d_stat failed:  (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/../../util/kernel_runtime_stats.cuh, 178] KernelRuntimeStatsLifetime cudaFree d_stat failed:  (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/../../util/kernel_runtime_stats.cuh, 178] KernelRuntimeStatsLifetime cudaFree d_stat failed:  (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/../../util/kernel_runtime_stats.cuh, 178] KernelRuntimeStatsLifetime cudaFree d_stat failed:  (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/../../graph/bfs/contract_expand_atomic/../../../util/global_barrier.cuh, 160] GlobalBarrier cudaFree d_sync failed:  (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/../../util/cta_work_progress.cuh, 270] CtaWorkProgress cudaFree d_counters failed:  (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/csr_problem.cuh, 163] GpuSlice cudaFree d_visited_mask failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/csr_problem.cuh, 166] GpuSlice cudaFree frontier_queues.d_keys failed (CUDA error 77: an illegal memory access was encountered)

[/home/jayadharini/cusp/cusplibrary/cusp/system/cuda/detail/graph/b40c/graph/bfs/csr_problem.cuh, 166] GpuSlice cudaFree frontier_queues.d_keys failed (CUDA error 77: an illegal memory access was encountered)

terminate called after throwing an instance of 'thrust::system::system_error'

  what():  function_attributes(): after cudaFuncGetAttributes: an illegal memory access was encountered

Aborted (core dumped)


I also tried with cusp-5.0 and cusp - 5.1. But still I get incorrect number of connected components. Please let me know how to fix this.

Thanks,
Jd

Reply all
Reply to author
Forward
0 new messages