https://github.com/frederikheber/basso
BAnach Sequential Subspace Optimizer library for solving optimization problems in Banach spaces
https://github.com/frederikheber/basso
banach-space bregman-distance bregman-projection lp-spaces optimization-library python-interface sequential-subspace-optimization
Last synced: 3 months ago
JSON representation
BAnach Sequential Subspace Optimizer library for solving optimization problems in Banach spaces
- Host: GitHub
- URL: https://github.com/frederikheber/basso
- Owner: FrederikHeber
- License: other
- Created: 2017-04-09T09:59:19.000Z (about 8 years ago)
- Default Branch: stable
- Last Pushed: 2019-04-15T12:51:07.000Z (about 6 years ago)
- Last Synced: 2025-01-12T23:47:06.532Z (5 months ago)
- Topics: banach-space, bregman-distance, bregman-projection, lp-spaces, optimization-library, python-interface, sequential-subspace-optimization
- Language: C++
- Homepage: https://frederikheber.github.io/BASSO/
- Size: 2.23 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: ChangeLog
- License: COPYING
Awesome Lists containing this project
README
libBasso - BAnach Sequential Subspace Optimization library
==========================================================Basso is a library to minimize a constrained functional in a Banach space
setting. It is an extension of the sequential subspace optimization
method by Narkiss by multiple search directions.For more details we refer to the extensive [userguide](https://frederikheber.github.io/BASSO/).
Installation instructions:
--------------------------Basso depends on the following packages:
* cmake - make utility for checking prerequisites
* GSL - GNU Scientific library for function minimization
* NLopt - (optional) alternative (to GSL) function minimization library
* Eigen - C++ library for linear algebra
* ARPack - linear algebra library used for truncated SVD
* CppUnit - C++ library for unit testing
* boost - almost standard library (we require 1.54 due to logging)
* poco - poco is used to write iteration information to a sqlite3 database
* libpng - library for writing png files (used by a helper program)... using docker
----------------For an tutorial to the python interface of BASSO, there is a [docker image](https://hub.docker.com/r/frederikheber/basso)
using jupyter notebook available. It is run via
````
docker run -p 8888:8888 --name basso frederikheber/basso:latest
````
and afterwards you need direct your browser to the URL shown.... on Ubuntu
-------------
Eigen and CppUnit packages and reside in standard paths, hence we have to do nothingIt is advised to compile the source in a distinct build directory, e.g. in a subfolder "build64". This is referred to as out-of-source build. To prepare the compilation, call cmake then as follows:
cmake [options] ..
These *options* might be one of the following. Take caution to prepend them
before the path containing the **CMakeLists.txt** file!Typically, the installation path needs to be adapted: `... -DCMAKE_INSTALL_PREFIX:PATH=`
### using boost
If additionally boost libraries do not reside in standard folders, such as
/usr/include, /usr/lib ... but in ~/packages/boost the following options might help:.. -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_ROOT=/boost/
Note that boost libraries should have been compiled with "layout=tagged". Otherwise, FindBoost.cmake can not find the libraries and headers.
To allow for debugging, you might futher add "-DBoost_DEBUG=ON".
### using Eigen
If Eigen resides in some specific folder, add it as follows
.. -DEIGEN3_INCLUDE_DIR=/include/eigen3
### Debug or Release builds
In general, to compile in debugging information add
-DCMAKE_BUILD_TYPE=Debug
to compile without use
-DCMAKE_BUILD_TYPE=Release
Documentation
-------------To generate the doxygen documenation, you use
make doc
The generated API html can the be found under **src/Documentation/doc/html/index.html**.
Moreover, the userguide in **doc/basso.pdf** and **doc/basso.html** is built by
default by calling `make`. If not, entercd doc; make
Timing Measurements
-------------------Add
-DUSE_TIMINGS=true
to activate the timing measurements of each part of the algorithm.
Parallelization
---------------The example MatrixFactorizer has been implemented for parallel execution with
both MPI and OpenMP. However, only one of the two can be activated during
compilation.For **MPI** add
-DUSE_MPI=True
and for **OpenMP** add
-DUSE_OPENMP=True
to the cmake command line. Note that only one of them may be True at the same
time (but both can be False in which case factorization is done sequentially.)Special purpose diff
--------------------Result files are compared against stored files in the regression tests using
diff by default. `diff` compares literally and does not know about numerical
(im)precision. Hence, a different diff, such as ndiff, may be specified via-DUSE_NDIFF=ON -DNDIFF_PATH=
-DNDIFF_OPTIONS:LIST="-relerr;1e-4;-q"to activate comparison of outputfiles with ndiff. The semicolons ";" are
required to ensure that we have a list of options (otherwise they are presented
to ndiff as single string which will not work).Note: There is another `ndiff` program used to compare XML output files from
nmap. Hence, the path NDIFF_PATH to ndiff's bin folder should always be given.Various Tests
-------------Various compile switches exist to enable more testing of the algorithm.
TRUESOLUTION Calculates true solution in inner MatrixFactorizer loop to calculate Bregman distance and check convergence (see src/MatrixFactorizer.cpp).
FULLMATRIXNORM Calculates operator norm via SVD instead of matrix norm (takes O(N^3) !) (cmake define or compile switch)