FFT demo error in 6.27 binary (win 10)

Hi,

Here is the screen capture and error message. ROOT is a binary and fftw3 is enabled in the binary build. After this error, ROOT just exited. Is the problem in the binary build? Can someone confirm?


| Welcome to ROOT 6.27/01 https://root.cern |
| (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for win64 on Dec 01 2022, 03:49:00 |
| From remotes/origin/master@v6-25-02-2898-g8f72f53fbf |
| With MSVC 19.32.31332.0 |

Try ‘.help’/‘.?’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/‘.q’

root [0] .L …/tutorials/fft/FFT.C
root [1] FFT()
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 126: The specified module could not be found.
Error in TInterpreter::TCling::AutoLoad: failure loading library libFFTW.dll for TFFTRealComplex
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 126: The specified module could not be found.
Error in TVirtualFFT::FFT: handler not found

You’re right. We don’t distribute the fftw3 DLLs (they are not part of ROOT). But you can download them from the web. See FFTW Installation on Windows

But this binary has ffw3:

\root\bin>root-config --has-fftw3
yes

Do you mean the actual ffw3 DLL?

Thanks

I read some of your previous answers to FFW3. Seems like I need to rebuild ROOT after downloading FFTW3. Can’t use the binary build. Even I set PATH variable to include the FFTW3 directory won’t get rid of the error.

Ok, an update: After setting PATH to point to FFTW3, the FFTW3 library actual works. But just the FFT.C doesn’t work because it uses libFFTW.lib but has a different file name in the downloaded FFTW3 library. I rewrote a simple FFTW3 example inside ROOT and it worked.

Thanks anyway

You’re mixing the fftw3-3.dll (from fftw3) and libFFTW.dll (from ROOT). You need both of them (libFFTW.dll depends on fftw3-3.dll) in your PATH. And the .lib files are only needed when linking against it, which is not your case.

Hmm… that probably is not the case because I did have both libFFTW.dll (under root/bin) and fftw3-3.dll included in the PATH. For some reason, just can’t load libFFTW.dll.

root [0] .L …/tutorials/fft/FFT.C
root [1] FFT()
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 126: The specified module could not be found.
Error in TInterpreter::TCling::AutoLoad: failure loading library libFFTW.dll for TFFTRealComplex
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 126: The specified module could not be found.
Error in TVirtualFFT::FFT: handler not found

Did you take the 64 bit version of fftw3-3.dll?

Yes, I did take the 64-bit ffw3-3.dll, like shown in your link