Skip to content

Artifacts of PACT’22 paper “HBMAX: Optimizing Memory Efficiency for Parallel Influence Maximization on Multicore Architectures”

License

Notifications You must be signed in to change notification settings

hipdac-lab/hbmax-pact

Repository files navigation

HBMax: Optimizing Memory Efficiency for Parallel Influence Maximization on Multicore Architectures

By Xinyu Chen, Marco Minutoli, Jiannan Tian, Mahantesh Halappanavar, Ananth Kalyanaraman, Dingwen Tao.

HBMax is a memory-efficient optimization approach based on Ripples for multi-threaded parallel influence maximization solution over large real-world social networks.

This code is to demonstrate HBMax on DBLP co-authorship network data and compare with the original solution Ripples.


Method 1: Use Docker Image (Recommended)

To ease the use of HBMAX, we provide a docker image with the essential environment.

Step 1: Download docker image

Assuming docker has been installed, please run the following command to pull our prepared docker image from DockerHub:

docker pull xinyu2/hbmax

Step 2: Test HBMAX and compare with Ripples

sudo docker run --rm xinyu2/hbmax /opt/experiments/compare.sh dblp 8

The output should be shown like below.

example

Method 2: Build From Source

System Environment

  • OS: Linux Ubuntu (>= 18.04)
  • Compiler: GCC (>=7.4.0) with OpenMP (>=4.5)

Note that according to OpenMP website, OpenMP 4.5 is fully supported for C and C++ since GCC 6.

Step 1: Install dependencies

  1. Install Python3, CMake, Git, Wget
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
        build-essential cmake git wget python3.6 python3-dev \
        python3-pip python3-setuptools gcc
  1. Install Conan
pip3 install --no-cache-dir --upgrade pip
pip3 install --no-cache-dir conan==1.51.0
export PATH=$PATH:~/.local/bin

Step 2: Download HBMax code and example data

HBMAX_ROOT=$(pwd)
git clone https://github.com/hipdac-lab/hbmax-pact
cd $HBMAX_ROOT/hbmax-pact/test-data
wget https://eecs.wsu.edu/~dtao/data/dblp.txt

Step 3: Build HBMax

cd $HBMAX_ROOT/hbmax-pact   
conan create conan/waf-generator user/stable
conan create conan/trng user/stable
conan install .
./waf configure build_release

Step 4: Test HBMax and compare with Ripples

cd $HBMAX_ROOT/hbmax-pact/
export DATADIR=$HBMAX_ROOT/hbmax-pact/test-data
export EXECDIR=$HBMAX_ROOT/hbmax-pact/build/release/tools
export task=dblp
export ncpus=8
export OMP_NUM_THREADS=$ncpus
$EXECDIR/imm -i $DATADIR/$task.txt -p -k 100 -d IC -e 0.2 -q 6  >> new_${task}_${ncpus}.txt
$EXECDIR/oimm -i $DATADIR/$task.txt -p -k 100 -d IC -e 0.2 -q 1  >> old_${task}_${ncpus}.txt
echo "======== begin "$task"-hbmax with "$ncpus" threads =============" >> /tmp/result
grep 'IMM Parallel :' new_${task}_${ncpus}.txt | awk '{print "hbmax   using:" $8}' >> /tmp/result
grep 'IMM Parallel :' old_${task}_${ncpus}.txt | awk '{print "ripples using:" $8}' >> /tmp/result
echo "======== finish "$task"-hbmax ================" >> /tmp/result
cat /tmp/result
rm new_${task}_${ncpus}.txt old_${task}_${ncpus}.txt  /tmp/result

The output should be shown like below.

example

About

Artifacts of PACT’22 paper “HBMAX: Optimizing Memory Efficiency for Parallel Influence Maximization on Multicore Architectures”

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages