Problem with using FFT


Hi,

I’m trying to run a macro on Win11 with TF1Convolution that uses FFT.
However, I get the following errors:
“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
Warning in <TF1Convolution::MakeFFTConv>: Cannot use FFT, probably FFTW package is not available. Switch to numerical convolution”

I get the same errors (besides the last line) when trying to run the FFT tutorial macro tutorials/fft/FFT.C

I believe that my ROOT build (which was downloaded as a binary) has FFT support. I have libFFTW.dll under root/bin. The command “\root\bin>root-config --has-fftw3” returns “yes”.
I also downloaded the FFTW3 DLLs, e.g. libfftw3-3.dll from the web.
Both root\bin and the directory with the FFTW3 DLLs are added to the PATH.

Does anyone have an idea what could be the problem?

ROOT Version: 6.26.14
Platform: Win11
Compiler: Not Provided


Hello,

Welcome to the ROOT Community!
This seems odd. Have you tried to manually load the library at the prompt with gSystem->Load? Can you find the library?
Adding @bellenot in the loop.

Best,
Danilo

ROOT has been built with FFTW 3.3.5, so make sure you downloaded the same version, and for the same architecture (x86 or x64)

I have FFTW 3.3.5 and the correct architecture (x64).
I cannot load the library from the prompt either:
“root [0] gSystem->Load(“libFFTW.dll”)
cling::DynamicLibraryManager::loadLibrary(): LoadLibrary: returned 126: The specified module could not be found.
(int) -1”

I can load libfftw3-3.dll:
“root [0] gSystem->Load(“libfftw3-3.dll”)
(int) 0”,
but even after I do this, I still cannot load libFFTW.dll .

OK, I’ll check

I cannot reproduce the issue. Can you check the dependencies of libFFT.dll, using dumpbin /dependents %ROOTSYS%\bin\libFFTW.dll. E.g.:

C:\Users\bellenot\Downloads\root>dumpbin /dependents %ROOTSYS%\bin\libFFTW.dll
Microsoft (R) COFF/PE Dumper Version 14.39.33523.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file C:\Users\bellenot\Downloads\root\bin\libFFTW.dll

File Type: DLL

  Image has the following dependencies:

    fftw3-3.dll
    libCore.dll
    VCRUNTIME140.dll
    VCRUNTIME140_1.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    KERNEL32.dll

  Summary

        1000 .data
        1000 .pdata
        8000 .rdata
        1000 .reloc
        1000 .rsrc
        7000 .text

Sorry, I think I found the issue. Can you rename or copy libfftw3-3.dll to fftw3-3.dll and try again?

Yes, that was the issue.
After renaming libfftw3-3.dll to fftw3-3.dll it works.
Thank you for the help.

1 Like

Good! And you’re very welcome!