Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify MKL compiling and linking process #68

Closed
sguada opened this issue Feb 3, 2014 · 2 comments
Closed

Clarify MKL compiling and linking process #68

sguada opened this issue Feb 3, 2014 · 2 comments

Comments

@sguada
Copy link
Contributor

sguada commented Feb 3, 2014

In the Intel MKL Link advisory explains the different ways to link MKL with other code. That includes the option of static linking, dynamic linking or single dynamic linking.
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

It mentions that when compiling for OS.X one has to add -m64 to the clang options, but not for Linux.

It also mentions that in case of dynamic linking then one has to run mklvars.sh to set the appropriate vars.
http://software.intel.com/sites/products/documentation/hpc/mkl/userguides/mkl_userguide_win/MKL_UG_getting_started/Environment_Setting_Scripts.htm

http://software.intel.com/sites/products/documentation/hpc/mkl/userguides/mkl_userguide_win/MKL_UG_linking_your_application/Using_dynamic_interface.htm

Apparently there are set of MKL redistributable libraries, that we could re-distribute with Caffe to let people run it without need to have MKL.

@sergeyk
Copy link
Contributor

sergeyk commented Feb 3, 2014

Just a note that -m64 wasn't required for me to get a successful OS X build.
I've written up the process at the bottom of this: http://caffe.berkeleyvision.org/installation.html

@shelhamer
Copy link
Member

The MKL library licensing does include redistribution of the library .so and .la files: http://software.intel.com/en-us/articles/which-intel-math-kernel-library-intel-mkl-libraries-are-redistributables. We have the option of distributing precompiled binaries if we so choose.

Lack of auto-configuration aside, our build and linking of MKL work. The dynamic linking documentation you referenced seems to be only for Windows, so we don't need to worry about mklvars.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants