Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on MacOS aarch64 #64

Closed
jkrimmer opened this issue Aug 23, 2024 · 3 comments
Closed

Tests fail on MacOS aarch64 #64

jkrimmer opened this issue Aug 23, 2024 · 3 comments

Comments

@jkrimmer
Copy link
Contributor

With the finufft library in finufft_jll (v2.2.0) and copies build using BinaryBuilder from the current master https://github.com/flatironinstitute/finufft, running the tests fails on MacOS Sonoma 14.5 with an Apple M3 Pro (at least) due to insufficiently accurate results:

Collapsed error log
Testing Running tests...
[ Info: Testing error handling
setup_spreader warning: increasing tol=1e-100 to eps_mach=1.1e-16.
setup_spreader warning: at upsampfac=2, tol=1.1e-16 would need kernel width ns=17; clipping to max 16.
FINUFFT setup_spreader warning: upsampfac=9.01e+15 way too large to be beneficial.
[set_nf_type12] nf=9.01e+16 exceeds MAX_NF of 1e+12, so exit without attempting even a malloc
FINUFFT setup_spreader: error, upsampfac=0.9 is <=1.0
FINUFFT setup_spreader: nonstandard upsampfac=1.5 cannot be handled by kerevalmeth=1
[ Info: Error handling testing done
[finufft_makeplan] new plan: FINUFFT version 2.3.0-rc1 .................
[finufft_makeplan] 1d1: (ms,mt,mu)=(12,1,1) (nf1,nf2,nf3)=(30,1,1)
               ntrans=1 nthr=12 batchSize=1 
[finufft_makeplan] kernel fser (ns=15):         0.000133 s
[finufft_makeplan] fwBatch 0.00GB alloc:        1e-06 s
[finufft_makeplan] FFTW plan (mode 64, nthr=12):        0.000221 s
[finufft_setpts] sort (didSort=0):              5.4e-05 s
[finufft_execute] start ntrans=1 (1 batches, bsize=1)...
[finufft_execute] done. tot spread:             0.000115 s
               tot FFT:                         0.000125 s
               tot deconvolve:                  1e-06 s
1D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:61
  Expression: relerr_1d1 < errfac * tol
   Evaluated: 0.13821002120393455 < 1.0e-12

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:61 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:51 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:50 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
1D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:66
  Expression: reldiff < errdifffac * tol
   Evaluated: 0.1442515968345574 < 1.0e-13

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:66 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:51 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:50 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
1D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:74
  Expression: relerr_guru < errfac * tol
   Evaluated: 0.07351832234582804 < 1.0e-12

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:74 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:51 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:50 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
2D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:143
  Expression: relerr_2d1 < errfac * tol
   Evaluated: 0.0750954492225439 < 1.0e-12

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:143 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:132 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:130 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
2D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:146
  Expression: reldiff < errdifffac * tol
   Evaluated: 0.07531538770143892 < 1.0e-13

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:146 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:132 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:130 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D3: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:179
  Expression: relerr_2d3 < errfac * tol
   Evaluated: 0.009792942796706996 < 1.0e-12

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:179 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:170 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:130 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D3: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:182
  Expression: reldiff < errdifffac * tol
   Evaluated: 0.05187410620001563 < 1.0e-13

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:182 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:170 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:130 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:203
  Expression: relerr_3d1 < errfac * tol
   Evaluated: 0.0011834839098552746 < 1.0e-12

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:203 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:190 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:188 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:206
  Expression: reldiff < errdifffac * tol
   Evaluated: 0.001183473706663786 < 1.0e-13

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:206 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:190 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:188 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D3: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:241
  Expression: relerr_3d3 < errfac * tol
   Evaluated: 3.387431964223392e-5 < 1.0e-12

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:241 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:232 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:188 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D3: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:244
  Expression: reldiff < errdifffac * tol
   Evaluated: 0.00021976957040140284 < 1.0e-13

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:244 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:232 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:188 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
[finufftf_makeplan] new plan: FINUFFT version 2.3.0-rc1 .................
[finufftf_makeplan] 1d1: (ms,mt,mu)=(12,1,1) (nf1,nf2,nf3)=(24,1,1)
               ntrans=1 nthr=12 batchSize=1 
[finufftf_makeplan] kernel fser (ns=5):         0.000104 s
[finufftf_makeplan] fwBatch 0.00GB alloc:       -9.98e-11 s
[finufftf_makeplan] FFTW plan (mode 64, nthr=12):       0.000596 s
[finufftf_setpts] sort (didSort=0):             4.9e-05 s
[finufftf_execute] start ntrans=1 (1 batches, bsize=1)...
[finufftf_execute] done. tot spread:            0.000124 s
               tot FFT:                         0.000111 s
               tot deconvolve:                  1e-06 s
1D1: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:66
  Expression: reldiff < errdifffac * tol
   Evaluated: 0.07409199f0 < 0.001

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:66 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:51 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:50 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D3: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:241
  Expression: relerr_3d3 < errfac * tol
   Evaluated: 36.239075f0 < 0.01

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:241 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:232 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:188 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
3D3: Test Failed at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:244
  Expression: reldiff < errdifffac * tol
   Evaluated: 1.1500655f0 < 0.001

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:244 [inlined]
 [3] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [4] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:232 [inlined]
 [5] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:188 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_nufft(tol::Float64, dtype::DataType)
   @ Main ~/.julia/packages/FINUFFT/2Vw36/test/test_nufft.jl:48
Test Summary:                    | Pass  Fail  Total  Time
FINUFFT                          |   37    14     51  2.7s
  Error handling and dumb inputs |    9            9  0.4s
  NUFFT (Float64)                |   10    11     21  0.7s
    1D                           |    6     3      9  0.5s
      1D1                        |    2     3      5  0.5s
      1D2                        |    2            2  0.0s
      1D3                        |    2            2  0.0s
    2D                           |    2     4      6  0.1s
      2D1                        |          2      2  0.0s
      2D2                        |    2            2  0.0s
      3D3                        |          2      2  0.0s
    3D                           |    2     4      6  0.1s
      3D1                        |          2      2  0.0s
      3D2                        |    2            2  0.0s
      3D3                        |          2      2  0.0s
  NUFFT (Float32)                |   18     3     21  0.5s
    1D                           |    8     1      9  0.4s
      1D1                        |    4     1      5  0.3s
      1D2                        |    2            2  0.0s
      1D3                        |    2            2  0.0s
    2D                           |    6            6  0.1s
    3D                           |    4     2      6  0.1s
      3D1                        |    2            2  0.0s
      3D2                        |    2            2  0.0s
      3D3                        |          2      2  0.0s
ERROR: LoadError: Some tests did not pass: 37 passed, 14 failed, 0 errored, 0 broken.
in expression starting at /Users/jonas/.julia/packages/FINUFFT/2Vw36/test/runtests.jl:3
ERROR: Package FINUFFT errored during testing

Building the library locally from source and linking to the FFTW and OpenMP libraries used by julia according to

mkdir build && cd build; \
OpenMP_ROOT=~/.julia/artifacts/807b3a94123d30a6923d6d303e22f466233a4ea6/ cmake -DCMAKE_BUILD_TYPE=Release -DFINUFFT_STATIC_LINKING=OFF -DFINUFFT_FFTW_SUFFIX="" -DFFTW_ROOT="~/.julia/artifacts/183bee42435e3e95c3a057fa06e37cf138105646/" ..; \
cmake --build . -j

restores the accuracy. There is no difference in the behavior whether FFTW or DUCC is used as fft-library.

@ludvigak
Copy link
Owner

Oh, that is not just insufficiently accurate, but rather completely wrong. I'm afraid I have no idea what could be causing this.

@jkrimmer
Copy link
Contributor Author

jkrimmer commented Aug 27, 2024

Update 1

Disabling OpenMP in the build process of finufft for MacOS with aarch64 resolves this issue.

Update 2

On my M3 Pro (12 Cores), the issue occurs only if OpenMP uses 11 or more threads. With OMP_NUM_THREADS=10 (or any smaller number) the tests run fine. However, with OMP_NUM_THREADS=11 or OMP_NUM_THREADS=12, the libfinufft build from Yggdrasil yields erroneous results. This behavior might also explain, why the non-thread-safety-related tests do not generally fail on Mac OS with aarch64 in #65 as the GitHub runner features only three threads.

Further, I have noticed one possible mitigation approach: Building finufft from Yggdrasil for Mac OS with aarch64 using clang ≤ v14 resolves the issue also for twelve OMP threads. However, the older clang produces a slower library...

jkrimmer added a commit to jkrimmer/Yggdrasil that referenced this issue Sep 13, 2024
This PR fixes wrong test results in FINUFFT.jl on MacOS (see ludvigak/FINUFFT.jl#64)
@jkrimmer
Copy link
Contributor Author

Will be closed after JuliaPackaging/Yggdrasil#9423 has been merged.

giordano pushed a commit to JuliaPackaging/Yggdrasil that referenced this issue Sep 13, 2024
This PR fixes wrong test results in FINUFFT.jl on MacOS (see ludvigak/FINUFFT.jl#64)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants