-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathhow_to_compile
More file actions
30 lines (26 loc) · 1.25 KB
/
how_to_compile
File metadata and controls
30 lines (26 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[Whether to compile]
The file "otFunctions/W1PD_ML.m" does not need compilation.
The file "otFunctions/W1PDHG_ML.m" calls a mex file. Thus we have to compile "emdPDHG.cpp" before running.
[Compilation on Linux]
1. install g++: sudo apt-get install g++
2. install MATLAB (later than R2016a)
3. install fftw, a libary to compute FFT.
3-1. download the tar.gz file from http://www.fftw.org/download.html
3-2. unzip the file to the home path ~/
3-3. type in terminal: cd ~/fftw-3.3.8
3-4. type in terminal: ./configure --enable-shared
3-5. type in terminal: make
3-6. type in terminal: sudo make install
4. run "initialize.m"
5. run "src_c/compile_pdhg.m", there will be a "emdPDHG.mexa64".
[Compilation on MacOS]
similar to Linux. Eventually there will be a "emdPDHG.mexmaci64".
[Compilation on Windows]
1. install MINGW64: http://www.math.ucla.edu/~wotaoyin/windows_coding.html
2. install MATLAB (later than R2016a)
3. install fftw: http://www.math.ucla.edu/~wotaoyin/windows_coding.html
4. run "initialize.m"
5. type in MATLAB command: setenv('MW_MINGW64_LOC','C:\msys64\mingw64');
6. type in MATLAB command: cd src_c;
7. type in MATLAB command: mex emdPDHG.cpp mexGateway_emd.cpp C:\msys64\mingw64\lib\libfftw3.a
8. there will be a file named "emdPDHG.mexw64".