Code Monkey home page Code Monkey logo

gardenia's Introduction

GARDENIA Benchmark Suite Build Status

Copyright 2020 Xuhao Chen, Massachusetts Institute of Technology

GARDENIA: Graph Analytics Repository for Designing Efficient Next-generation Accelerators

Link: https://github.com/chenxuhao/gardenia

This is the reference implementation for the GARDENIA Benchmark Suite. It is designed to be a portable high-performance baseline for desgining next-generation accelerators. It uses CUDA, OpenCL and OpenMP for parallelism. The details of the benchmark can be found in the specification.

The GARDENIA Benchmark Suite is an extented version of the GAP Benchmark Suite which is intended to help graph processing research by standardizing evaluations. The benchmark provides a baseline implementation which incorporates state-of-the-art optimization techniques proposed for modern accelerators, such as GPUs and MICs. These baseline implementations are representative of state-of-the-art performance, and thus new contributions should outperform them to demonstrate an improvement. The code infrastructure is ported from GAPBS and Lonstargpu by the ISS group at the University of Texas. To run the benchmarks on the GPGPU-Sim simulator, please use the revised GPGPU-Sim version and we highly recommend you to use CUDA-5.5 for the compatibility issue.

Note that in the code, 'm' is the number of vertices, and 'nnz' is the number of edges. Graphs are stored as the CSR format in memory. CSR is represented by two auxiliary data structures: 'row_offsets' and 'column_indices'. You will need to download CUB.

For graph mining, please go to here.

Graph Analytics Kernels Included

  • Betweenness Centrality (BC) - Brandes
  • Breadth-First Search (BFS) - direction optimizing
  • Connected Components (CC) - Afforest & Shiloach-Vishkin
  • Minimum Spanning Tree (MST) -
  • PageRank (PR) - iterative method in pull direction
  • Strongly Connected Components (SCC) - Forward-Backward-Trim
  • Stochastic Gradient Descent (SGD) -
  • Sparse Matrix-Vector Multiplication (SpMV)
  • Single-Source Shortest Paths (SSSP) - delta stepping
  • Symmetric Gauss-seidel Smoother (SymGS) -
  • Vertex Coloring (VC) - Gebremedhin and Manne

Quick Start

Setup CUB library:

$ git submodule update --init --recursive

Setup environment variables:

$ cd src
$ cp common.mk.example common.mk
$ vim common.mk // modify this file to setup the compilation

Build the project (you will need to install gcc and nvcc first):

$ make

Or go to each sub-directory, e.g. src/bfs, and then

$ make

Download datasets from the UFSMC or SNAP website:

$ wget https://www.cise.ufl.edu/research/sparse/MM/SNAP/soc-LiveJournal1.tar.gz

Decompress the dataset file and put it in the 'datasets' sub-directory:

$ tar zxvf soc-LiveJournal1.tar.gz
$ mv soc-LiveJournal1.mtx datasets/

Find out commandline format by running executable without argument:

$ cd bin
$ ./bfs_linear_base
Usage: ./bfs_linear_base <filetype> <graph-prefix> [symmetrize(0/1)] [reverse(0/1)] [source_id(0)]

Run BFS on a directed graph starting from vertex 0:

$ cd bin
$ ./bfs_linear_base mtx ../datasets/soc-LiveJournal1 0 0 0

To run on CPU or Intel Xeon Phi coprocessor, set the following environment variable:

$ export OMP_NUM_THREADS=[ number of cores in system ]

Graph Formats and Sources

The graph loading infrastructure understands the following formats:

You can find graph datasets from links below:

How to Cite

Author: Xuhao Chen [email protected]

Please cite this code by the benchmark specification:

Zhen Xu, Xuhao Chen, Jie Shen, Yang Zhang, Cheng Chen, Canqun Yang, GARDENIA: A Domain-specific Benchmark Suite for Next-generation Accelerators, ACM Journal on Emerging Technologies in Computing Systems, 2018.

Xuhao Chen, Roshan Dathathri, Gurbinder Gill, Keshav Pingali, Pangolin: An Efficient and Flexible Graph Mining System on CPU and GPU, PVLDB 13(8): 1190-1205, 2020

Other citations:

Xuhao Chen, Cheng Chen, Jie Shen, Jianbin Fang, Tao Tang, Canqun Yang, Zhiying Wang, Orchestrating Parallel Detection of Strongly Connected Components on GPUs, Parallel Computing, Vol 78, Pages 101โ€“114, 2018.

Xuhao Chen, Pingfan Li, Jianbin Fang, Tao Tang, Zhiying Wang, Canqun Yang, Efficient and High-quality Sparse Graph Coloring on the GPU, Concurrency and Computation: Practice and Experience, Volume 29, Issue 10, 17 April 2017.

