graphB+ v0.2

graphB+ is a balancing algorithm for signed social network graphs. It operates on graphs stored in CSV format. A sample input graph can be found here.

The inputs are simple text files consisting of a header line followed by an arbitrary number of lines, each specifying one edge of the graph, where the edge weight is the sign (either 1 or -1):

From Node ID, To Node ID, Edge Weight

Click on to download the CUDA code or on graphBplus_02.cpp to download the OpenMP C++ code (with g++ intrinsics). Note that graphB+ is protected by the 3-clause BSD license included in the beginning of the code.

The CUDA code can be compiled as follows:

nvcc -O3 -arch=sm_70 -o graphBplus

The OpenMP C++ code can be compiled as follows:

g++ -O3 -march=native -fopenmp graphBplus_02.cpp -o graphBplus

To run the code on the input file graph.csv with 100 samples and save the results of the balanced solutions in out.csv, enter:

./graphBplus graph.csv 100 out.csv

To obtain the inputs used in the paper listed below and convert them to our format, download and run the file Note that this script takes about an hour to execute and requires a large amount of disk space.


G. Alabandi, J. Tesic, L. Rusnak, and M. Burtscher. "Discovering and Balancing Fundamental Cycles in Large Signed Graphs." Proceedings of the 2021 ACM/IEEE International Conference for High-Performance Computing, Networking, Storage and Analysis. November 2021. [pdf]

This work has been supported in part by the National Science Foundation under Award Number 1955367, by the Department of Energy, National Nuclear Security Administration under Award Number DE-NA0003969, and by a hardware donation from NVIDIA Corporation.

Official Texas State University Disclaimer