Problems Installing Julia and MKL OSX

mkl

#1

Hello guys,

I tried to install julia with MKL but I got an error when compiling the code.
I pretty much followed what is explained here:

Do you have any hints on what to do? Here I list the steps I took:

My steps
  • Download MKL from intel website (m_mkl_2019.0.117.dmg)

  • Open m_mkl_2019.0.117.dmg and follow the installation instructions

  • Create a folder:

    mkdir  julia_from_source
  • Tell the path of MKL
source /opt/intel/mkl/bin/mklvars.sh intel64
  • donwload the julia git repo
    git clone https://github.com/JuliaLang/julia
  • Checkout to a stable julia version:
    cd julia
    git checkout v1.0.1
  • Change the code in Make.inc to specify to use MKL

Chage this

	## Settings for various Intel tools
	# Set to 1 to use MKL
	USE_INTEL_MKL ?= 0

to this

## Settings for various Intel tools
# Set to 1 to use MKL
USE_INTEL_MKL = 1
  • install cmake
brew install cmake
  • Compile the code
     make

Prints, after 30 min of compiling…

		.
		.
		.
    CC src/cgmemmgr.o
    CC src/llvm-api.o
    LINK usr/lib/libjulia.1.0.dylib
    CC ui/repl.o
    LINK usr/bin/julia
Creating usr/etc/julia/startup.jl
Copying in usr/share/man/man1/julia.1
/Applications/julia_from_source/julia/contrib/install.sh 755 /Applications/julia_from_source/julia/contrib/julia-config.jl /Applications/julia_from_source/julia/usr/share/julia/
    PERL base/pcre_h.jl
    PERL base/errno_h.jl
    PERL base/build_h.jl.phony
    PERL base/file_constants.jl
    PERL base/uv_constants.jl
    PERL base/version_git.jl.phony
make[1]: *** [/Applications/julia_from_source/julia/usr/lib/julia/libmkl_rt.dylib] Error 1
make: *** [julia-base] Error 2


#2

Could you finally build it successfully?


#3

No…
I am thinking about trying to do this in a docker so that, If I end up beeing able to do it, anyone can use the same Dockerfile.


#4

I’ve only done this on Linux, but I’d follow the ‘official’ steps here: https://github.com/JuliaLang/julia#intel-mkl (while not very detailed) rather than the ones in the StackOverflow answer. compilervars.sh vs. mklvars.sh is one of the differences between those two. No need to edit Make.inc, that’s what Make.user is for (create if it doesn’t exist). Also, use make -j 6 e.g. to compile using 6 threads (adjust to your system), to reduce compilation time.


#5

Oh, see also https://github.com/JuliaLang/julia/issues/15133.