Skip to content

Commit

Permalink
use MKL_jll instead of Conda during build (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored and ararslan committed Dec 5, 2019
1 parent 20b5373 commit 8a9197a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ version = "1.1.0"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
FFTW_jll = "f5851436-0d7a-5f13-b9de-f02708fd171a"
IntelOpenMP_jll = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MKL_jll = "856f044c-d86e-5d09-b602-aeab76dc8ba7"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
AbstractFFTs = "0.5"
Conda = "1"
FFTW_jll = "3.3"
IntelOpenMP_jll = "2018.0.3"
MKL_jll = "2019.0.117"
Reexport = "0.2"
julia = "1.3"

Expand Down
25 changes: 5 additions & 20 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,12 @@ end
if provider == "MKL"
const mkllib = Sys.iswindows() ? "mkl_rt" : "libmkl_rt"
# If BLAS was compiled with MKL and the user wants MKL-based FFTs, we'll oblige.
if BLAS.vendor() === :mkl
mklpath = Libdl.dlpath(mkllib)
else
using Conda
Conda.add("mkl_fft")
mklpath = joinpath(Conda.lib_dir(Conda.ROOTENV), mkllib)
end
mklpath = escape_string(mklpath)
isfile(depsfile) && rm(depsfile, force=true)
open(depsfile, "w") do f
println(f, """
# This is an auto-generated file, do not edit
import Libdl
const libfftw3 = "$mklpath"
open(depsfile, "w") do io
println(io, """
using IntelOpenMP_jll, MKL_jll
check_deps() = nothing
const libfftw3 = MKL_jll.libmkl_rt_path
const libfftw3f = libfftw3
function check_deps()
if Libdl.dlopen_e(libfftw3) == C_NULL
error("Unable to load MKL from '$mklpath'.\\n",
"Please rerun Pkg.build(\\"FFTW\\") and restart Julia.")
end
end
""")
end
elseif provider == "FFTW"
Expand Down

0 comments on commit 8a9197a

Please sign in to comment.