Coder Social home page Coder Social logo

trust's Introduction

TRUST

This is the code for TRUST: Triangle Counting Reloaded on GPUs.

Organization

The code of TRUST has two version: without graph partition for small graph and without graph partition for large graph. Preprocess include the code for preprocessing. Following the step to test the TRUST.

Environment

CUDA Toolkit 10.2; g++ 7.4.0; MPICH-3.3

Prerpocess

In Preprocessing step, use

$ cd Preprocess
$ ./compile.sh 

compile the code and we will get three files: fromDirectToUndirece, preprocess and partition. This corresponds to following three step:

  1. fromDirectToUndirect transform the directed graph to undirected graph, delete the duplicate edges and self loops and remove orphan vertices. It take file name as input and will generate undirected graph 1.mmio. For example:

    $ ./fromDirectToUndirect cit-Patents.txt

The format of cit-Patents.txt should be edge list.

  1. preprocess will do the orientation and reordering and generate the CSR format of graph. It will take 1.mmio as input and generate two file begin.bin and adjacent.bin

  2. partition use hash to partition the graph. To see detail of partition usage, you can read the Dataset/Cit-Patents/partition.sh

Dataset

In folder Dataset/Cit-Patents/ we give a example of download Cit-Patents graph and preprocessing it. Run it by

$ cd Dataset/Cit-Patents/
$ ./get+preprocess.sh

For the large graph and input file only include edge list, we recommend use preprocess code in Preprocess/speedupIO.

For partition, run

$./partition.sh 2

There are one input arguments n, it represent the partition number, we will partition graph into n*n pieces

Compile and Run code

Before compile the code, you should modify the Makefile to match your architecture. The current settings, --gpu-architecture=compute_70 --gpu-code=sm_70, are tailored for the V100 environment used in the paper. For small graph, we don't partition the graph. Compile the code:

$ cd Without-graph-partition/
$ make

Run the code:

$ mpirun -n 1 ./trianglecounting.bin ../Dataset/Cit-Patents/ 1 1024 1024 1

The input arguments is

  1. input graph folder
  2. number of GPUs
  3. number of thread per block
  4. number of block
  5. chuncksize

The output arguments is

  1. graph folder
  2. vertex count
  3. edge count
  4. triangle counts
  5. times
  6. TEPS rate

For the large graph, partition is required.

Compile the code:

$ cd With-graph-partition/
$ make

Run the code:

$ mpirun -n 8 ./trianglecounting.bin ../Dataset/Cit-Patents/ 8 1024 1024 1 2

The input arguments is

  1. input graph folder
  2. number of GPUs should be m
  3. number of thread per block
  4. number of block
  5. chuncksize
  6. partition number n

The output arguments is

  1. graph folder
  2. triangle counts
  3. min times
  4. max times

reference

@article{pandey2021trust, 
  title={TRUST: Triangle Counting Reloaded on GPUs}, 
  author={Pandey, Santosh and Wang, Zhibin and Zhong, Sheng and Tian, Chen and Zheng, Bolong and Li, Xiaoye and Li, Lingda and Hoisie, Adolfy and Ding, Caiwen and Li, Dong and others}, 
  journal={IEEE Transactions on Parallel and Distributed Systems}, 
  volume={32}, 
  number={11}, 
  pages={2646--2660}, 
  year={2021}, 
  publisher={IEEE} 
}

trust's People

Contributors

wzbxpy avatar

Stargazers

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

Watchers

 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.