Graph generators for external memory BFS algorithms

This page is no longer maintained. The graph generator package will soon be shifted to a new place.

We provide two different graph generator tools for external memory BFS algorithms. The first one is based on the external memory BFS code by Frederik Juul Christiani and Vitaly Osipov. The other one is based on my external memory BFS code and requires STXXL . Both tools generate graphs in the format of DIMACS shortest path challenge and can be used for shortest paths as well (though all the edge weights are one).


Download


Mmap based graph generator


This graph generator is based on linux mmap function and popt.h. In order to be able to generate large graphs using this tool, one needs a 64-bit architecture.

Generated graph types:

The command-line options for this tool are:

-t, --type=TYPE which type of graph to generate (random,layer,3dgrid,hamilton,bullseye,line,spiderweb)
-v, --vertices=NUM number of vertices in the generated graph
-e, --edges=NUM number of edges in the generated graph
-r, --ratio=DOUBLE ratio of edges to vertices in the generated graph
-l, --layer=NUM number of vertices in each layer for Layered graphs
-s, --shuffle shuffle vertices (use this option with the -t line in order to create Random Line graph)
-n, --name=STRING name of the generated graph
-o, --filename=FILE output filename of the generated graph
-d, --verbose increase verbosity
-V, --version show version information
-b, --blocksize=NUM memory block size (this is a parameter B used for generating Spider Web graphs)

STxxl based graph generator


This graph generator tool runs on all architectures, but requires STXXL .

It generates the following graphs (Most graphs are also described in [EM_BFS_AJW]):

The command-line options for this tool are:

-a, --alpha One of the parameters for generating 1-dimensional geometric graphs
-e, --edges Specify the number of edges for the graph to be generated. For line_graphs, grid _graphs and some other graph classes, the number of edges are directly computed from the number of nodes and this parameter becomes dysfunctional. If the number of edges are greater than 231, please use -f instead.
-f, --log_edges Specify the (base 2) log of number of edges. It has same restrictions as -e, --e dges. For large number of edges, it's recommended to use this parameter.
-h, --help Displays this usage guide and exit succesfully. No other output is generated.
-l, --log_nodes Specify the (base 2) log of number of nodes. For large number of nodes, it's recommended to use this parameter.
-n, --nodes Specify the number of nodes for the graph to be generated. If the number of nodes are greater than 231, please use -l instead.
-p, --p_grid A grid graph is a X_nodes x Y_nodes grid graph in which each edge in the grid exists with a probability p_grid.
-t, --type Specify the graph type. Valid graph types are "random", "grid", "geometric", "mr_worst", "mm_worst", "real_web", "spider_web", "simple_line", "random_line" and "worst_line".
-u, --noU One of the parameters for generating MM BFS worst graphs
-w, --web_graph Specify the path of the web-graph. Only required if you are using this generator as a DIMACS format translator of web-crawl graph.
-x, --X_nodes A grid graph is a X_nodes x Y_nodes grid graph in which each edge in the grid exists with a probability p_grid.
-y, --Y_nodes A grid graph is a X_nodes x Y_nodes grid graph in which each edge in the grid exists with a probability p_grid.
--mu One of the parameters for generating MM BFS worst graphs