diff --git a/Project.toml b/Project.toml index 67dafd3..fb22b82 100644 --- a/Project.toml +++ b/Project.toml @@ -1,18 +1,19 @@ name = "FINUFFT" uuid = "d8beea63-0952-562e-9c6a-8e8ef7364055" author = "Ludvig af Klinteberg " -version = "3.2.0" +version = "3.3.0" [deps] Requires = "ae029012-a4dd-5104-9daa-d747884805df" cufinufft_jll = "d94e68af-94a2-5465-a03a-ccb69bb7181e" finufft_jll = "c41cd5a2-72a3-5203-9076-a500b088fc82" +FFTW_jll = "f5851436-0d7a-5f13-b9de-f02708fd171a" [compat] Requires = "1.3" -cufinufft_jll = "2.2.0" -finufft_jll = "2.2.0" -julia = "1.3" +cufinufft_jll = "2.3.0" +finufft_jll = "2.3.0" +julia = "1.6" [extras] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" diff --git a/README.md b/README.md index fea3010..be59824 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ [![codecov](https://codecov.io/gh/ludvigak/FINUFFT.jl/branch/master/graph/badge.svg?token=Tkx7kma18J)](https://codecov.io/gh/ludvigak/FINUFFT.jl) [![](https://img.shields.io/badge/docs-latest-blue.svg)](https://ludvigak.github.io/FINUFFT.jl/latest/) -This is a full-featured Julia interface to [FINUFFT](https://github.com/flatironinstitute/finufft), which is a lightweight and fast parallel nonuniform fast Fourier transform (NUFFT) library released by the Flatiron Institute, and its GPU version cuFINUFFT. This interface stands at v3.x, and it uses FINUFFT version 2.2.0 (note that the interface version number is distinct from the version of the wrapped binary FINUFFT library). +This is a full-featured Julia interface to [FINUFFT](https://github.com/flatironinstitute/finufft), which is a lightweight and fast parallel nonuniform fast Fourier transform (NUFFT) library released by the Flatiron Institute, and its GPU version cuFINUFFT. This interface stands at v3.x, and it uses FINUFFT version 2.3.0 (note that the interface version number is distinct from the version of the wrapped binary FINUFFT library). ## Installation -FINUFFT.jl requires Julia v1.3 or later, and has been tested up to v1.9. From the Pkg REPL mode (hit `]` in REPL to enter), run +FINUFFT.jl requires Julia v1.6 or later, and has been tested up to v1.10. From the Pkg REPL mode (hit `]` in REPL to enter), run ```julia add FINUFFT @@ -18,7 +18,7 @@ This installs the stable registered version and its dependencies, including our * [finufft_jll.jl](https://github.com/JuliaBinaryWrappers/finufft_jll.jl), which contains the CPU routines and has microarchitecture-specific builds (including `avx512`) for better performance. -* [cufinufft_jll.jl](https://github.com/JuliaBinaryWrappers/cufinufft_jll.jl), which contains the GPU routines (cuFINUFFT). This is only available for x86 GNU Linux, and is built for CUDA versions up to 12.5. +* [cufinufft_jll.jl](https://github.com/JuliaBinaryWrappers/cufinufft_jll.jl), which contains the GPU routines (cuFINUFFT). This is only available for x86 GNU Linux, and is built for CUDA versions up to 12.6. To access the GPU interface, CUDA.jl must be installed through `add CUDA` diff --git a/src/FINUFFT.jl b/src/FINUFFT.jl index dcce07b..806a3ab 100644 --- a/src/FINUFFT.jl +++ b/src/FINUFFT.jl @@ -27,6 +27,10 @@ export finufftReal # By default we depend on our precompiled generic binary package... using finufft_jll const libfinufft = finufft_jll.libfinufft +# part of the thread-safety workaround +using FFTW_jll +const libfftw3 = FFTW_jll.libfftw3 +const libfftw3f = FFTW_jll.libfftw3f # # If instead you want to use your locally-compiled FINUFFT library for more # performance, comment out the above two code lines, uncomment the upcoming @@ -45,6 +49,12 @@ include("simple.jl") # Only load cuFINUFFT interface if CUDA is present (via `using CUDA`) and functional function __init__() + + # quick and dirty: make fftw thread safe + # get rid of this workaround as soon as https://github.com/flatironinstitute/finufft/pull/548 has been merged and deployed to finufft_jll + ccall((:fftw_make_planner_thread_safe, libfftw3), Cvoid, ()) + ccall((:fftwf_make_planner_thread_safe, libfftw3f), Cvoid, ()) + @require CUDA="052768ef-5323-5732-b1bb-66c8b64840ba" begin using .CUDA include("cufinufft.jl")