Pingfan Li, Xuhao Chen et al., High Performance Detection of Strongly Connected Components in Sparse Graphs on GPUs, In the Proceedings of the International Workshop on Programming Models and Applications for Multicores and Manycores, in conjunction with the 22nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), Austin, TX, Feb 2017

Pingfan Li, Xuhao Chen, Zhe Quan, Jianbin Fang, Huayou Su, Tao Tang, Canqun Yang, High Performance Parallel Graph Coloring on GPGPUs, In the Proceedings of the 30th IEEE International Parallel & Distributed Processing Symposium Workshop (IPDPSW), Chicago, IL, May 2016

More documentation coming soon. For questions, please email [email protected]

Notes

Here are related graph processing frameworks and applications:

Pangolin [1]: https://github.com/chenxuhao/GraphMiner/

SgMatch [2,3]: https://github.com/guowentian/SubgraphMatchGPU

Peregrine [4]: https://github.com/pdclab/peregrine

Sandslash [5]: https://github.com/chenxuhao/GraphMiner/

FlexMiner [6]: https://github.com/chenxuhao/GraphMiner/

DistTC [7]: https://github.com/chenxuhao/GraphMiner/

DeepGalois [8]: https://github.mit.edu/csg/DeepGraphBench

GraphPi [9]: https://github.com/thu-pacman/GraphPi

[1] Xuhao Chen, Roshan Dathathri, Gurbinder Gill, Keshav Pingali. Pangolin: An Efficient and Flexible Graph Pattern Mining System on CPU and GPU. VLDB 2020

[2] Wentian Guo, Yuchen Li, Mo Sha, Bingsheng He, Xiaokui Xiao, Kian-Lee Tan. GPU-Accelerated Subgraph Enumeration on Partitioned Graphs. SIGMOD 2020.

[3] Wentian Guo, Yuchen Li, Kian-Lee Tan. Exploiting Reuse for GPU Subgraph Enumeration. TKDE 2020.

[4] Kasra Jamshidi, Rakesh Mahadasa, Keval Vora. Peregrine: A Pattern-Aware Graph Mining System. EuroSys 2020

[5] Xuhao Chen, Roshan Dathathri, Gurbinder Gill, Loc Hoang, Keshav Pingali. Sandslash: A Two-Level Framework for Efficient Graph Pattern Mining, ICS 2021

[6] Xuhao Chen, Tianhao Huang, Shuotao Xu, Thomas Bourgeat, Chanwoo Chung, Arvind. FlexMiner: A Pattern-Aware Accelerator for Graph Pattern Mining, ISCA 2021

[7] Loc Hoang, Vishwesh Jatala, Xuhao Chen, Udit Agarwal, Roshan Dathathri, Grubinder Gill, Keshav Pingali. DistTC: High Performance Distributed Triangle Counting, HPEC 2019

[8] Loc Hoang, Xuhao Chen, Hochan Lee, Roshan Dathathri, Gurbinder Gill, Keshav Pingali. Efficient Distribution for Deep Learning on Large Graphs, GNNSys 2021

[9] Tianhui Shi, Mingshu Zhai, Yi Xu, Jidong Zhai. GraphPi: high performance graph pattern matching through effective redundancy elimination. SC 2020

Publications

Please cite the following paper if you use this code:

@article{Pangolin,
	title={Pangolin: An Efficient and Flexible Graph Mining System on CPU and GPU},
	author={Xuhao Chen and Roshan Dathathri and Gurbinder Gill and Keshav Pingali},
	year={2020},
	journal = {Proc. VLDB Endow.},
	issue_date = {August 2020},
	volume = {13},
	number = {8},
	month = aug,
	year = {2020},
	numpages = {12},
	publisher = {VLDB Endowment},
}
@INPROCEEDINGS{FlexMiner,
  author={Chen, Xuhao and Huang, Tianhao and Xu, Shuotao and Bourgeat, Thomas and Chung, Chanwoo and Arvind},
  booktitle={2021 ACM/IEEE 48th Annual International Symposium on Computer Architecture (ISCA)}, 
  title={FlexMiner: A Pattern-Aware Accelerator for Graph Pattern Mining}, 
  year={2021},
  volume={},
  number={},
  pages={581-594},
  doi={10.1109/ISCA52012.2021.00052}
}
@inproceedings{DistTC,
  title={DistTC: High performance distributed triangle counting},
  author={Hoang, Loc and Jatala, Vishwesh and Chen, Xuhao and Agarwal, Udit and Dathathri, Roshan and Gill, Gurbinder and Pingali, Keshav},
  booktitle={2019 IEEE High Performance Extreme Computing Conference (HPEC)},
  pages={1--7},
  year={2019},
  organization={IEEE}
}
@inproceedings{Sandslash,
  title={Sandslash: a two-level framework for efficient graph pattern mining},
  author={Chen, Xuhao and Dathathri, Roshan and Gill, Gurbinder and Hoang, Loc and Pingali, Keshav},
  booktitle={Proceedings of the ACM International Conference on Supercomputing},
  pages={378--391},
  year={2021}
}
@inproceedings{hoang2019disttc,
  title={DistTC: High performance distributed triangle counting},
  author={Hoang, Loc and Jatala, Vishwesh and Chen, Xuhao and Agarwal, Udit and Dathathri, Roshan and Gill, Gurbinder and Pingali, Keshav},
  booktitle={2019 IEEE High Performance Extreme Computing Conference (HPEC)},
  pages={1--7},
  year={2019},
  organization={IEEE}
}
@inproceedings{DeepGalois,
  title={Efficient Distribution for Deep Learning on Large Graphs},
  author={Hoang, Loc and Chen, Xuhao and Lee, Hochan and Dathathri, Roshan and Gill, Gurbinder and Pingali, Keshav},
  booktitle={Workshop on Graph Neural Networks and Systems},
  volume={1050},
  pages={1-9},
  year={2021}
}

