Check and use only available FFTW libraries
I think it would be good to check if FFTW_jll and MKL_jll are actually available before trying to load them, as suggested in https://github.com/JuliaMath/FFTW.jl/issues/274#issuecomment-1618774373. I ran into this issue with a project that specified provider = "mkl" in a LocalPreferences.toml - precompilation will error on my MacBook since MKL is not available for Apple silicon. With this PR, FFTW will use FFTW_jll instead (if it's not available either an error is thrown) but present the user with the error message:
┌ FFTW [7a1cc6ca-52ef-59f5-83cd-3a7055c09341]
│ ┌ Error: Invalid provider setting "mkl"; valid settings include ["fftw"]
│ └ @ FFTW ~/.julia/dev/FFTW/src/providers.jl:23
└
Fixes https://github.com/JuliaMath/FFTW.jl/issues/274.
Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.
Comparison is base (
ef8fc5b) 73.08% compared to head (9db530c) 73.15%.
Additional details and impacted files
@@ Coverage Diff @@
## master #278 +/- ##
==========================================
+ Coverage 73.08% 73.15% +0.07%
==========================================
Files 5 5
Lines 535 529 -6
==========================================
- Hits 391 387 -4
+ Misses 144 142 -2
| Files | Coverage Δ | |
|---|---|---|
| src/providers.jl | 66.66% <60.00%> (+7.40%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.