Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] FEA subgraph modifications #1

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8819f39
JSON writer improvements
crozhon Feb 6, 2020
ec786c5
Merge pull request #691 from crozhon/json-writer-improvements
neoblizz Feb 15, 2020
804ea77
Link with C++ compiler for shared libs example
crozhon Mar 3, 2020
8f86300
Workaround for the PageRank Validation SegFault
neoblizz Mar 3, 2020
6955b6f
Merge pull request #705 from neoblizz/pr_fix
neoblizz Mar 3, 2020
eece553
Update subgraph matching by adding compression (#702)
Laurawly Mar 3, 2020
339d903
Check SM version before using this_grid in for.cuh
crozhon Mar 5, 2020
d57b932
Move #ifdef checking for whole grid operations
crozhon Mar 5, 2020
dfddd91
added mem calculation
Laurawly Jan 21, 2020
f41e410
update google test for sm
Laurawly Jan 21, 2020
2a580d7
don't use cpu reference when using quick mode
Laurawly Jan 22, 2020
8599f12
Prevent duplication of key "load-time" in output json (#709)
achalagarwal Mar 11, 2020
a599560
Enable bindings for sssp in CMakeLists.txt
crozhon Mar 11, 2020
01d1f1d
add target device option in sm api
Laurawly Apr 21, 2020
910388b
revert temp tests
Laurawly Apr 21, 2020
8bb7305
revert temp tests
Laurawly Apr 21, 2020
95b64f5
address comment on device type
Laurawly Apr 22, 2020
22fa250
address more comments
Laurawly Apr 24, 2020
763466a
remove mem cal
Laurawly Apr 25, 2020
97b1c86
fix ci
Laurawly Apr 25, 2020
9395024
add default device, change shared_lib test api
Laurawly Apr 28, 2020
573e437
add back device
Laurawly Apr 28, 2020
5776ab3
update test_lib_sm
Laurawly Apr 28, 2020
5c67339
add default device
Laurawly Apr 28, 2020
aec946e
correct list pointer
Laurawly Apr 28, 2020
607f414
correct list pointer
Laurawly Apr 29, 2020
8168eac
correct list pointer
Laurawly Apr 29, 2020
b439be3
Relevant files for a reviewer request
neoblizz Apr 29, 2020
64f244b
Git ignore vscode files
neoblizz Apr 29, 2020
141d285
Merge pull request #721 from gunrock/master
neoblizz May 1, 2020
4f0ca66
Fix mgpu memory issues from seperate stream (#706)
crozhon May 6, 2020
8d12ea7
Implement sub_graph Release for single GPU (#746)
crozhon May 7, 2020
0f7e854
Added a issue template for questions.
neoblizz May 7, 2020
4c48c59
Add option to print to stdout or file
jdwapman May 8, 2020
d4faacc
Apply consistent formatting
jdwapman May 8, 2020
6bf6535
Formatting
jdwapman May 8, 2020
f5133e9
address naming comments
Laurawly May 8, 2020
431288d
address naming comments
Laurawly May 8, 2020
fd72610
Merge pull request #716 from Laurawly/target-dev
neoblizz May 9, 2020
2c84c90
:links: Updating broken links and requirements.
neoblizz May 11, 2020
237209d
:link: Missed one...
neoblizz May 11, 2020
2c1189d
:link: Oops.
neoblizz May 11, 2020
b530e09
:link: Oooops.
neoblizz May 11, 2020
cee6a2f
:wastebasket: Removing docs module
neoblizz May 11, 2020
66e3646
:wastebasket: Removed docs from gunrock/gunrock
neoblizz May 11, 2020
8721166
Merge pull request #748 from jdwapman/frontier_print
neoblizz May 11, 2020
a5afd69
Merge pull request #722 from neoblizz/master
neoblizz May 11, 2020
8d9952c
Merge branch 'dev' into master
neoblizz May 11, 2020
f7f9f83
Merge pull request #749 from gunrock/master
neoblizz May 11, 2020
4a55540
Merge remote-tracking branch 'upstream/master' into fea_subgraph_modi…
ChuckHastings Jun 3, 2020
0cc9cb8
add install target
ChuckHastings Jun 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question
about: I have a question for Gunrock team.
title: ''
labels: question
assignees: ''

---


3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ gunrock/util/gitsha1.c

# Ignore build directory
build

# Ignore vscode files
*.vscode*
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
path = externals/moderngpu
url = https://github.com/NVlabs/moderngpu.git
branch = master
[submodule "docs"]
path = docs
url = https://github.com/gunrock/docs.git
branch = master
[submodule "externals/rapidjson"]
path = externals/rapidjson
url = https://github.com/Tencent/rapidjson.git
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ endif (CUDA_VERBOSE_PTXAS)
set(CUDA_NVCC_FLAGS --expt-extended-lambda -rdc=true -lcudadevrt)
set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_curand_LIBRARY})

# begin /* Suppress all warnings from nvcc */
if (NOT ENABLE_WARNINGS)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -w")
endif (NOT ENABLE_WARNINGS)
# end /* Suppress all warnings from nvcc */

if(GUNROCK_BUILD_LIB)
if(GUNROCK_BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
Expand Down Expand Up @@ -393,3 +399,12 @@ if(GUNROCK_BUILD_TESTS)
add_subdirectory(unittests)
endif(GUNROCK_GOOGLE_TESTS)
endif(GUNROCK_BUILD_TESTS)

###################################################################################################
# - install targets -------------------------------------------------------------------------------

install(TARGETS gunrock LIBRARY
DESTINATION lib)

install(FILES ${CMAKE_SOURCE_DIR}/gunrock/gunrock.h
DESTINATION include/gunrock)
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- start: gunrock's header -->
<p align="center">
<a href="https://github.com/gunrock/gunrock/"><img src="https://github.com/gunrock/docs/raw/master/source/images/GunrockLogo150px.png"></a>
<a href="https://github.com/gunrock/gunrock/"><img src="https://github.com/gunrock/docs/raw/master/docs/_media/logo.png"></a>
<br>
<a href="https://github.com/gunrock/gunrock/releases/tag/v1.0"><img src="https://img.shields.io/badge/gunrock-v1.0-blue.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAIjklEQVRIDQXBaZCeBWEA4Oc9vnN3v93sbrKbhGxCIMVASERQSCt0BCo4lOGonVirMOPR45cVbS3t1B8OYy%2B1WKdFtKPiqB162LHjdAZqKQUBwyEBYgKJuZYku9kju%2Fvtd79XnycoAHD0NznzEDe1OT1gOmDhLLMhN5RxLcEtrOxn%2BX6VbTOu6Z52oVh2auOHqf2CE%2BucmWXuFfbuo3w5UcpShWLAxhUuv5UQAAAAACDMSdus3EP4Hu%2BeHLG0dMgLSdfJZNID0SKQIisQAAAAADEAAAAEyDHIyAqCNp0%2FNDR8wTOdFZXpHT7U6rizvezLC4cllZJ%2FCiLdSkha0E%2BICiLkAQEAQgAAUJAVJDlRyoaGLc1Rn2w1fbd81FxnXXWy7%2FbGwOPdno%2BEQ462m%2F5%2BYUknWnNie8OXLt%2FttjgSV2OKgjAjKSgCIAYAAWnCANWQNGCo5g%2FKQx7pJ6Rt6mXCgG7f7k7hyaCqESY25jnlOmluZ8Rntl%2FiM3nuZNj0%2Bf7A9VM0VkJ%2FJnBeQFAA4Pg9nH%2FQ1u0XPRbGrhaaTbquKwrKAWEoa0f%2BNkztDsruynPz1dx00TZb2%2BKuYs1lacfvGfH%2BQU46ICqIQ0oRSSoNYu%2Fa9j5vhG7CTbiKiyM0Bn4UF24p2uJ01bVZxFBIJ%2Fd1I8ZfO%2BPB5pC7J%2Bv%2BJu6abrcdmeq4cXSTQ%2FWL%2Fn1r1W3ry3Z3VrxQKhPHfnluWHS8sLnZF8e5b%2FdfJfYQUmxgvO1TxUXXhjO257Nms9Sv1yJPNxOfPtTy8K4S6Tqq1M77XGPJ596scckMtYAwB852vTkWumsstNCueWb6sPxMxXxn3AuTVfvfmiU%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Ec9HQxlBvap%2BlXl%2BaLpBMu6856%2Bag7LGdS%2F73G7P8ZJGpCgD%2FD%2Ffbv1cjCgq6AAAAAElFTkSuQmCC"></a>
<a href="http://daisy.ece.ucdavis.edu:8080/job/gunrock/job/master/"><img src="http://daisy.ece.ucdavis.edu:8080/buildStatus/icon?job=gunrock/master" alt="Build Status"></a>
Expand All @@ -15,16 +15,16 @@
<h1 id="gunrock-gpu-graph-analytics" align="center">Gunrock: GPU Graph Analytics</h1>
<!-- end: gunrock's header -->

**Gunrock** is a CUDA library for graph-processing designed specifically for the GPU. It uses a **high-level**, **bulk-synchronous**, **data-centric abstraction** focused on operations on vertex or edge frontiers. Gunrock achieves a balance between performance and expressiveness by coupling high-performance GPU computing primitives and optimization strategies, particularly in the area of fine-grained load balancing, with a high-level programming model that allows programmers to quickly develop new graph primitives that scale from one to many GPUs on a node with small code size and minimal GPU programming knowledge. For more details, see [Gunrock's Overview](http://gunrock.github.io/docs/#overview).
**Gunrock** is a CUDA library for graph-processing designed specifically for the GPU. It uses a **high-level**, **bulk-synchronous**, **data-centric abstraction** focused on operations on vertex or edge frontiers. Gunrock achieves a balance between performance and expressiveness by coupling high-performance GPU computing primitives and optimization strategies, particularly in the area of fine-grained load balancing, with a high-level programming model that allows programmers to quickly develop new graph primitives that scale from one to many GPUs on a node with small code size and minimal GPU programming knowledge. For more details, see [Gunrock's Overview](https://gunrock.github.io/docs/#/gunrock/overview).


| **Service** | **System** | **Environment** | **Status** |
|--------------------------------|--------------------|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Jenkins](https://jenkins.io/) | Ubuntu 18.04.2 LTS | CUDA 10.1, NVIDIA Driver 418.39, GCC/G++ 7.3 | <a href="http://daisy.ece.ucdavis.edu:8080/blue/organizations/jenkins/gunrock/activity"><img src="http://daisy.ece.ucdavis.edu:8080/buildStatus/icon?job=gunrock/master" alt="Build Status"></a> |
| [Jenkins](https://jenkins.io/) | Ubuntu 18.04 LTS | CUDA 10.2, NVIDIA Driver 440.33, GCC/G++ 7.4.0 | <a href="http://daisy.ece.ucdavis.edu:8080/blue/organizations/jenkins/gunrock/activity"><img src="http://daisy.ece.ucdavis.edu:8080/buildStatus/icon?job=gunrock/master" alt="Build Status"></a> |

## Quick Start Guide

Before building Gunrock make sure you have **CUDA 7.5 or higher** (recommended CUDA 9 or higher) installed on your Linux system. We also support building Gunrock on docker images using the provided docker files under `docker` subdirectory. For complete build guide, see [Building Gunrock](https://gunrock.github.io/docs/#building-gunrock).
Before building Gunrock make sure you have **CUDA Toolkit 9 or higher** (recommended CUDA 10.2) installed on your Linux system. We also support building Gunrock on docker images using the provided docker files under `docker` subdirectory. For complete build guide, see [Building Gunrock](https://gunrock.github.io/docs/#/gunrock/building_gunrock).

```shell
git clone --recursive https://github.com/gunrock/gunrock/
Expand All @@ -36,12 +36,12 @@ make test

## Getting Started with Gunrock

- To learn more about Gunrock and its programming model, see [Gunrock's Overview](http://gunrock.github.io/docs/#overview).
- For information on building Gunrock, see [Building Gunrock](http://gunrock.github.io/docs/#building-gunrock).
- Tutorial: [How to write a graph primitive within Gunrock?](https://gunrock.github.io/docs/developers.html)
- Comprehensive [list](https://gunrock.github.io/docs/#gunrock-39-s-application-cases) of test applications and primitives for most the functionality of Gunrock.
- [API Reference documentation](http://gunrock.github.io/gunrock) (generated using doxygen).
- Find our [publications](http://gunrock.github.io/docs/#publications), [presentations](http://gunrock.github.io/docs/#presentations), and [results and analysis](http://gunrock.github.io/docs/#results-and-analysis).
- To learn more about Gunrock and its programming model, see [Gunrock's Overview](https://gunrock.github.io/docs/#/gunrock/overview).
- For information on building Gunrock, see [Building Gunrock](https://gunrock.github.io/docs/#/gunrock/building_gunrock).
- Tutorial: [How to write a graph primitive within Gunrock?](https://gunrock.github.io/docs/#/devs/)
- Comprehensive [list](https://gunrock.github.io/docs/#/gunrock/gunrock_applications) of test applications and primitives for most the functionality of Gunrock.
- [API Reference documentation](https://gunrock.github.io/gunrock) (generated using doxygen).
- Find our [publications](https://gunrock.github.io/docs/#/gunrock/publications_and_presentations), [presentations](https://gunrock.github.io/docs/#/gunrock/publications_and_presentations?id=presentations), and [performance analysis](https://gunrock.github.io/docs/#/analysis/results).

## Copyright and License

Expand Down
1 change: 0 additions & 1 deletion docs
Submodule docs deleted from 5be4ef
2 changes: 1 addition & 1 deletion examples/BaseMakefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ BOOST_INC =
BOOST_LINK =
ifeq ($(use_boost), 1)
BOOST_INC = -I"/usr/local/include"
BOOST_LINK = -Xcompiler -DBOOST_FOUND -L"/usr/local/lib" -Xlinker -lboost_system -Xlinker -lboost_chrono -Xlinker -lboost_timer -Xlinker -lboost_filesystem
BOOST_LINK = -Xcompiler -DBOOST_FOUND -L"/usr/local/lib" -Xlinker -lboost_system -Xlinker -lboost_chrono -Xlinker -lboost_timer -Xlinker -lboost_filesystem -I"../../externals/rapidjson/include"
else
BOOST_INC = -I"../../externals/rapidjson/include"
endif
Expand Down
3 changes: 3 additions & 0 deletions examples/shared_libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
# Gunrock: Sub-Project C Shared Libraries
# ------------------------------------------------------------------------
add_executable(shared_lib_pr shared_lib_pr.c)
set_target_properties(shared_lib_pr PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(shared_lib_pr gunrock)

add_executable(shared_lib_sm shared_lib_sm.c)
set_target_properties(shared_lib_sm PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(shared_lib_sm gunrock)

add_executable(shared_lib_hits shared_lib_hits.c)
set_target_properties(shared_lib_hits PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(shared_lib_hits gunrock)

add_test(NAME SHARED_LIB_TEST_PAGERANK COMMAND shared_lib_pr)
Expand Down
22 changes: 11 additions & 11 deletions examples/shared_libs/shared_lib_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
#include <gunrock/gunrock.h>

int main(int argc, char *argv[]) {

int num_data_nodes = 5, num_data_edges = 10;
int data_row_offsets[6] = {0, 2, 6, 7, 9, 10};
int data_row_offsets[6] = {0, 2, 6, 7, 9, 10};
int data_col_indices[10] = {1, 3, 0, 2, 3, 4, 1, 0, 1, 1};

int num_query_nodes = 3, num_query_edges = 6;
int query_row_offsets[4] = {0, 2, 4, 6};
int query_row_offsets[4] = {0, 2, 4, 6};
int query_col_indices[6] = {1, 2, 0, 2, 0, 1};
unsigned int device = 0x01; // CPU

int *sm_counts = (int *)malloc(sizeof(int) * num_data_nodes);
unsigned long *sm_counts = (unsigned long *)malloc(sizeof(unsigned long));
unsigned long *list_sm;

double elapsed = sm(num_data_nodes, num_data_edges, data_row_offsets,
data_col_indices, num_query_nodes, num_query_edges,
query_row_offsets, query_col_indices, 1, sm_counts);
double elapsed =
sm(num_data_nodes, num_data_edges, data_row_offsets, data_col_indices,
num_query_nodes, num_query_edges, query_row_offsets, query_col_indices,
1, sm_counts, list_sm, device);

int node;
for (node = 0; node < num_data_nodes; ++node) {
printf("Node_ID [%d] : Number matched subgraphs: [%d]\n", node, sm_counts[node]);
}
printf("Number matched subgraphs: [%d]\n", sm_counts[0]);

if (sm_counts) free(sm_counts);
if (list_sm) free(list_sm);

return 0;
}
2 changes: 1 addition & 1 deletion examples/sm/test_sm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct main_struct {
!quiet);

// counts of matched subgraphs
VertexT *ref_subgraph_match = new VertexT[data_graph.nodes];
unsigned long *ref_subgraph_match = new unsigned long[data_graph.nodes];
if (!quick) {
util::PrintMsg("__________________________", !quiet);

Expand Down
2 changes: 1 addition & 1 deletion gunrock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set(CUFILES
app/pr/pr_app.cu
app/hits/hits_app.cu
app/sm/sm_app.cu
#app/sssp/sssp_app.cu
app/sssp/sssp_app.cu
#app/louvain/louvain_app.cu
#app/color/color_app.cu
util/test_utils.cu
Expand Down
8 changes: 3 additions & 5 deletions gunrock/app/enactor_types.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#pragma once

#include <time.h>
// #include <moderngpu/context.hxx>
#include <moderngpu/context.hxx>
#include <gunrock/util/multithreading.cuh>
#include <gunrock/util/kernel_runtime_stats.cuh>
#include <gunrock/util/parameters.h>
Expand Down Expand Up @@ -235,7 +235,6 @@ class EnactorSlice {
typedef oprtr::OprtrParameters<GraphT, FrontierT, LabelT> OprtrParametersT;

cudaStream_t stream, stream2;
// mgpu::standard_context_t context;
EnactorStats<SizeT> enactor_stats;
FrontierT frontier;
OprtrParametersT oprtr_parameters;
Expand Down Expand Up @@ -273,10 +272,9 @@ class EnactorSlice {

GUARD_CU(enactor_stats.Init(target));
GUARD_CU(frontier.Init(num_queues, types, frontier_name, target));
GUARD_CU(oprtr_parameters.Init());
GUARD_CU(oprtr_parameters.Init(stream));

oprtr_parameters.stream = stream;
// oprtr_parameters.context = context;
// Create moderngpu context
oprtr_parameters.frontier = &frontier;
oprtr_parameters.cuda_props = cuda_properties;
oprtr_parameters.advance_mode = advance_mode;
Expand Down
9 changes: 7 additions & 2 deletions gunrock/app/pr/pr_test.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,14 @@ typename GraphT::SizeT Validate_Results(
if (ref_node_ids != NULL && ref_ranks != NULL) {
double ref_total_rank = 0;
double max_diff = 0;
VertexT max_diff_pos = nodes;
// TODO: Temporary workaround, max_diff_pos if set to nodes
// ends up causing a SegFault when ref_node_id[max_diff_pos] = some random
// memory access, which could be greater than num_nodes. And later in the
// PrintMsg, we perform `unorder_ranks[ref_node_ids[max_diff_pos]]`, which
// is where the SegFault will happen randomly.
VertexT max_diff_pos = nodes-1;
double max_rdiff = 0;
VertexT max_rdiff_pos = nodes;
VertexT max_rdiff_pos = nodes-1;
for (VertexT v_ = 0; v_ < nodes; v_++) {
VertexT v = ref_node_ids[v_];
if (util::lessThanZero(v) || v >= nodes) {
Expand Down
10 changes: 8 additions & 2 deletions gunrock/app/problem_base.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,15 @@ struct ProblemBase {
cudaError_t Release(util::Location target = util::LOCATION_ALL) {
cudaError_t retval = cudaSuccess;
// Cleanup graph slices on the heap
if (sub_graphs.GetPointer(util::HOST) != NULL && num_gpus != 1) {
if (sub_graphs.GetPointer(util::HOST) != NULL) {
// We should have the same number of sub_graphs as GPUs
assert(num_gpus == sub_graphs.GetSize());

for (int i = 0; i < num_gpus; ++i) {
if (target & util::DEVICE) GUARD_CU(util::SetDevice(gpu_idx[i]));
if (num_gpus != 1 && (target & util::DEVICE))
{
GUARD_CU(util::SetDevice(gpu_idx[i]));
}
GUARD_CU(sub_graphs[i].Release(target));
}
GUARD_CU(sub_graphs.Release(target));
Expand Down
26 changes: 15 additions & 11 deletions gunrock/app/sm/sm_app.cu
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,27 @@ cudaError_t UseParameters(util::Parameters &parameters) {
* @param[in] query_col_indices CSR-formatted graph input query column indices
* @param[in] num_runs Number of runs to perform SM
* @param[out] subgraphs Return number of subgraphs
* @param[out] list_subgraphs Return list of subgraphs
* @param[in] allocated_on Input and output target device, by default CPU
* \return double Return accumulated elapsed times for all runs
*/
double sm(
const int num_nodes,
const int num_edges,
const int *row_offsets,
const int *col_indices,
const int num_query_nodes,
const int num_query_edges,
const int *query_row_offsets,
const int *query_col_indices,
const int num_runs,
int *subgraphs)
const int num_nodes,
const int num_edges,
const int *row_offsets,
const int *col_indices,
const int num_query_nodes,
const int num_query_edges,
const int *query_row_offsets,
const int *query_col_indices,
const int num_runs,
unsigned long *subgraphs,
unsigned long *list_subgraphs,
gunrock::util::Location allocated_on = gunrock::util::HOST)
{
return sm_template(num_nodes, num_edges, row_offsets, col_indices,
num_query_nodes, num_query_edges, query_row_offsets,
query_col_indices, num_runs, subgraphs);
query_col_indices, num_runs, subgraphs, list_subgraphs, allocated_on);
}

// Leave this at the end of the file
Expand Down
Loading