Stucked at Found FFTW wisdom at C:\Users\Administrator\.julia\scratchspaces\30eb0fb0-5147-11e9-3356-d75b018717ce\lunacache\FFTWcache_1threads

Hello,

I’m using Luna package to simulate the pulse propogation in a fiber with simple code:
using Luna
output = prop_capillary(125e-6, 3, :He, 1; λ0=800e-9, energy=120e-6, τfwhm=10e-15, λlims=(150e-9, 4e-6), trange=1e-12)
But when running, it stuck at
Found FFTW wisdom at C:\Users\Administrator.julia\scratchspaces\30eb0fb0-5147-11e9-3356-d75b018717ce\lunacache\FFTWcache_1threads

Confirmed, it took more than a minute to finish here,
which is quite long for an example, so it might be worth reporting.

julia> output = prop_capillary(125e-6, 3, :He, 1; λ0=800e-9, energy=120e-6, τfwhm=10e-15, λlims=(150e-9, 4e-6), trange=1e-12)
[ Info: X+Y polarisation not required.                                                                                                             
[ Info: Freq limits 0.07 - 2.00 PHz                                                                                                                
[ Info: Samples needed: 11991.70, samples: 16384, δt = 83.39 as                                                                                    
[ Info: Requested time window: 1000.0 fs, actual time window: 1366.3 fs                                                                            
[ Info: Grid: samples 8192 / 16384, ωmax 1.88e+16 / 3.77e+16                                                                                       
[ Info: Using PPT ionisation rate.                                                                                                                 
[ Info: Found cached PPT rate for 24.59 eV, 800.0 nm                                                                                               
[ Info: Using mode-averaged propagation.                                                                                                           
[ Info: No FFTW wisdom found                                                                                                                       
[ Info: FFTW wisdom saved to /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: Found FFTW wisdom at /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: FFTW wisdom saved to /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: Starting propagation                                                                                                                       
[ Info: Propagation finished in 0.600 seconds, 367 steps                                                                                           
MemoryOutput["simulation_type", "dumps", "meta", "Eω", "prop_capillary_args", "grid", "stats", "z"]   

The second run is much faster, probably because the FFTW plan has been created.
The output is almost the same, with an additional "FFTW wisdom saved " line:

julia> output = prop_capillary(125e-6, 3, :He, 1; λ0=800e-9, energy=120e-6, τfwhm=10e-15, λlims=(150e-9, 4e-6), trange=1e-12)
[ Info: X+Y polarisation not required.                                                                                                             
[ Info: Freq limits 0.07 - 2.00 PHz                                                                                                                
[ Info: Samples needed: 11991.70, samples: 16384, δt = 83.39 as                                                                                    
[ Info: Requested time window: 1000.0 fs, actual time window: 1366.3 fs                                                                            
[ Info: Grid: samples 8192 / 16384, ωmax 1.88e+16 / 3.77e+16                                                                                       
[ Info: Using PPT ionisation rate.                                                                                                                 
[ Info: Found cached PPT rate for 24.59 eV, 800.0 nm                                                                                               
[ Info: Using mode-averaged propagation.                                                                                                           
[ Info: Found FFTW wisdom at /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: FFTW wisdom saved to /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: Found FFTW wisdom at /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: FFTW wisdom saved to /usr/local/build/julia/depot/scratchspaces/30eb0fb0-5147-11e9-3356-d75b018717ce/lunacache/FFTWcache_56threads         
[ Info: Starting propagation                                                                                                                       
[ Info: Propagation finished in 0.523 seconds, 367 steps                                                                                           
MemoryOutput["simulation_type", "dumps", "meta", "Eω", "prop_capillary_args", "grid", "stats", "z"]
julia> versioninfo()
  Julia Version 1.10.9
  OS: Linux (x86_64-suse-linux)                                                                                                                    
  CPU: 16 × AMD Ryzen 9 9950X3D 16-Core Processor
Threads: 14 default, 0 interactive, 7 GC (on 16 virtual cores) 

Hi! Sorry to hear you’re having issues with Luna. The problem you’re running into here is probably a stale pidlock around the FFTW cache files. If I’m right, you should be able to fix it by using the Utils.clear_cache() function within Luna:

using Luna
Utils.clear_cache()

We actually recently fixed this issue, we just haven’t released a new version yet.

If this doesn’t fix it, best to open an issue over at GitHub - LupoLab/Luna.jl: Nonlinear optical pulse propagator and we’ll deal with it in more detail.