Skip to content

Commit

Permalink
drop deprecated JULIA_FFTW_PROVIDER
Browse files Browse the repository at this point in the history
  • Loading branch information
marius311 committed Aug 11, 2021
1 parent bf816e1 commit 75bd474
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/set_fftw_provider.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env julia

open(joinpath(dirname(@__DIR__), "test", "Project.toml"), "a") do io
println(io, """
[preferences.FFTW]
provider = "$(ARGS[1])"
""")
end
5 changes: 2 additions & 3 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
julia-version: ['1.6', '1.7.0-beta3']
os: [ubuntu-latest]
JULIA_FFTW_PROVIDER: ['MKL','FFTW']
provider: ['mkl','fftw']
fail-fast: false
env:
PYTHON: python3
Expand All @@ -22,8 +22,7 @@ jobs:
- run: >
sudo apt-get install --no-install-recommends gfortran python3-setuptools python3-wheel
&& pip3 install camb healpy
- run: julia --project .github/set_fftw_provider.jl "${{ matrix.provider }}"
- uses: julia-actions/julia-runtest@master
timeout-minutes: 20
# continue-on-error: ${{ matrix.julia-version == '1.7-nightly' }}
env:
JULIA_FFTW_PROVIDER: ${{ matrix.JULIA_FFTW_PROVIDER }}
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Memoization = "6fafb56a-5788-4b4e-91ca-c0cea6611c73"
NamedTupleTools = "d9ec5142-1e00-5aa0-9d6a-321866360f50"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Expand Down Expand Up @@ -63,7 +64,7 @@ Combinatorics = "1"
CompositeStructs = "0.1.1"
DataStructures = "0.17.9, 0.18"
EllipsisNotation = "1.1.0"
FFTW = "1.2 - 1.3"
FFTW = "1.4"
FileIO = "1.2.2"
Formatting = "0.4"
ImageFiltering = "0.6.14"
Expand All @@ -81,6 +82,7 @@ Measurements = "2"
Memoization = "0.1.8"
NamedTupleTools = "0.13"
Optim = "1"
Preferences = "1.2"
ProgressMeter = "1.2"
PyCall = "1.91.2"
QuadGK = "2.3.1"
Expand Down
2 changes: 1 addition & 1 deletion src/util_fft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ m_irfft!(dst, arr::AbstractArray{Complex{T},N}, dims) where {T,N} = ldiv!(dst, m
end
# FFTW (but not MKL) destroys the input array for inplace inverse real
# FFTs, so we need a copy. see https://github.com/JuliaMath/FFTW.jl/issues/158
copy_if_fftw(x) = (x isa Array && FFTW.fftw_vendor == :fftw) ? copy(x) : x
copy_if_fftw(x) = (x isa Array && FFTW.fftw_provider == "fftw") ? copy(x) : x


"""
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Nsides_big = [(128,128), (64,128), (128,64)]

Random.seed!(1)

has_batched_fft = (FFTW.fftw_vendor != :mkl) || (storage != Array)
has_batched_fft = (FFTW.fftw_provider != "mkl") || (storage != Array)

##

Expand Down

0 comments on commit 75bd474

Please sign in to comment.