Skip to content

Commit 75bd474

Browse files
committed
drop deprecated JULIA_FFTW_PROVIDER
1 parent bf816e1 commit 75bd474

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.github/set_fftw_provider.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env julia
2+
3+
open(joinpath(dirname(@__DIR__), "test", "Project.toml"), "a") do io
4+
println(io, """
5+
[preferences.FFTW]
6+
provider = "$(ARGS[1])"
7+
""")
8+
end

.github/workflows/runtests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
matrix:
1010
julia-version: ['1.6', '1.7.0-beta3']
1111
os: [ubuntu-latest]
12-
JULIA_FFTW_PROVIDER: ['MKL','FFTW']
12+
provider: ['mkl','fftw']
1313
fail-fast: false
1414
env:
1515
PYTHON: python3
@@ -22,8 +22,7 @@ jobs:
2222
- run: >
2323
sudo apt-get install --no-install-recommends gfortran python3-setuptools python3-wheel
2424
&& pip3 install camb healpy
25+
- run: julia --project .github/set_fftw_provider.jl "${{ matrix.provider }}"
2526
- uses: julia-actions/julia-runtest@master
2627
timeout-minutes: 20
2728
# continue-on-error: ${{ matrix.julia-version == '1.7-nightly' }}
28-
env:
29-
JULIA_FFTW_PROVIDER: ${{ matrix.JULIA_FFTW_PROVIDER }}

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Memoization = "6fafb56a-5788-4b4e-91ca-c0cea6611c73"
3636
NamedTupleTools = "d9ec5142-1e00-5aa0-9d6a-321866360f50"
3737
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
3838
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
39+
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
3940
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
4041
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
4142
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
@@ -63,7 +64,7 @@ Combinatorics = "1"
6364
CompositeStructs = "0.1.1"
6465
DataStructures = "0.17.9, 0.18"
6566
EllipsisNotation = "1.1.0"
66-
FFTW = "1.2 - 1.3"
67+
FFTW = "1.4"
6768
FileIO = "1.2.2"
6869
Formatting = "0.4"
6970
ImageFiltering = "0.6.14"
@@ -81,6 +82,7 @@ Measurements = "2"
8182
Memoization = "0.1.8"
8283
NamedTupleTools = "0.13"
8384
Optim = "1"
85+
Preferences = "1.2"
8486
ProgressMeter = "1.2"
8587
PyCall = "1.91.2"
8688
QuadGK = "2.3.1"

src/util_fft.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ m_irfft!(dst, arr::AbstractArray{Complex{T},N}, dims) where {T,N} = ldiv!(dst, m
3333
end
3434
# FFTW (but not MKL) destroys the input array for inplace inverse real
3535
# FFTs, so we need a copy. see https://github.com/JuliaMath/FFTW.jl/issues/158
36-
copy_if_fftw(x) = (x isa Array && FFTW.fftw_vendor == :fftw) ? copy(x) : x
36+
copy_if_fftw(x) = (x isa Array && FFTW.fftw_provider == "fftw") ? copy(x) : x
3737

3838

3939
"""

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Nsides_big = [(128,128), (64,128), (128,64)]
4141

4242
Random.seed!(1)
4343

44-
has_batched_fft = (FFTW.fftw_vendor != :mkl) || (storage != Array)
44+
has_batched_fft = (FFTW.fftw_provider != "mkl") || (storage != Array)
4545

4646
##
4747

0 commit comments

Comments
 (0)