Skip to content

Installation help

villekf edited this page Oct 29, 2020 · 42 revisions

Installation help

Windows

This section specifies the necessary installation information when using OMEGA on Windows.

MATLAB

Simply download and install MATLAB for Windows. Any version from 2009b and up should work, but the latest version is always recommended. If you are using an older version, however, you should use 64-bit version as 32-bit version is not supported.

Image processing toolbox and parallel computing toolbox are used for some specific features. However, (slower) fallback alternatives are used if these toolboxes are not found in most cases. The only function that requires image processing toolbox is the anisotropic diffusion MRP prior when using either implementation 1 or 4. Due to this, it does not work on Octave. A warning is produced if AD-MRP prior is used without the toolbox.

Octave

Simply download the binary installer for Octave and install the software (Windows-64, though the large data version should work as well). io and statistics packages are required for some features, but are easy to install with the following commands in the Octave user interface:

pkg install -forge io

pkg install -forge statistics

after which you need to load the statistics package

pkg load statistics

Anisotropic diffusion MRP prior when using either implementation 1 or 4 does not work on Octave. A warning is produced if AD-MRP prior is used without the toolbox.

C++ Compiler

You need a C++11 compiler to compile the necessary MEX-files on MATLAB. For a list of supported compilers for each version of MATLAB, see here. On Octave the built-in compiler is sufficient (implementation 2 is not supported).

On MATLAB, however, Visual Studio is highly recommended. Depending on your MATLAB version, you might need an older version. To configure the C++ MEX-compiler you can use the command mex -setup C++ which will show the currently selected compiler, list all available compilers and show the necessary commands to switch the compiler.

MATLAB allows the use of MinGW++, but when using this compiler ArrayFire (implementation 2) will not work unless ArrayFire is built from the source with MinGW.

OpenCL

If you have a Nvidia GPU, then CUDA toolkit is recommended. Both Development and Runtime libraries are required, especially if CUDA support is desired.

If you have Intel GPU/CPU, you should use the Intel OpenCL SDK. When using a CPU you might need to install the runtimes as well.

If you are using AMD GPUs, it is recommended to download and install OCL-SDK. Additionally, you should install official drivers.

For AMD CPUs you should first install the OCL-SDK and then either the Intel CPU runtimes from above or build POCL on Windows (download). If you are using a newer version of Visual Studio, you need to do some modification to the POCL Windows script (setup_and_build_win64.sh). For Visual Studio 2019 you need to change the following sections on lines 29 and 38 "Visual Studio 12 Win64" to "Visual Studio 16" -A x64. For older Visual Studios, simply replace the number 12 with the version you are using (see e.g. Wikipedia).

ArrayFire

You should install the Visual Studio 2015 (x64) runtime libraries first.

On Windows simply download the Windows binary from ArrayFire and install it. For more help on installing ArrayFire on Windows see here.

The above, however, only works when using MATLAB. If you wish to use ArrayFire on Octave, you need to download the ArrayFire source and manually build it with MinGW-w64. That, however, is rather difficult as the CMake files assume Visual Studio and you have to manually edit them accordingly.

OMEGA

Download either a release version from releases, clone the current master with e.g. GitHub desktop or download an archive of the master-branch. If you downloaded either a release or master branch archive, you need to extract the contents to the folder of your choosing. Alternatively, if you are using MATLAB, you can download the package from the releases and simply run it in which case all the necessary folders will be automatically added to the MATLAB path.

