Installing MPTK on Linux and OSX
FAQ overview
- Where to find the latest release including sources/binaries ?
- Which tools are needed to build MPTK
- Which external libraries are required to build MPTK ?
- How to use include files and libraries for the external required libraries
- How to Fix FFTW used plan with wisdom in FFTW configuration
Where to find the latest release including sources/binaries ?
The sources and binaries can be foundhere.
Which tools are needed to build MPTK
You will need
- cmake
- a standard and functional development environment for your platform such as
- on Mac OSX : XCode or Eclipse, or just gcc and the corresponding tools (linker, etc)
- on Windows : Microsoft Visual Studio
- on Linux and other Unixes : Eclipse or just gcc and the corresponding tools
Which external libraries are required to build MPTK ?
There are three external libraries required to build MPTK:- Pthread (which should be include natively by the operating system)
- Libsndfile
- FFTW
How to use include files and libraries for the external required libraries
-
In order to use MPTK executable files, the path to the required external libraries files has to be referenced in the LD_LIBRARY_PATH environment variable of your operating system.
- Advice if you're a MacOsX User :
For a better use of MPTK, the required libraries should be build for multiple architectures (using "+universal" with port for example) otherwise you could have errors like :- ld: warning: in /sw/lib/libsndfile.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /sw/lib/libfftw3.a, file was built for unsupported file format which is not the architecture being linked (x86_64) - ld: warning: in /sw/lib/libsndfile.dylib, file was built for i386 which is not the architecture being linked (x86_64)
-
In order to build, You have to install the libraries on your operating system. CMake will find the path to include files and libraries files in the case of a “standard” install of this external libraries, other way you will have to specify this path in order to generate the build system using CMake. See Build MPTK for Unix pdf document for more informations.
How to Fix FFTW used plan with wisdom in FFTW configuration
MPTK currently relies on FFTW to compute Fast Fourier Transforms. The principle of FFTW is to adaptively select the fastest running codelet to perform a given FFT, which is good for performance. However, this can lead to non deterministic behaviour of MPTK since two consecutive runs of the same command (e.g. 'mpd') with the same options on the same data can yield slightly different results. To avoid this issue we have implemented a mechanism which allows MPTK to fix which FFT codelet is used for a specific type of FFT computation. To do this, you just need to create and export a environment variable called MPTK_FFTW_WISDOM and set this environnement variable with the path of the file you want to use in order to save the FFTW configuration. MPTK will create a « wisdom » file, that will be reloaded each time you use MPTK. It means that the codelets use to compute FFTW plan will be the same between two successive decompositions with the same parameters.
- For bash or sh or ash:
export MPTK_FFTW_WISDOM=/udd/broy/local/fftw_wisdom_file
If you want to fix permanently the used FFTW plan, just set this environment variable when the console is launched, using for that the /etc/profile, ~/.profile or .bashrc file, according to your system configuration.
- For tcsh or csh :
setenv MPTK_FFTW_WISDOM=/udd/broy/local/fftw_wisdom_file
If you want to fix permanently the used FFTW plan, just set this ebvironment variable when the console is launched, using for that the /etc/csh cshrc file, according to your system configuration.