Code Monkey home page Code Monkey logo

prost's Introduction

prost

prost is a framework for solving large-scale problems with proximal structure. It contains efficient CUDA implementations of several primal-dual algorithms such as ADMM or PDHG and common proximal and linear operators.

The general class of problems that can be solved is:

id

where g and f* are convex functions mapping to the extended real line, whose proximal mapping is cheap to evaluate and K is a linear operator.

Installation

Dependencies

Make sure to have the newest CUDA toolkit installed and that nvcc is in the current path. We recommend to use a GPU of compute capability at least 3.0.

The other dependency is MATLAB. Interfaces to C/C++ and Python are planned for future releases.

Quick start

git clone https://github.com/tum-vision/prost.git
cd prost
mkdir build
cd build
cmake ..
make

Getting started

To get familiar with the framework, we recommend looking at the MATLAB examples. To do so, start MATLAB and add the folder /matlab/ to your path. Move to the folder /matlab/examples/ and run any of the examples such as example_rof_primaldual.m.

To get an overview over the implemented proximal and linear operators look into the directories /matlab/+prost/+function and /matlab/+prost/+block. For more information about the individual functions you can use the help command within MATLAB, e.g.,

help prost.function.sum_1d
help prost.function.sum_norm2
help prost.block.diags

Troubleshooting / Hints

MacOSX

Tested using Apple LLVM version 7.0.2 (clang-700.1.81), CUDA 7.5 and matlab-R2015b.

For CUDA 8.0, use Apple LLVM version 7.3.0 (clang-703.0.31), Xcode 7.3.1. See also the installation guide here.

In case of the error message "No supported compiler or SDK was found.", one needs to add the line

<dirExists name="$$/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" />

to the clang and clang++ config files

edit ([matlabroot '/bin/maci64/mexopts/clang_maci64.xml'])
edit ([matlabroot '/bin/maci64/mexopts/clang++_maci64.xml'])

Finally, run from within MATLAB

mex -setup
mex -setup C++

Linux

Tested using gcc-4.8, matlab-R2016a and CUDA 7.5, as well as gcc-5.4, matlab-R2016b and CUDA 8.0.

In case of an invalid mex-file error, start MATLAB with the following preload command:

LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab-R2015b

Windows

Tested using Visual Studio 2013 Community (english version) and CUDA 7.5. Run cmake-gui and select Visual Studio 12 2013 Win64 as generator. The following values might need to be set manually

  • Set CUDA_HOST_COMPILER to the path where cl.exe is located
  • Set Matlab_DIR and Matlab_ROOT_DIR to the MATLAB directory

Once these values have been set, run configure and generate once more in cmake. Finally, open the Visual Studio solution and compile as Release x64 and after compilation has finished build the project INSTALL in the solution, which copies the mex file to the correct directory.

prost's People

Contributors

emanuellaude avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.