Skip to content

Parallel implementation for finding low-stretch spanning trees.

License

Notifications You must be signed in to change notification settings

dnezam/parallel-lsst

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Determining Low-Stretch Spanning Trees (LSST) is increasingly used as a subroutine in graph algorithms and linear solvers. Simultaneously, the increasing size of graphs that need to be processed motivates the search for parallel and efficient LSST algorithms. To this end, we implement and evaluate a variety of LSST algorithms. We find that out of our parallel algorithms, ”Low-Stretch Parallel Exponential Shift” consistently delivers low-stretch results with a reasonable runtime. Full Report

Authors: August Rønberg, Daniel Nezamabadi, Dennis Buitendijk, Yves Baumann, Zijan Zhang

Files created/modified by us

Important Notes

Our AKPW algorithm has an unfortunate name in our codebase. This is due to some early confusion and was kept. As seen above it is located in low-avg-stretch/benchmarks/LowAverageStretchTree_ParallelStarDecomp. Additionally in the benchmarking output it is named StarDecomp, while our Star Decomposition is named SSSP_StarDecomp there.

Also, the improved Star Decomposition is not included in the benchmarking script. If you want to use the script to benchmark it you would have to modify line 32 to the location of the improved version.

Requirements

We used the following software:

  • GCC version 8.1
  • Python version 3.8
  • Bazel version 1.15

Additionally we used Parlay in combination with GBBS where the source code is included in the repo.

This repo also contains a Dockerfile that sets up the execution environment and can be used with VS Code (with also Remote Container Extension).

Please note that if you are not using the Docker image, make sure that you install the correct bazel version or use the include executable ./bazel.

Building the code

All the code in this repository is to be built using Bazel. To do this use the commands listed below. Note that if you are using the provided executable, prepend a ./ before each command.

  • bazel build //benchmarks/LowAvgStretch/Algo_spanner:RandomSpanner
  • bazel build //benchmarks/LowAvgStretch/Algo_SSSP_ParallelStarDecomposition:SSSP_ParallelStarDecomposition
  • bazel build //benchmarks/LowAvgStretch/Algo_SSSP_ParallelStarDecomposition_improved:SSSP_ParallelStarDecomposition_improved
  • bazel build //benchmarks/LowAvgStretch/LSPES:RunLSPES
  • bazel build //benchmarks/LowAverageStretchTree_ParallelStarDecomp:LAS_ParaStar
  • bazel build --config=bench //foreign:seq_unweighted_alon

Please note that the following are also available, but were not benchmarked.

  • bazel build --config=bench //foreign:par_weighted_abraham
  • bazel build --config=bench //foreign:seq_weighted_alon
  • bazel build --config=bench //foreign:seq_weighted_abraham
  • bazel build --config=bench //foreign:seq_weighted_emel
  • bazel build --config=bench //foreign:seq_weighted_kruskal

The following will have to be called to build the tools for calculating stretch:

bazel build --config=bench //tools:*

The executable binary will be placed in the directory bazel-bin/.

Running code

Inputs

For each graph we have two input formats: Binary(filename ends with _BIN), and GBBS(filename ends with _GBBS). This is due to the different input formats required by code from the directory foreign and GBBS. Any algorithm in the directory foreign takes the Binary format as input.

Commands

With some of the algorithms we can run the stretch calculation seperately. As such they will need to specify an output directory to write the output graph into. Others will directly do the stretch calculation internally and print it to commandline. All algorithms will print the runtime to the commandline.

  • ./bazel-bin/benchmarks/LowAvgStretch/Algo_spanner/RandomSpanner [-rounds x] <path_to_inputfile(GBBS)> <path_to_outdir>
  • ./bazel-bin/benchmarks/LowAvgStretch/Algo_SSSP_ParallelStarDecomposition/SSSP_ParallelStarDecomposition [-rounds x] <path_to_inputfile(GBBS)> <path_to_outdir>
  • ./bazel-bin/benchmarks/LowAvgStretch/LSPES/RunLSPES [-rounds x] <path_to_inputfile(GBBS)> <path_to_outdir>
  • ./bazel-bin/benchmarks/LowAverageStretchTree_ParallelStarDecomp/LAS_ParaStar [-rounds x] <path_to_inputfile(GBBS)> <path_to_outdir>
  • ./bazel-bin/foreign/seq_unweighted_alon [-rounds x] <path_to_inputfile(BIN)> <path_to_outdir>

For the not benchmarked algorithms:

  • ./bazel-bin/foreign/par_weighted_abraham [-rounds x] <path_to_inputfile(BIN)>
  • ./bazel-bin/foreign/seq_weighted_alon [-rounds x] <path_to_inputfile(BIN)>
  • ./bazel-bin/foreign/seq_weighted_abraham [-rounds x] <path_to_inputfile(BIN)>
  • ./bazel-bin/foreign/seq_weighted_emel [-rounds x] <path_to_inputfile(BIN)>
  • ./bazel-bin/foreign/seq_weighted_kruskal [-rounds x] <path_to_inputfile(BIN)>

For the stretch calculation choose the one according to the input format of the algorithm used:

  • ./bazel-bin/tools/test_stretch_gbbs <original_input_graph(GBBS)> <algorithm_output_dir>/
  • ./bazel-bin/tools/test_stretch_nx <original_input_graph(BIN)> <algorithm_output_dir>/

Please note that the output directory should only hold trees produced from the same input graph. Also the script will calculate the stretch for all trees in the directory.

Benchmarking inputs

All our benchmarking inputs are located in the branches all_data and max_data using git-lsf. In particular max_data holds our inputs for strong scaling in the directory test_data, and all_data holds our inputs for weak scaling in the directory weak_scaling_data

Scripts

We have included several scripts in the directory scripts/dphpc_benchmarking. This includes a script for automated benchmarking called run_benchmarks.py and three scripts to produce plots from the output data called plot_single_graph_multiple_algos.py, plot_snap2.py, and plot_weak_scaling-py

Results

We have included our benchmarking results in the directory scripts/dphpc_benchmarking/benchmarks along with some plots in scripts/dphpc_benchmarking/plot_output

About

Parallel implementation for finding low-stretch spanning trees.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 64.8%
  • Jupyter Notebook 33.6%
  • Python 0.7%
  • Starlark 0.6%
  • Makefile 0.1%
  • Assembly 0.1%
  • Other 0.1%