JuliaApproximation / FastTransforms.jl

:rocket: Julia package for orthogonal polynomial transforms :snowboarder:
Other
264 stars 27 forks source link

Segmentation fault for spherical harmonic transform #238

Open AshtonSBradley opened 11 months ago

AshtonSBradley commented 11 months ago
julia> F = sphrandn(Float64, 1024, 2047); # convenience method

julia> P = plan_sph2fourier(F);

julia> PS = plan_sph_synthesis(F);

julia> PA = plan_sph_analysis(F);

julia> @time G = PS*(P*F);

[9851] signal (11.1): Segmentation fault: 11
in expression starting at REPL[7]:1
Allocations: 8155300 (Pool: 8146430; Big: 8870); GC: 15
zsh: segmentation fault 
julia> versioninfo()
Julia Version 1.9.3
Commit bed2cd540a1 (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 16 × Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 8 on 16 virtual cores
Environment:
  JULIA_NUM_THREADS = 8
  JULIA_PKG_DEVDIR = /Users/abradley/Dropbox/Julia/Dev
AshtonSBradley commented 11 months ago

this might be rather an mkl problem I think

AshtonSBradley commented 11 months ago

actually, no:

]add IntelOpenMP_jll@2023

Fixes the MKL issue for FFTW, but doesn't fix this. https://github.com/JuliaMath/FFTW.jl/issues/281

dlfivefifty commented 6 months ago

This is hitting tests: https://github.com/JuliaApproximation/HarmonicOrthogonalPolynomials.jl/actions/runs/8833266524/job/24252199511?pr=80

dlfivefifty commented 6 months ago

actually that's an "Illegal Instruction" so might be a different bug

MikaelSlevinsky commented 6 months ago

That seems like a strange error because looking at the logs of the last aarch64 build, the only optimization flag that could affect ft_plan_rotspinsphere compilation invoked on this hardware is -O3, which shouldn't cause an illegal instruction.

It could be that it's just a question of refreshing the binaries for a more recent MacOS version.