8000 DHB Integration by HazelCC · Pull Request #1246 · networkit/networkit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DHB Integration #1246

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

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open

DHB Integration #1246

wants to merge 105 commits into from

Conversation

HazelCC
Copy link
@HazelCC HazelCC commented Aug 20, 2024

This PR integrate the data structure Dynamic Hashed Blocks (DHB) into Networkit. This improves NetworKit for dynamic graph operations.

TLTR:

For a detailed description of DHB, refer to the paper: A Fast Data Structure for Dynamic Graphs Based on Hash-Indexed Adjacency Blocks (2022)

Why?

Experiments have shown that DHB outperforms competing dynamic graph structures in edge insertions, updates, deletions, and traversal operations. This integration allows users to leverage DHB to gain performance for dynamic graph operations compared to the (vanilla) Graph class.

How?

This integration extends the functionalities of the default Graph class by supporting (almost) all methods implemented in Graph. When NetworKit is build using DHB, the necessary resources will be pulled in as a sub-module, and the associated code branches will be compiled. If the respective NetworKit modules are not compiled using the DHB integration, DHBGraph will fall back using the implementation of the default Graph class.

Measurement:

Experiments run on commodity hardware (MacOS, M1, 8 GB RAM) have been run to get some baseline measurements on the performance of default Graph class vs. the DHBGraph class. For edge insertions, sequential weight update, and sequential edge removal, DHBGraph outperforms Graph class in an unweighted graph setting.

image(2)
image(1)
image

TODOs:

  • Review the passing by value semantics for all lambdas passed to a method such as f(L handle). Instead, we might want to pass all lambdas by rvalue-reference as in f(L&& handle).
  • Review which type of omp parallel for scheduler (guided?) we use.
  • Review possibilities to use a concurrent/parallel version of functions that iterate over edges/vertices. For example, we might make removeNode to use the concurrent version of forNeighbors.
  • Write more tests for edgeIterator and nodeIterator. (@fabratu)
  • Write tests to check the consistency of unweighted undirected DHBGraph objects. An unweighted undirected graph should store one edge in both direction. (@HazelCC)
  • Improve documentation. (@fabratu)
  • Fix GCC build issues. @c-bebop
  • Build DHB on Clang and fix issues @c-bebop

@HazelCC HazelCC requested review from c-bebop, fabratu and bernlu August 20, 2024 14:48
@HazelCC HazelCC self-assigned this Aug 20, 2024
@HazelCC HazelCC marked this pull request as draft August 21, 2024 15:14
Copy link
Member
@fabratu fabratu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to keep the PR manageable, I suggest to fix all remaining issues concerning the integration in this PR and move optimization and additional thoughts to another PR.

Concerning building / testing: It seems that DHB is not correctly added as a submodule or there is some ill-defined logic in CMakeLists.txt. CI does fetch all submodules, however DHB is not found.

@c-bebop
Copy link
c-bebop commented Oct 23, 2024

@HazelCC Could you clarify and elaborate what exactly you mean with the point: Write tests to check the consistency of unweighted DHBGraph objects.?

@HazelCC
Copy link
Author
HazelCC commented Oct 29, 2024

@HazelCC Could you clarify and elaborate what exactly you mean with the point: Write tests to check the consistency of unweighted DHBGraph objects.?

An undirected graph object should store directed edges in both directions. Previously there were issues where logical bugs causing inconsistency for undirected graph, therefore it's good to have more tests addressing this.

@c-bebop
Copy link
c-bebop commented Oct 29, 2024

@HazelCC Could you clarify and elaborate what exactly you mean with the point: Write tests to check the consistency of unweighted DHBGraph objects.?

An undirected graph object should store directed edges in both directions. Previously there were issues where logical bugs causing inconsistency for undirected graph, therefore it's good to have more tests addressing this.

For now, we have referenced you as taking over for this task. Is that fine?

@HazelCC
Copy link
Author
HazelCC commented Oct 30, 2024

@HazelCC Could you clarify and elaborate what exactly you mean with the point: Write tests to check the consistency of unweighted DHBGraph objects.?

An undirected graph object should store directed edges in both directions. Previously there were issues where logical bugs causing inconsistency for undirected graph, therefore it's good to have more tests addressing this.

For now, we have referenced you as taking over for this task. Is that fine?

For sure. I'd happy to do that.

@c-bebop c-bebop self-assigned this Mar 26, 2025
OpenMP::OpenMP_CXX
tlx< A92E /span>
dhb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When linking publicly against dhb we may not need to link against dhb again here for the tests.

c-bebop
c-bebop previously approved these changes Apr 29, 2025
Copy link
@c-bebop c-bebop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good, now just some small fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0