Skip to content

Commit

Permalink
Merge branch 'ludvigak:master' into test_thread_safety
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrimmer authored Sep 11, 2024
2 parents ceddb99 + 2a54a96 commit 584ba83
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name = "FINUFFT"
uuid = "d8beea63-0952-562e-9c6a-8e8ef7364055"
author = "Ludvig af Klinteberg <[email protected]>"
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"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`

Expand Down
10 changes: 10 additions & 0 deletions src/FINUFFT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down

0 comments on commit 584ba83

Please sign in to comment.