networkit: an interactive tool suite for high-performance network
TRANSCRIPT
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 1
A NetworKit Tutorial
www.kit.eduKIT – University of the State of Baden-Wuerttemberg andNational Laboratory of the Helmholtz Association
INSTITUTE OF THEORETICAL INFORMATICS · PARALLEL COMPUTING GROUP
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 2
Introduction | Complex Networks
Non-trivial topological features that do not occur in simple networks(meshes, simple random graphs), but often occur in reality
Small diameterStrongly varying degree distributionLarge number of triangles...
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 3
Introduction | Network Science
Often
exploratory in nature
requires data preprocessing toextract graph
creates large data sets easily
requires domain-specific post-processing for interpretation
”Statistics of relational data”
image: sayasaya2011.wordpress.com/
→ Fast interactive toolkit required!
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 4
Introduction | Toolkit Design Goals
Performance
Implementation with efficiency and parallelism in mind
Interface
Exploratory workflows→ freely combinable functions and interactive interface
Integration
Seamless integration with Python ecosystemfor scientific computing and data analysis
Target Platforms
Shared-memory parallel computers
Multicore PCs, workstations, compute servers . . .
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 5
Introduction | NetworKit: Architecture
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 6
Introduction | NetworKit: Overview
Languages: C++, Python
Parallelism: Shared memory (OpenMP)
License: MIT
First release: 1.0 (March 2013)
Web: https://networkit.iti.kit.edu
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 7
Introduction | NetworKit: Graph Data Structure
graph implementation
graph API
image: algs4.cs.princeton.edu
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 8
NetworKit for theProgramming Projects
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 9
Download Mercurial (https://www.mercurial-scm.org)
Create an account on https://algohub.iti.kit.edu/
Send an e-mail to [email protected]
specifying your username and group number
Groups:
1. Graph Clustering, Tobias Lorenz and Johannes Ernst2. Partitioning, Michael Schrempp and Katharina Flugel3. TSP, Henning Dieterichs and Michael Wiegner4. Mapping, Holger Klein and Jasmin Hoffmann5. Framework, Tabu search, Sarah Dold and Sidney Bender
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 10
Clone the NetworKit fork corresponding to your group, e.g.hg clone https://[email protected]/parco/
NetworKit/NetworKit-AMfsO-Group1
Remember to work on the Dev branch!
hg up Dev
Before starting:
Read some code to get used to the code style and try to adoptit whenever possibleRead the DevGuide on the website:https://networkit.iti.kit.edu/api/DevGuide.html
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 11
Installing NetworKit
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 12
Building the C++ Core
Requirements:
modern C++ compiler, e.g.: g++ (≥ 4.8) or clang++ (≥ 3.7)SConsGoogle Test
https://networkit.iti.kit.edu/get_started.html#
building-only-the-c-core
Building executable for unit tests:
Copy build.conf.example to build.conf and edit your envi-ronment settingsscons --optimize=Dbg --target=Tests
Running unit tests
./NetworKit-Tests-Dbg --gtest filter=*Closeness*
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 13
Developing new classes
C++ classes:
networkit/cpp/ + subdirectories (corresponding to mod-ules on the python level)GTest: networkit/cpp/ + subdir + test
Always test your classes!
Exposing to Python: networkit/ NetworKit.pyx
https://networkit.iti.kit.edu/api/DevGuide.html#
exposing-c-code-to-python
Add your class to *.py file in the networkit folder
Always refer to the DevGuide on the website!!
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 14
Using NetworKit with IPython
Installation:
pip3 install -e ./
If you don’t have ipython and jupyter yet...
pip3 install ipython
pip3 install jupyter
Open jupyter notebook
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 15
Exercise
– NetworKit: An Interactive Tool Suite for High-Performance Network Analysis 16
Read the file input/wiki-Vote.txt (format =EdgeListTabZero)
Compute:
1. Number of nodes and edges2. Number of connected components and size of the largest
connected component3. Node with maximum degree