Skip to content

Commit

Permalink
skip calling .view() on empty graph object
Browse files Browse the repository at this point in the history
  • Loading branch information
Naim committed Dec 25, 2023
1 parent ec4ec86 commit ec05f3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/tests/community/mg_ecg_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ class Tests_MGEcg : public ::testing::TestWithParam<std::tuple<Ecg_Usecase, inpu

weight_t sg_modularity{-1.0};

auto sg_graph_view = sg_graph.view();
auto sg_edge_weight_view =
sg_edge_weights ? std::make_optional((*sg_edge_weights).view()) : std::nullopt;

if (comm_rank == 0) {
auto sg_graph_view = sg_graph.view();
auto sg_edge_weight_view =
sg_edge_weights ? std::make_optional((*sg_edge_weights).view()) : std::nullopt;

std::tie(std::ignore, std::ignore, sg_modularity) = cugraph::ecg(handle,
rng_state,
sg_graph_view,
Expand Down

0 comments on commit ec05f3f

Please sign in to comment.