JihoYang / maxFlowminCut

GPU accelerated first order primal-dual algorithm for solving convex optimization problems, and its application in maximum flow minimum cut graph problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maxFlowminCut

GPU accelerated first order primal-dual algorithm for solving convex optimization problems, and its application in maximum flow minimum cut graph problem

This work was conducted as part of Practical Course: GPU Programming in Computer Vision at Technische Universität München (summer semester 2017).

Three MSc Computational Science & Engineering students contributed to this work (in alphabetical order):

  • Apoorva Gupta
  • Jorge Salazar
  • Jiho Yang

Four directories are present in this repository: CPU, GPU, IBFS, and graphs

Requirements

  • Linux installed machine with NVIDIA GPU
  • NVIDIA CUDA Compiler (nvcc)
  • python 3 with matplotlib

Compilation

  • CPU Implementation : Use Makefile
make
  • GPU Implementation : Cmake constructed
cd cmake_build
rm CMakeCache.txt
cmake ..
make

Binary execution

  • CPU Implementation :
./sim <test.bk>

For instance

./sim ../graphs/test.bk
  • GPU Implementation :
./main <test.bk> -alpha <value> -rho <value> -it <value>

where alpha and rho are hyperparameters for computing time steps, and it is the maximum number of iterations. Default values for alpha, rho, and it are 1, 1, and 10000, respectively.

For instance

./main ../../graphs/test.bk -alpha 1 -rho 1 -it 1000

Automation with bash script

The compilation, execution, and some of the visualisations are automated via bash script.

  • Usage:
./script

About

GPU accelerated first order primal-dual algorithm for solving convex optimization problems, and its application in maximum flow minimum cut graph problem


Languages

Language:C++ 47.9%Language:CMake 28.3%Language:Cuda 8.7%Language:Makefile 6.8%Language:C 6.6%Language:Shell 1.4%Language:Python 0.3%