Code Monkey home page Code Monkey logo

subgraphmatchgpu's Introduction

Parallel Subgraph Enumeration on GPUs and CPUs

This project provides a framework for parallel subgraph enumeration utilizing GPUs and multi-core CPUs on a single machine [1,2].

File organization

  • scripts: provide some useful scripts to preprocess the data graphs and run the programs.
  • lib: the library used in this project.
  • src/cpu: the implementation on multi-core CPUs.
  • src/gpu: the implementation on GPUs.
  • src/preprocess: the utils to preprocess the data graphs.

Prerequisites

Common dependency

  • gtest (optional): needed to compile the src/test folder.

CPU dependency

  • g++ 5.4.0

GPU dependency

You need the following deps only if you want to run GPU solutions.

Build GPU dependency

The GPU deps except for CUDA are configured as submodule in the lib folder. You can easily fetch the respositories by the following command.

git submodule init
git submodule update

To compile moderngpu

cd lib/moderngpu; make -j

To compile cnmem

cd lib/cnmem 
mkdir build 
cmake -DCMAKE_INSTALL_PREFIX={your_path_to_cnmem} ..
make -j
make install

Add the path to the libcnmem.so to your LD_LIBRARY_PATH.

To compile cudpp, refer to this guide and this guide.

cd lib/cudpp 
git submodule init
git submodule update
mkdir build
cmake -DCMAKE_INSTALL_PREFIX={your_path_to_cudpp} ..
make -j
make install

Compile

After configuring the dependencies, simply go to the folder src/cpu, src/gpu, src/preprocess, and make -j.

Note that the solutions for CPUs and GPUs are separated. So you can still compile and run the CPU solutions even if you don't have CUDA on your machine.

GPU gencode

Depending on your GPU architecture, you may need to

If your arch is not in lib/moderngpu/src/moderngpu/launch_box.hxx, you need to configure there also.

Run

Getting started

scripts/demo.sh shows an example of how to run the preprocessing, CPU and GPU solutions.

Data formats

Our framework supports two formats of data graphs.

  • SNAP: the edge list input. The datasets downloaded from SNAP website adopt this format.
  • BIN: our preprocessed binary format. The BIN format reorganizes the vertex ids into the continous integer starting from 0. It removes any self loops and parallel edges if needed. The BIN file is written in binary to improve read/write speed.

Queries

The set of queries supported can be seen in doc/queries.pdf.

Register new queries

  1. In src/query/common/Query.h, add a new function specifying the structure of a new pattern. Refer to other patterns in the same file as examples.
  2. In src/Meta.h, add your new query under QueryType.
  3. Recompile.

Preprocess

See src/preprocess/README.md for details.

scripts/preprocess.h provide some example runs.

Run GPU solutions

See src/gpu/README.md.

Run CPU solutions

See src/cpu/README.md.

References

[1]. GPU-Accelerated Subgraph Enumeration on Partitioned Graphs. SIGMOD 2020. [Paper] [Bib entry] [Slides] [Video]

[2]. Exploiting Reuse for GPU Subgraph Enumeration. Under submission. TKDE 2020.

subgraphmatchgpu's People

Contributors

guowentian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.