porumbes / PIGO

Parallel Graph Input Output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PIGO: a Parallel Graph Input and Output library

Build Status

PIGO is a library built to assist you with common sparse graph or matrix input, output, and preprocessing. It supports easily loading a variety of graph formats rapidly in parallel, performing standard preprocessing, and saving results and intermediate representations.

PIGO is built in C++ and its releases are single header-only files. It is designed to be simple to integrate into many projects.

💻 Source Code: [http://github.com/GT-TDAlab/PIGO]
📘 Documentation: [http://gt-tdalab.github.io/PIGO/]

Quick Start Guide

First, download the PIGO release pigo.hpp. To compile a PIGO application, you'll need to use OpenMP and ensure pigo.hpp is in a directory where the compiler can find it.

Here we provide a simple example program. Create the file example.cpp in the same directory as pigo.hpp. Add the following to it:

#include "pigo.hpp"
#include <iostream>
using namespace std;
using namespace pigo;
int main(int argc, char** argv) {
    if (argc != 2) {
    	cerr << "Usage: " << argv[0] << " filename" << endl;
    	return 1;
    }
    
    Graph g { argv[1] };
    cout << "number of vertices: " << g.n() << endl;
    cout << "number of edges: " << g.m() << endl;
    
    cout << "vertex 0's neighbors:\n";
    for (auto n : g.neighbors(0))
        cout << n << endl;
    return 0;
}

Finally, compile the program with g++ -O3 -o example example.cpp -fopenmp.

You can now run the example program to print out the size of the graph and the neighbors of vertex 0.

For example, create the file toy.el:

0 4
4 3
0 5
0 9

./example toy.el should now print:

number of vertices: 10
number of edges: 4
vertex 0's neighbors:
4
5
9

Documentation

The documentation relies on the following dependencies:

To install additional Python dependencies, run pip install -r docs/requirements.txt.

Next, the documentation can be built by running cd build && cmake .. && make docs. The documentation will then be in build/docs/sphinx.

Running Tests

Unit tests are controlled using CMake. To use them, you will need a modern version of CMake. You can do the following: cd build && cmake .. && make -j 8 && ctest.

License

Please see LICENSE.md for the license.

Contributors

Contact

For questions or support please either open an issue or contact tdalab@cc.gatech.edu.

About

Parallel Graph Input Output

License:Other


Languages

Language:C++ 87.7%Language:Emacs Lisp 8.8%Language:CMake 3.5%