Unless the MATLAB package was used, you need to add the source and mat-files folders to the MATLAB/Octave path (biograph-folder should be added if you intend to use mCT or Vision list-mode data files). In MATLAB you can do this by simply right clicking the folders and selecting "Add to path → Selected folders" by selecting the OMEGA folder itself and selecting "Add to path → Selected folders and subfolders". Alternatively, if you are using for example Octave, you can add the paths with addpath('C:\path\to\OMEGA\source') and addpath('C:\path\to\OMEGA\mat-files') or simply with addpath(genpath('C:\path\to\OMEGA\')). On MATLAB you can also add these folders to the list of folders in "Set path".

Linux

MATLAB

Simply download and install MATLAB for Linux. Any version from 2009b and up should work, but the latest version is always recommended. If you are using an older version, however, you should use 64-bit version as 32-bit version is not supported.

Image processing toolbox and parallel computing toolbox are used for some specific features. However, (slower) fallback alternatives are used if these toolboxes are not found in most cases. The only function that requires image processing toolbox is the anisotropic diffusion MRP prior when using either implementation 1 or 4. Due to this, it does not work on Octave. A warning is produced if AD-MRP prior is used without the toolbox.

Octave

There are several different ways to install Octave on Linux systems. For instructions on how to install Octave on variety of Linux distributions see the Octave wiki. You also need to install the Octave development files (e.g. liboctave-dev on Debian/Ubuntu). Alternatively, you can use distribution independent methods or just build from source.

io and statistics packages are required for some features, but are easy to install with the following commands in the Octave user interface:

pkg install -forge io

pkg install -forge statistics

after which you need to load the statistics package

pkg load statistics

C++ Compiler

A C++ compiler should already be included, but GCC/G++ is recommended. Any version 4.7 or up should be sufficient.

OpenCL

If you are using any GPU on Linux, it should be sufficient to simply download the OpenCL libraries and headers

Debian/Ubuntu: sudo apt-get install ocl-icd-opencl-dev opencl-headers ocl-icd-libopencl1

as well as the official drivers.

Alternatively, if you have a Nvidia GPU, then CUDA toolkit can be used. Both Development and Runtime libraries are required, especially if CUDA support is desired.

AMD GPUs should work with only the drivers.

If you have Intel GPU/CPU, you can use the Intel OpenCL SDK. When using a CPU you might need to install the runtimes as well. The runtimes, however, might not anymore support your current OS version.

Alternatively, and especially when using AMD CPUs, POCL is recommended (download). Note that if you use the default installation path, you need to move /usr/local/etc/OpenCL/vendors/pocl.icd to /etc/OpenCL/vendors/.

A useful, but not necessary, package is clinfo that should be available as a package (e.g. sudo apt-get install clinfo). clinfo displays all the available OpenCL platforms, the devices available and various other features. A short list of OpenCL platforms and devices can be obtained in OMEGA with the OpenCL_device_info() function.

ArrayFire

Simply download the Linux binary from ArrayFire and install it. For more help on installing ArrayFire on Linux see here.

Alternatively, you can build from source. Note, however, that if you are using the official binary that you should install it to the default location in /opt and secondly that you should rename all the libforge files in /opt/arrayfire/lib64 to something else (e.g. libforge.so.old). Alternatively, you can use a "no-GL" version, but it is an older version that should, nevertheless, work. If you are building ArrayFire from source, it is recommended to disable Forge (set AF_BUILD_FORGE to OFF).

OMEGA

Download either a release version from releases, clone the current master with e.g. git clone https://github.com/villekf/OMEGA.git or download an archive of the master-branch. If you downloaded either a release or master branch archive, you need to extract the contents to the folder of your choosing. Alternatively, if you are using MATLAB, you can download the package from the releases and simply run it in which case all the necessary folders will be automatically added to the MATLAB path.

Unless the MATLAB package was used, you need to add the source and mat-files folders to the MATLAB/Octave path (biograph-folder should be added if you intend to use mCT or Vision list-mode data files). In MATLAB you can do this by simply right clicking the folders and selecting "Add to path → Selected folders" by selecting the OMEGA folder itself and selecting "Add to path → Selected folders and subfolders". Alternatively, if you are using for example Octave, you can add the paths with addpath('/path/to/OMEGA/source') and addpath('/path/to/OMEGA/mat-files') or simply with addpath(genpath('/path/to/OMEGA/')). On MATLAB you can also add these folders to the list of folders in "Set path".

Mac

Note
Mac build of OMEGA hasn’t been tested so far.

MATLAB

Simply download and install MATLAB for Windows. Any version from 2009b and up should work, but the latest version is always recommended. If you are using an older version, however, you should use 64-bit version as 32-bit version is not supported.

Image processing toolbox and parallel computing toolbox are used for some specific features. However, (slower) fallback alternatives are used if these toolboxes are not found in most cases. The only function that requires image processing toolbox is the anisotropic diffusion MRP prior when using either implementation 1 or 4. Due to this, it does not work on Octave. A warning is produced if AD-MRP prior is used without the toolbox.

Octave

To install Octave on Mac, see their wiki for instructions.

io and statistics packages are required for some features, but are easy to install with the following commands in the Octave user interface:

pkg install -forge io

pkg install -forge statistics

after which you need to load the statistics package

pkg load statistics

C++ Compiler

It is recommended to install and use Xcode from the Mac app store.

OpenCL

OpenCL should already be included with your Mac installation.

ArrayFire

Simply download the Mac binary from ArrayFire and install it. For more help on installing ArrayFire on Mac see here.

Alternatively, you can build from source.

OMEGA

Download either a release version from releases, clone the current master with e.g. git clone https://github.com/villekf/OMEGA.git or download an archive of the master-branch. If you downloaded either a release or master branch archive, you need to extract the contents to the folder of your choosing. Alternatively, if you are using MATLAB, you can download the package from the releases and simply run it in which case all the necessary folders will be automatically added to the MATLAB path.

Unless the MATLAB package was used, you need to add the source and mat-files folders to the MATLAB/Octave path (biograph-folder should be added if you intend to use mCT or Vision list-mode data files). In MATLAB you can do this by simply right clicking the folders and selecting "Add to path → Selected folders" by selecting the OMEGA folder itself and selecting "Add to path → Selected folders and subfolders". Alternatively, if you are using for example Octave, you can add the paths with addpath('/path/to/OMEGA/source') and addpath('/path/to/OMEGA/mat-files') or simply with addpath(genpath('/path/to/OMEGA/')). On MATLAB you can also add these folders to the list of folders in "Set path".