Skip to content

Commit

Permalink
Update to v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ludvigak committed Dec 2, 2024
1 parent 2a54a96 commit a3d7764
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ FFTW_jll = "f5851436-0d7a-5f13-b9de-f02708fd171a"

[compat]
Requires = "1.3"
cufinufft_jll = "2.3.0"
finufft_jll = "2.3.0"
cufinufft_jll = "2.3.1"
finufft_jll = "2.3.1"
julia = "1.6"

[extras]
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.3.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.1 (note that the interface version number is distinct from the version of the wrapped binary FINUFFT library).

## Installation

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
FINUFFT.jl requires Julia v1.6 or later, and has been tested up to v1.11. From the Pkg REPL mode (hit `]` in REPL to enter), run

```julia
add FINUFFT
Expand Down Expand Up @@ -105,7 +105,7 @@ see [examples/time2d1.jl](examples/time2d1.jl)

Finally, the more involved codes [test/test_nufft.jl](test/test_nufft.jl)
and [test/test_cuda.jl](test/test_cuda.jl)
tests `dtype=Float64` and `dtype=Float32` precisions for all supported transform types, and can be used as references.
test `dtype=Float64` and `dtype=Float32` precisions for all supported transform types, and can be used as references.
The outputs are tested there for mathematical correctness.
In the 1D type 1 it also tests a vectorized simple, a guru call and
a vectorized guru call.
Expand Down
44 changes: 24 additions & 20 deletions src/errors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@

# Following should match error codes in https://github.com/flatironinstitute/finufft/blob/master/include/finufft_errors.h

const WARN_EPS_TOO_SMALL = 1
const ERR_MAXNALLOC = 2
const ERR_SPREAD_BOX_SMALL = 3
const ERR_SPREAD_PTS_OUT_RANGE = 4 # DEPRECATED
const ERR_SPREAD_ALLOC = 5
const ERR_SPREAD_DIR = 6
const ERR_UPSAMPFAC_TOO_SMALL = 7
const ERR_HORNER_WRONG_BETA = 8
const ERR_NTRANS_NOTVALID = 9
const ERR_TYPE_NOTVALID = 10
const ERR_ALLOC = 11
const ERR_DIM_NOTVALID = 12
const ERR_SPREAD_THREAD_NOTVALID = 13
const ERR_NDATA_NOTVALID = 14
const ERR_CUDA_FAILURE = 15
const ERR_PLAN_NOTVALID = 16
const ERR_METHOD_NOTVALID = 17
const ERR_BINSIZE_NOTVALID = 18
const ERR_INSUFFICIENT_SHMEM = 19
const ERR_NUM_NU_PTS_INVALID = 20
const WARN_EPS_TOO_SMALL = 1
const ERR_MAXNALLOC = 2
const ERR_SPREAD_BOX_SMALL = 3
const ERR_SPREAD_PTS_OUT_RANGE = 4 # DEPRECATED
const ERR_SPREAD_ALLOC = 5
const ERR_SPREAD_DIR = 6
const ERR_UPSAMPFAC_TOO_SMALL = 7
const ERR_HORNER_WRONG_BETA = 8
const ERR_NTRANS_NOTVALID = 9
const ERR_TYPE_NOTVALID = 10
const ERR_ALLOC = 11
const ERR_DIM_NOTVALID = 12
const ERR_SPREAD_THREAD_NOTVALID = 13
const ERR_NDATA_NOTVALID = 14
const ERR_CUDA_FAILURE = 15
const ERR_PLAN_NOTVALID = 16
const ERR_METHOD_NOTVALID = 17
const ERR_BINSIZE_NOTVALID = 18
const ERR_INSUFFICIENT_SHMEM = 19
const ERR_NUM_NU_PTS_INVALID = 20
const ERR_LOCK_FUNS_INVALID = 22
const ERR_SPREADONLY_UPSAMP_INVALID = 23

struct FINUFFTError <: Exception
errno::Cint
Expand Down Expand Up @@ -79,6 +81,8 @@ function check_ret(ret)
msg = "GPU shmem too small for subprob/blockgather parameters"
elseif ret==ERR_NUM_NU_PTS_INVALID
msg = "invalid number of nonuniform points: nj or nk negative, or too big (see defs.h)"
elseif ret==ERR_SPREADONLY_UPSAMP_INVALID
msg = "invalid upsampfac set while using gpu_spreadinterponly mode"

Check warning on line 85 in src/errors.jl

View check run for this annotation

Codecov / codecov/patch

src/errors.jl#L84-L85

Added lines #L84 - L85 were not covered by tests
else
msg = "error of type unknown to Julia interface! Check FINUFFT documentation"
end
Expand Down

0 comments on commit a3d7764

Please sign in to comment.