Skip to main content

Multi-threaded Optimization Toolbox

Project description

The Multi-threaded Optimization Toolbox (MOT) is a library for parallel optimization and sampling using the OpenCL compute platform. Using OpenCL allows parallel processing using all CPU cores or using the GPU (Graphics card). MOT implements OpenCL parallelized versions of the Powell, Nelder-Mead Simplex and Levenberg-Marquardt non-linear optimization algorithms alongside various flavors of Markov Chain Monte Carlo (MCMC) sampling.

For the full documentation see: https://mot.readthedocs.org

Can MOT help me?

MOT can help you if you have multiple small independent optimization problems. For example, if you have a lot of (>10.000) small optimization problems, with ~30 parameters or less each, MOT may be of help. If, on the other hand, you have one big optimization problem with 10.000 variables, MOT unfortunately can not help you.

Example use case

MOT was originally written as a computation package for the Microstructure Diffusion Toolbox, used in dMRI brain research. In diffusion Magnetic Resonance Imaging (dMRI) the brain is scanned in a 3D grid where each grid element, a voxel, represents its own optimization problem. The number of data points per voxel is generally small, ranging from 30 to 500 datapoints, and the models fitted to that data have generally somewhere between 6 and 20 parameters. Since each of these voxels can be analyzed independently of the others, the computations can be massively parallelized and hence programming in OpenCL potentially allows large speed gains. This software toolbox was originally built for exactly this use case, yet the algorithms and data structures are generalized such that any scientific field may take advantage of this toolbox.

For the diffusion MRI package MDT to which is referred in this example, please see https://github.com/cbclab/MDT.

Summary

  • Free software: LGPL v3 license

  • Interface in Python, computations in OpenCL

  • Implements Powell, Nelder-Mead Simplex and Levenberg-Marquardt non-linear optimization algorithms

  • Implements various Markov Chain Monte Carlo (MCMC) sampling routines

  • Tags: optimization, sampling, parallel, opencl, python

Quick installation guide

The basic requirements for MOT are:

  • Python 3.x

  • OpenCL 1.2 (or higher) support in GPU driver or CPU runtime

Linux

For Ubuntu >= 16 you can use:

  • sudo add-apt-repository ppa:robbert-harms/cbclab

  • sudo apt update

  • sudo apt install python3-pip python3-mot

  • sudo pip3 install tatsu

For Debian users and Ubuntu < 16 users, install MOT with:

  • sudo apt install python3 python3-pip python3-pyopencl python3-devel

  • sudo pip3 install mot

Mac

Windows For Windows the short guide is:

For more information and for more elaborate installation instructions, please see: https://mot.readthedocs.org

Caveats

There are a few caveats and known issues, primarily related to OpenCL:

  • Windows support is experimental due to the difficulty of installing PyOpenCL, hopefully installing PyOpenCL will get easier on Windows soon.

  • GPU acceleration is not possible in most virtual machines due to lack of GPU or PCI-E pass-through, this will change whenever virtual machines vendors program this feature. Our recommendation is to install Linux on your machine directly.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mot-0.6.10.tar.gz (159.9 kB view details)

Uploaded Source

Built Distribution

mot-0.6.10-py2.py3-none-any.whl (165.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mot-0.6.10.tar.gz.

File metadata

  • Download URL: mot-0.6.10.tar.gz
  • Upload date:
  • Size: 159.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for mot-0.6.10.tar.gz
Algorithm Hash digest
SHA256 fc3b936db17c760025f9bc529a267a0625fc171dd4d9803d74c5207e582f11d7
MD5 e9f3262af78e2c0c88a612d1f9861523
BLAKE2b-256 e570104026bca82f0fdbed2e2946a850a456132bb1656afc3fd9b953b67266c0

See more details on using hashes here.

File details

Details for the file mot-0.6.10-py2.py3-none-any.whl.

File metadata

  • Download URL: mot-0.6.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 165.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for mot-0.6.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 da89a5520d1537a3f3d144feaa0c147a013762f13ca5fcb346080d54c8d525e9
MD5 2c03e2ae22b3d1f2d65a6084626b299f
BLAKE2b-256 52ce80866096bd1a955af94abe6fb312f166aef6a17bd7ea453bcab138bdcc1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page