Community
cancel
Showing results for 
Search instead for 
Did you mean: 
huang__astone
Beginner
178 Views

Building GNU Octave 4.2.0 with MKL

I spent the day trying to build the current stable release of GNU Octave, version 4.2.0. I tried to follow "Using Intel MKL in GNU Octave", but I keep getting warning after warning and error after error. I guess time flies and a lot has changed since the article was written (January 5, 2011) and even since it's update to cover Octave 4.0.3.

I have all the prerequisites in place; I installed all libraries, I've got Java 8 OpenJDK (amd64) installed. I downloaded and installed Parallel Studio XE 2017 (update1) and MKL 2017.0.098. I've set all the environment variables as described in "Using Intel MKL in GNU Octave". But still, no success...

I'm a complete MKL noob and I know it's a lot to ask, but could anyone try to build Octave 4.2.0 from scratch following the build guide and give some hints? Or just write down how to do this, step by step?

I'm not planning on developing in MKL, I just would like to use all 12 threads (6 cores) of my Intel(R) Core(TM) i7-6800K CPU in GNU Octave. Btw, I'm using Ubuntu 16.04.

Best, Mark.

0 Kudos
1 Reply
Ying_H_Intel
Employee
178 Views

Hi Apollo,

Thanks for asking. I had updated the article for MKL 2017 this year + Octave 4.0.3. Not sure 4.2.0.  I will try later.

But according to my experience. a few failures are probably normal, much of them may not related to Intel Software tools. 

Here is workaround, which may avoid the step of build with MKL. Could you build Octave by default(exclude MKL) sucessfully or get one ready Octave version installed on your machine?

Then replace  the BLAS, LAPACK and FFT library with Intel MKL library manually. Then the Octave should get benefit from MKL automatically.

https://software.intel.com/en-us/articles/using-intel-mkl-in-gnu-octave

And some developer may see other libraries like  libblas.so.3,  libfftw3_threads.so.3  are listed  by " ldd liboctave/.libs/liboctave.so.3.0.2". If you  hope to use Intel MKL FFTW, BLAS, LAPACK etc,  you may need create the link manually:

sudo mv /usr/lib64/atlas/libtatlas.so.3 /usr/lib64/atlas/libtatlas.so.3.keep
sudo mv /usr/lib64/atlas/libsatlas.so.3 /usr/lib64/atlas/libsatlas.so.3.keep
sudo mv /lib64/libblas.so.3    /lib64/libblas.so.3.keep
sudo mv /lib64/liblapack.so.3 /lib64/liblapack.so.3.keep

sudo mv /lib64/libfftw3_threads.so.3    /lib64/libfftw3_threads.so.3.keep
sudo mv /lib64/libfftw3.so.3 /lib64/libfftw3.so.3.keep

sudo mv /lib64/libfftw3f_threads.so.3    /lib64/libfftw3f_threads.so.3.keep
sudo mv /lib64/libfftw3f.so.3 /lib64/libfftw3f.so.3.keep

sudo rm -rf /usr/lib64/atlas/libtatlas.so.3 /usr/lib64/atlas/libsatlas.so.3 /lib64/libblas.so.3 /lib64/liblapack.so.3  /lib64/libfftw3f.so.3 /lib64/libfftw3f_threads.so.3 /lib64/libfftw3_threads.so.3 /lib64/libfftw3_threads.so.3
sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /usr/lib64/atlas/libtatlas.so.3
sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /usr/lib64/atlas/libsatlas.so.3
sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /lib64/libblas.so.3
sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /lib64/liblapack.so.3

sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /lib64/libfftw3.so.3
sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /lib64/libfftw3_threads.so.3

sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /lib64/libfftw3f.so.3
sudo ln -s /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_rt.so /lib64/libfftw3f_threads.so.3

Best Regards,

Ying

 

Reply