Skip to content

Commit

Permalink
Fix error from two conflicting merges (#2219)
Browse files Browse the repository at this point in the history
I added a new algorithm while Seunghwa modified a graph_view method name.  The two PRs passed and merged but introduced this error.

Authors:
  - Chuck Hastings (https://github.com/ChuckHastings)

Approvers:
  - Seunghwa Kang (https://github.com/seunghwak)

URL: #2219
  • Loading branch information
ChuckHastings committed Apr 12, 2022
1 parent cd9d7ed commit b8a6c60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions build.sh
Expand Up @@ -218,6 +218,7 @@ if buildAll || hasArg libcugraph_etl; then
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_TESTS=${BUILD_CPP_TESTS} \
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
-DCMAKE_PREFIX_PATH=${LIBCUGRAPH_BUILD_DIR} \
${CMAKE_VERBOSE_OPTION} \
${REPODIR}/cpp/libcugraph_etl
cmake --build "${LIBCUGRAPH_ETL_BUILD_DIR}" -j${PARALLEL_LEVEL} ${INSTALL_TARGET} ${VERBOSE_FLAG}
Expand Down
16 changes: 8 additions & 8 deletions cpp/src/c_api/katz.cpp
Expand Up @@ -88,19 +88,19 @@ struct katz_functor : public cugraph::c_api::abstract_functor {

auto number_map = reinterpret_cast<rmm::device_uvector<vertex_t>*>(graph_->number_map_);

rmm::device_uvector<weight_t> centralities(graph_view.get_number_of_local_vertices(),
rmm::device_uvector<weight_t> centralities(graph_view.local_vertex_partition_range_size(),
handle_.get_stream());
rmm::device_uvector<weight_t> betas(0, handle_.get_stream());

if (betas_ != nullptr) {
rmm::device_uvector<vertex_t> betas_vertex_ids(graph_view.get_number_of_local_vertices(),
handle_.get_stream());
rmm::device_uvector<vertex_t> betas_vertex_ids(
graph_view.local_vertex_partition_range_size(), handle_.get_stream());
cugraph::detail::sequence_fill(handle_.get_stream(),
betas_vertex_ids.data(),
betas_vertex_ids.size(),
graph_view.get_local_vertex_first());
graph_view.local_vertex_partition_range_size());

betas.resize(graph_view.get_number_of_local_vertices(), handle_.get_stream());
betas.resize(graph_view.local_vertex_partition_range_size(), handle_.get_stream());

raft::copy(betas.data(), betas_->as_type<weight_t>(), betas.size(), handle_.get_stream());

Expand All @@ -110,8 +110,8 @@ struct katz_functor : public cugraph::c_api::abstract_functor {
std::move(betas_vertex_ids),
std::move(betas),
*number_map,
graph_view.get_local_vertex_first(),
graph_view.get_local_vertex_last(),
graph_view.local_vertex_partition_range_first(),
graph_view.local_vertex_partition_range_last(),
weight_t{0},
do_expensive_check_);
}
Expand All @@ -129,7 +129,7 @@ struct katz_functor : public cugraph::c_api::abstract_functor {
true,
do_expensive_check_);

rmm::device_uvector<vertex_t> vertex_ids(graph_view.get_number_of_local_vertices(),
rmm::device_uvector<vertex_t> vertex_ids(graph_view.local_vertex_partition_range_size(),
handle_.get_stream());
raft::copy(vertex_ids.data(), number_map->data(), vertex_ids.size(), handle_.get_stream());

Expand Down

0 comments on commit b8a6c60

Please sign in to comment.