-
Notifications
You must be signed in to change notification settings - Fork 27
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
fftw3
in prop_gnlse
is causing Julia 1.8 to crash
#285
Comments
|
I can't reproduce this locally, and the CI tests on #286 also seem to work fine. I think the issue isn't with Luna but with FFTW.jl. If you run something super simple like julia> import Luna: FFTW
julia> FFTW.fft([1, 2, 3]) do you get the same error? |
since the error appears with/during the FFTW planning, try deleting |
What I tried and did not work:
Tomorrow I will try those on another computer |
Just to check whether we broke something: has Luna ever run fine on this machine? |
I found the problem: |
Hm, this is very strange. There is no difference in the underlying FFT machinery between that example and the others, unless the error is connected to the specific FFT being planned. What happens if you change |
a quicker way of checking that would be julia> import Luna: FFTW
julia> for n=1:16
FFTW.plan_fft(zeros(2^n))
FFTW.plan_rfft(zeros(2^n))
end |
There seems problem in the result. Nevertheless, we have moved one step further!
|
The problem above is just that you need a larger time grid. If you set |
This is correct--your time window is too small so the pulse hits the edge of the window and gets "absorbed" at the boundary. However, it seems to me that making the grid smaller solved the problem by changing the required FFT size. This can only be down to the underlying fftw3 library I think. |
Thanks! I'd appreciate it if parameters in these files (and others) could be optimised:
|
the parameters in all of those examples are correct (as determined by the physics of the problem), and they all run fine on every machine we've tried them on. there must be a problem with the fftw library as installed/built on your machine I'm afraid. one other thing you could try (just a guess) is disabling multithreading for FFTW by running Luna.set_fftw_threads(1) immediately after restarting Julia and import Luna. |
Luna.set_fftw_threads(1) That works for me! I notice that the default FFTW threads is 32, which is larger than my CPU cores (8 physical cores and 16 logical CPU cores). To verify my hypothesis, I tried
and only to find that multi-threaded FFT on my computer is unpredictably unstable. |
Good! I think we probably don't test this routinely simply because we tend to run all simulations single-threaded (ie
This is expected, because FFTW wants you to spawn more threads than are actually available to help with load balancing (see JuliaMath/FFTW.jl#121 (comment)) |
we implement this here: Line 72 in 01af65a
|
Yes, I'm using 8 threads by default. |
I'm closing this issue and continue on learning examples. Many thanks! |
I'm trying to run the codes in
examples/simple_interface
, and find thatprop_gnlse
can not be executed:Here's my running environment:
The text was updated successfully, but these errors were encountered: