Skip to content

Commit

Permalink
Merge pull request rapidsai#169 from afender/sssp_stdout
Browse files Browse the repository at this point in the history
Disable terminal output in sssp
  • Loading branch information
afender committed Mar 20, 2019
2 parents 6c16194 + 516da93 commit 34efb1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
...

## Bug Fixes

...
- PR #169 Disable terminal output in sssp

# cuGraph 0.6.0 (Date TBD)

Expand Down Expand Up @@ -55,6 +54,5 @@
- PR #152 Fix conda package version string
- PR #160 Added additional link directory to support building on CentOS-7


# cuGraph 0.5.0 (28 Jan 2019)

9 changes: 0 additions & 9 deletions cpp/src/nvgraph_gdf.cu
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ gdf_error gdf_sssp_nvgraph(gdf_graph *gdf_G,
const int *source_vert,
gdf_column *sssp_distances) {

std::clock_t start;
GDF_REQUIRE(gdf_G != nullptr, GDF_INVALID_API_CALL);
GDF_REQUIRE(*source_vert >= 0, GDF_INVALID_API_CALL);
GDF_REQUIRE(*source_vert < sssp_distances->size, GDF_INVALID_API_CALL);
Expand All @@ -217,10 +216,8 @@ gdf_error gdf_sssp_nvgraph(gdf_graph *gdf_G,
nvgraphGraphDescr_t nvgraph_G = 0;
cudaDataType_t settype;

start = std::clock();
NVG_TRY(nvgraphCreate(&nvg_handle));
GDF_TRY(gdf_createGraph_nvgraph(nvg_handle, gdf_G, &nvgraph_G, true));
std::cout << (std::clock() - start) / (double) (CLOCKS_PER_SEC / 1000) << ","; // in ms

int sssp_index = 0;
int weight_index = 0;
Expand All @@ -230,7 +227,6 @@ gdf_error gdf_sssp_nvgraph(gdf_graph *gdf_G,
//
cudaStream_t stream { nullptr };
rmm_temp_allocator allocator(stream);
start = std::clock();
if (gdf_G->transposedAdjList->edge_data == nullptr) {
// use a fp32 vector [1,...,1]
settype = CUDA_R_32F;
Expand All @@ -256,16 +252,11 @@ gdf_error gdf_sssp_nvgraph(gdf_graph *gdf_G,
}

NVG_TRY(nvgraphAttachVertexData(nvg_handle, nvgraph_G, 0, settype, sssp_distances->data));
std::cout << (std::clock() - start) / (double) (CLOCKS_PER_SEC / 1000) << ","; // in ms
start = std::clock();

NVG_TRY(nvgraphSssp(nvg_handle, nvgraph_G, weight_index, source_vert, sssp_index));
std::cout << (std::clock() - start) / (double) (CLOCKS_PER_SEC / 1000) << ","; // in ms
start = std::clock();

NVG_TRY(nvgraphDestroyGraphDescr(nvg_handle, nvgraph_G));
NVG_TRY(nvgraphDestroy(nvg_handle));
std::cout << (std::clock() - start) / (double) (CLOCKS_PER_SEC / 1000) << std::endl; // in ms

return GDF_SUCCESS;
}
Expand Down

0 comments on commit 34efb1b

Please sign in to comment.