-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Abdullah edited this page Jan 25, 2026
·
10 revisions
This guide covers installing GraphBrew on Linux systems.
The fastest way to get started - automatically checks dependencies, builds, and downloads test graphs:
git clone https://github.com/UVA-LavaLab/GraphBrew.git
cd GraphBrew
# Check what dependencies are missing
python3 scripts/graphbrew_experiment.py --check-deps
# Auto-install missing dependencies (needs sudo)
python3 scripts/graphbrew_experiment.py --install-deps
# Run full pipeline
python3 scripts/graphbrew_experiment.py --full --download-size SMALLThis will:
- Verify all system dependencies (Boost, g++, libnuma, etc.)
- Build all binaries automatically
- Download benchmark graphs from SuiteSparse
- Run the complete experiment pipeline
- OS: Linux (Ubuntu 20.04+ recommended)
- Compiler: GCC 7+ with C++17 support
- Memory: 8GB RAM (16GB+ recommended for large graphs)
- Disk: 50GB+ for benchmark graphs
GraphBrew can check and install dependencies automatically:
# Check all dependencies
python3 scripts/graphbrew_experiment.py --check-deps
# Sample output:
# GraphBrew Dependency Status:
# ==================================================
# ✓ make GNU Make 4.3
# ✓ c++ compiler g++ 11.4.0
# ✓ boost v1.74
# ✓ numa found
# ✓ tcmalloc found
# ✓ python v3.10.12
# ==================================================
# All required dependencies satisfied!
# Install missing dependencies (Ubuntu/Debian/Fedora/macOS)
python3 scripts/graphbrew_experiment.py --install-depsIf automatic installation doesn't work, install manually:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y \
build-essential \
g++ \
libboost-all-dev \
libnuma-dev \
google-perftools \
python3 \
python3-pip
# Fedora/RHEL
sudo dnf install -y \
gcc-c++ \
make \
boost-devel \
numactl-devel \
gperftools \
python3 \
python3-pip
# Arch Linux
sudo pacman -S \
base-devel \
boost \
numactl \
gperftools
# macOS (with Homebrew)
xcode-select --install
brew install gcc boost google-perftools# For visualization and analysis (optional)
pip3 install numpy matplotlib pandasgit clone https://github.com/UVA-LavaLab/GraphBrew.git
cd GraphBrew# Build all benchmarks
make all
# Build with cache simulation support
make sim
# Or build specific benchmarks
make pr # PageRank
make bfs # Breadth-First Search
make cc # Connected Components| Option | Description | Example |
|---|---|---|
RABBIT_ENABLE=0 |
Disable Rabbit Order (enabled by default) | RABBIT_ENABLE=0 make all |
DEBUG=1 |
Build with debug symbols | DEBUG=1 make all |
SANITIZE=1 |
Enable address sanitizer | SANITIZE=1 make all |
Rabbit Order (algorithm 8) requires Boost 1.58.0 specifically for compatibility. System package managers often install newer versions which may cause issues.
# Download, compile, and install Boost 1.58.0 to /opt/boost_1_58_0
python3 scripts/graphbrew_experiment.py --install-boostThis automatically:
- Downloads Boost 1.58.0 source (~73MB)
- Runs
bootstrap.shto configure - Compiles with
b2using all CPU cores - Installs to
/opt/boost_1_58_0with properinclude/andlib/structure
Note: Compilation takes 10-30 minutes depending on your system.
# Download Boost 1.58.0
wget https://archives.boost.io/release/1.58.0/source/boost_1_58_0.tar.gz
tar -xzf boost_1_58_0.tar.gz
cd boost_1_58_0
# Configure
./bootstrap.sh --prefix=/opt/boost_1_58_0
# Compile and install (uses all CPU cores)
cpuCores=$(nproc)
sudo ./b2 --with=all -j $cpuCores install
# Cleanup
cd .. && rm -rf boost_1_58_0 boost_1_58_0.tar.gz# Check Boost version at GraphBrew expected path
cat /opt/boost_1_58_0/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
# Should show: #define BOOST_LIB_VERSION "1_58"
# Or use the dependency checker
python3 scripts/graphbrew_experiment.py --check-deps# Build (Rabbit Order enabled by default with Boost at /opt/boost_1_58_0)
make all
# Or disable Rabbit Order if Boost is not available
RABBIT_ENABLE=0 make all# Check if binaries were created
ls -la bench/bin/
# Run a quick test
./bench/bin/pr -g 12 -o 0 -n 1Expected output:
Generate Time: 0.02xxx
Build Time: 0.01xxx
...
Trial Time: 0.00xxx
The core Python scripts require only Python 3.8+ standard library. Optional dependencies provide extended analysis:
cd GraphBrew
# Core scripts work without any pip installs!
# Optional: Install for extended visualization and analysis
pip3 install numpy matplotlib pandas# Quick verification of lib/ module imports
python3 -c "from scripts.lib import ALGORITHMS; print(f'Loaded {len(ALGORITHMS)} algorithms')"
# Or run the main script with help
python3 scripts/graphbrew_experiment.py --helpGraphBrew/
├── bench/
│ ├── bin/ # Compiled binaries (pr, bfs, cc, etc.)
│ ├── bin_sim/ # Cache simulation binaries
│ ├── include/ # Header files
│ └── src/ # Source files
├── graphs/ # Downloaded benchmark graphs
├── results/ # Experiment outputs
│ ├── mappings/ # Pre-generated label maps
│ └── logs/ # Execution logs
├── scripts/ # Python analysis tools
│ ├── graphbrew_experiment.py # ⭐ Main orchestration (~3100 lines)
│ ├── requirements.txt
│ ├── lib/ # 📦 Core modules (~12,200 lines)
│ │ ├── types.py # Data classes
│ │ ├── phases.py # Phase orchestration
│ │ ├── utils.py # ALGORITHMS, constants
│ │ ├── features.py # Graph features
│ │ ├── dependencies.py # System dependency management
│ │ ├── download.py # Graph downloading
│ │ ├── build.py # Binary compilation
│ │ ├── reorder.py # Vertex reordering
│ │ ├── benchmark.py # Benchmark execution
│ │ ├── cache.py # Cache simulation
│ │ ├── weights.py # Weight management
│ │ ├── training.py # ML training
│ │ ├── analysis.py # Adaptive analysis
│ │ ├── progress.py # Progress tracking
│ │ └── results.py # Result I/O
│ └── weights/ # Auto-clustered type weights
│ ├── active/ # C++ reads from here
│ │ ├── type_registry.json # Graph → type mappings + centroids
│ │ └── type_N.json # Per-cluster weights
│ ├── merged/ # Accumulated weights
│ └── runs/ # Historical snapshots
└── wiki/ # This documentation
# Error: fatal error: boost/range/algorithm.hpp: No such file or directory
sudo apt-get install libboost-all-dev# Check GCC version
g++ --version
# Install newer GCC
sudo apt-get install g++-11
export CXX=g++-11
make clean && make all# Error: -fopenmp not supported
sudo apt-get install libomp-dev# Reduce parallel jobs
make -j2 all # Instead of default parallel- Quick-Start - Run your first benchmark
- Running-Benchmarks - Learn all command-line options
- Reordering-Algorithms - Understand the algorithms