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

Crash on Windows when explicitly setting number of threads #306

Open
ludvigak opened this issue Aug 21, 2024 · 2 comments
Open

Crash on Windows when explicitly setting number of threads #306

ludvigak opened this issue Aug 21, 2024 · 2 comments

Comments

@ludvigak
Copy link

Related to the FINUFFT.jl issue ludvigak/FINUFFT.jl#61 we have boiled down that the following code causes a crash running on Windows with Julia v1.10.4 and FFTW v1.8.0, but only when explicitly setting the thread count in julia using --threads.

using FFTW
FFTW.set_num_threads(6)
data = rand(ComplexF32, 64)
for i in 1:10000
    @show i
    fft(data)
end

e.g. running julia --threads=8 fftwcrash.jl gives the following output, although the number of iterations before the crash varies from run to run

[...]
i = 967

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x63975556 -- .text at C:\Users\me\.julia\artifacts\b7dd1809d0626eac3bf6f97ba8ccfbb6cc63c509\bin\libfftw3f-3.dll (unknown line)
in expression starting at C:\Users\me\fftwcrash.jl:4
.text at C:\Users\me\.julia\artifacts\b7dd1809d0626eac3bf6f97ba8ccfbb6cc63c509\bin\libfftw3f-3.dll (unknown line)
#2 at C:\Users\me\.julia\packages\FFTW\6nZei\src\providers.jl:58
unknown function (ip: 0000018d5b11139b)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
start_task at C:/workdir/src\task.c:1238
Allocations: 2908 (Pool: 2900; Big: 8); GC: 0

Results do vary with other choices of array length and arguments to set_num_threads and --threads, but the above combination consistently crashes.

@ludvigak
Copy link
Author

This might be a duplicate of #200 and #275

@ahbarnett
Copy link

Tested your example on ubuntu 22.04 linux (Ryzen 2, 5700U), FFTW v1.8.0 (FFTW.version=3.3.10), Julia 1.10.0, and no crash, FYI.

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