Developers

License

Copyright (c) 2021, MIT All rights reserved.

gardenia's People

Contributors

chenxuhao avatar mjyan0720 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gardenia's Issues

build error

running make in root dir asks for gem5/m5ops.h.
running make in bfs gives "ambiguous definition error"->

../../include/cutil_subset.h(108): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(108): error: variable "printf" has already been defined

../../include/cutil_subset.h(108): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(108): error: expected a ")"

../../include/cutil_subset.h(109): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(109): error: variable "printf" has already been defined

../../include/cutil_subset.h(109): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(109): error: expected a ")"

../../include/cutil_subset.h(110): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(110): error: variable "printf" has already been defined

../../include/cutil_subset.h(110): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(110): error: expected a ")"

../../include/cutil_subset.h(111): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(111): error: variable "printf" has already been defined

../../include/cutil_subset.h(111): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(111): error: expected a ")"

../../include/cutil_subset.h(112): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(112): error: variable "printf" has already been defined

../../include/cutil_subset.h(112): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(112): error: expected a ")"

../../include/cutil_subset.h(113): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(113): error: variable "printf" has already been defined

../../include/cutil_subset.h(113): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(113): error: expected a ")"

../../include/cutil_subset.h(114): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(114): error: variable "printf" has already been defined

../../include/cutil_subset.h(114): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(114): error: expected a ")"

../../include/cutil_subset.h(115): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(115): error: variable "printf" has already been defined

../../include/cutil_subset.h(115): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(115): error: expected a ")"

../../include/cutil_subset.h(117): error: this declaration has no storage class or type specifier

../../include/cutil_subset.h(117): error: variable "printf" has already been defined

../../include/cutil_subset.h(117): error: a value of type "const char *" cannot be used to initialize an entity of type "int"

../../include/cutil_subset.h(117): error: expected a ")"

../../include/cutil_subset.h(118): error: expected a declaration

../../include/cutil_subset.h(119): error: expected a declaration

../../include/worklistc.h(15): error: identifier "zero" is undefined

undefined reference to `BCSolver(Graph&, int, float*)'

Could you please update the implementations when you can reproduce the following error ? Thanks.

make bc_ocl_base
g++ -Wall -fopenmp -O3 -std=c++11 -I../../include -I ../../cub main.o ocl_base.o verifier.o -o bc_ocl_base -lOpenCL
main.o: In function `main':
main.cc:(.text.startup+0x11a): undefined reference to `BCSolver(Graph&, int, float*)'

CUDA and GPGPU-Sim versions

First, it is okay for some CUDA applications without downgrading the GPGPU-Sim or CUDA versions for compatibility issues.
For example, the following commands are used to obtain a properly working executable for the BFS application.

  1. nvcc linear_base.cu -o linear_base.o -lcudart -arch=sm_70 -c -I ../../include -I ../../cub -> this gives us the compiled linear_base.o file. Do not forget to link with cudart and specify your architectural specs.
  2. gcc main.cc -o main.o -I ../../include -I ../../cub -> this gives us the compiled main.o file.
  3. gcc verifier.cc -o verifier.o -I ../../include -I ../../cub -> this gives us the compiled verifier.o file.
    Lastly, you need to link those executables with the following command:
  4. nvcc linear_base.o main.o verifier.o -o bfs_linear_base -L /usr/lib64 -lcudart -arch=sm_70

Also, the below command shows how I executed your benchmark BFS code on the simulator.
./bfs_linear_base mtx ../CudaBenchmarks/gardenia/datasets/soc-LiveJournal1/soc-LiveJournal1 0 0 0

You may fix the correct path of the soc-LiveJournal1.mtx file. There is an additional soc-LiveJournal1 folder holding the soc-LiveJournal1.mtx file.

Thank you for the benchmark. I hope you have an excellent year.

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.