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

switch to BinaryBuilder binaries #74

Merged
merged 5 commits into from Jun 18, 2018
Merged

switch to BinaryBuilder binaries #74

merged 5 commits into from Jun 18, 2018

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Jun 5, 2018

Closes #73.

@stevengj
Copy link
Member Author

stevengj commented Jun 5, 2018

@ararslan, is there test coverage for the MKL version?

@ararslan
Copy link
Member

ararslan commented Jun 5, 2018

No, I don't think MKL is available on any CI providers.

@stevengj
Copy link
Member Author

stevengj commented Jun 5, 2018

Do you have an MKL version installed that you can try?

@ararslan
Copy link
Member

ararslan commented Jun 5, 2018

I don't, unfortunately.

@andreasnoack
Copy link
Member

No, I don't think MKL is available on any CI providers.

travis-ci/travis-ci#5381 (comment) might be relevant here

@stevengj
Copy link
Member Author

stevengj commented Jun 6, 2018

To use this MKL, it seems like the build script should be updated so that you can simply specify the path of an MKL library rather than the one included with Julia...

@stevengj
Copy link
Member Author

stevengj commented Jun 11, 2018

Another possibility that occurs to me is to use the mkl_fft Anaconda package with Conda.jl, which has the advantage that I can easily try it locally.

… claiming to be FFTW 3.3.4 but not having sprint_plan
@stevengj
Copy link
Member Author

Updated the PR to add a Conda dependency, so that we can support using MKL even if Julia was not built with MKL support. Now Travis can exercise the MKL API.

REQUIRE Outdated
@@ -3,3 +3,4 @@ AbstractFFTs 0.3.0
Reexport
Compat 0.62.0
BinaryProvider 0.3.0
Conda
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunate to have to add a dependency on Conda but I don't know of a way around it...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the Conda dependency is actually quite small if you aren't using it — it only actually runs the Miniconda installer when you decide to add a Conda package.

@stevengj
Copy link
Member Author

stevengj commented Jun 13, 2018

Okay to merge?

(As I wrote above, the Conda.jl dependency itself is lightweight because Miniconda is only installed lazily. Conda also has BinDeps and JSON dependency, but the BinDeps support can probably be split into a separate package at some point.)

@staticfloat
Copy link
Collaborator

Out of curiosity, how can Conda distribute MKL for free? I thought MKL was proprietary?

@stevengj
Copy link
Member Author

stevengj commented Jun 13, 2018

Intel provides Conda packages via https://github.com/IntelPython, so I guess it's okay for Anaconda to get it directly from Intel.

@EthanAnderes
Copy link

EthanAnderes commented Jun 18, 2018

I ran into a small hiccup trying this out [with MKL]. However, I'm only an avid user so hope I'm not adding noise to the dev process.
When first trying it out I got

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-alpha.154 (2018-06-18 14:53 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 77449852cf* (0 days old master)
|__/                   |  x86_64-apple-darwin17.6.0

(v0.7) pkg> build FFTW
  Building FFTW → `~/.julia/dev/FFTW/deps/build.log`
 Resolving package versions...
Downloaded Nullables ────── v0.0.5
Downloaded JSON ─────────── v0.17.2
Downloaded VersionParsing ─ v1.1.1
Downloaded BinaryProvider ─ v0.3.2
Downloaded Conda ────────── v0.8.1
  Building Conda → `~/.julia/packages/Conda/S0nV/deps/build.log`
┌ Error: Error building `FFTW`; see log file for further info
└ @ Pkg.Operations Operations.jl:938

Here is what build.log reads

WARNING: Base.BLAS is deprecated: it has been moved to the standard library package `LinearAlgebra`.
Add `using LinearAlgebra` to your imports.
  likely near /Users/ethananderes/.julia/dev/FFTW/deps/build.jl:17
ERROR: LoadError: ArgumentError: Package Conda not found in current path:
 - Run `Pkg.add("Conda")` to install the Conda package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:871
 [2] top-level scope at /Users/ethananderes/.julia/dev/FFTW/deps/build.jl:21
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1089
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] include(::String) at ./client.jl:393
 [7] top-level scope at none:0
in expression starting at /Users/ethananderes/.julia/dev/FFTW/deps/build.jl:17

Now, I went back to check if Conda was installed and got this:

julia> using Conda
ERROR: ArgumentError: Package Conda not found in current path:
 - Run `Pkg.add("Conda")` to install the Conda package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:871

(v0.7) pkg> add Conda
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [8f4d0f93] + Conda v0.8.1
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [b99e7846] + BinaryProvider v0.3.2
  [8f4d0f93] + Conda v0.8.1
  [682c06a0] + JSON v0.17.2
  [4d1e1d77] + Nullables v0.0.5
  [81def892] + VersionParsing v1.1.1

(v0.7) pkg> build FFTW
  Building Conda → `~/.julia/packages/Conda/S0nV/deps/build.log`
  Building FFTW ─→ `~/.julia/dev/FFTW/deps/build.log`
 Resolving package versions...

Now everything works great. Getting OpenBlas in LinearAlgebra and can tell I'm working with MKL by the output of plan_rfft (i.e. it would look different if it was FFTW).

julia> LinearAlgebra.BLAS.vendor()
:openblas64

julia> m = rand(Float32, 2^14, 2^14);

julia> p = plan_rfft(m)
FFTW real-to-complex plan for 16384×16384 array of Float32

Here is my version info

julia> versioninfo()
Julia Version 0.7.0-alpha.154
Commit 77449852cf* (2018-06-18 14:53 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin17.6.0)
  CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 2
  JULIA_FFTW_PROVIDER = MKL

@EthanAnderes
Copy link

just realized that perhaps this is due to dev FFTW + switching to a different branch in the terminal, not automatically installing new additions in REQUIRE. Sorry for the noise.

@stevengj
Copy link
Member Author

@EthanAnderes, yes, that is JuliaLang/Pkg.jl#367

@stevengj
Copy link
Member Author

@ararslan, okay to merge?

@ararslan
Copy link
Member

Yep, looks good to me. Feel free to merge or squash-merge at your leisure.

@stevengj stevengj merged commit d2b22f4 into master Jun 18, 2018
@stevengj stevengj deleted the newbuild branch June 18, 2018 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants