How do I check if FFTW installed correctly?

19,040

To check whether a library is installed correctly, you'd usually try building a program using it.

make check runs tests in the build tree, not on the installed files. In your case they passed, which is good, but it's not sufficient to ensure you'll be able to build software using FFTW.

The presence of the files you list in /usr/local/lib indicates that you'll be able to link programs statically with FFTW. I'd expect there to be .so files as well, but perhaps the build decided it couldn't build shared libraries (or they need to be explicitly enabled).

It's normal to see errors in config.log, the configure process performs lots of checks and quite a few of them are expected to fail. If the process globally succeeds then you're OK.

Once software is installed, it's safe to delete the folder used to build it from, so you can remove ~/fftw-3.3.4. It's generally a good idea to keep the source archive around though, so you can uninstall the package later (./configure && sudo make uninstall).

As Faheem mentions though it would be an awful lot simpler for you to

sudo apt-get install libfftw3-dev
Share:
19,040

Related videos on Youtube

Pétur
Author by

Pétur

Studies applied mathematics.

Updated on September 18, 2022

Comments

  • Pétur
    Pétur almost 2 years

    I tried to install FFTW on my system (Ubuntu 12.04) using the rather unclear instructions on this website, and now I want to check if it worked. (FFTW is a C subroutine library for computing the discrete Fourier transform in one or more dimensions.) From the website:

    You can also type "make check" to put the FFTW test programs through their paces.

    The problem is that the website doesn't say what the output is supposed to look like. I tried this and the output was a lot of lines like

    Executing "/home/petur/fftw-3.3.4/tests/bench -o nthreads=2 --verbose=1   --verify 'ok10bx6bx6e11x13b' --verify 'ik10bx6bx6e11x13b' --verify 'obrd7x13v16' --verify 'ibrd7x13v16' --verify 'ofrd7x13v16' --verify 'ifrd7x13v16' --verify '//obcd7x13v16' --verify '//ibcd7x13v16' --verify '//ofcd7x13v16' --verify '//ifcd7x13v16' --verify 'obcd7x13v16' --verify 'ibcd7x13v16' --verify 'ofcd7x13v16' --verify 'ifcd7x13v16' --verify 'okd10bv127' --verify 'ikd10bv127' --verify '//obr240' --verify '//ibr240' --verify '//ofr240' --verify '//ifr240' --verify 'obr240' --verify 'ibr240' --verify 'ofr240' --verify 'ifr240' --verify '//obc240' --verify '//ibc240' --verify '//ofc240' --verify '//ifc240' --verify 'obc240' --verify 'ibc240' --verify 'ofc240' --verify 'ifc240' --verify 'ok11760e00' --verify 'ik11760e00' --verify 'obr33v31' --verify 'ibr33v31' --verify 'ofr33v31' --verify 'ifr33v31' --verify '//obc33v31' --verify '//ibc33v31' --verify '//ofc33v31' --verify '//ifc33v31' --verify 'obc33v31' --verify 'ibc33v31'"
    

    each followed by tens of lines like

    ok10bx6bx6e11x13b 1.5604e-07 1.85166e-05 1.52953e-07
    

    which doesn't tell me much. The program notified me that the "FFTW transforms passed basic tests" and that "FFTW threaded transforms passed basic tests".

    Is that enough to know that FFTW installed successfully?

    I don't know if it's relevant, but I checked the contents of ~/fftw-3.3.4/config.log and it contains some lines that suggest that there's been some errors, for example:

    conftest.c:88:24: error: expected expression before ')' token
    conftest.c:118:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newvar'
    

    I think I should also mention that /usr/local/lib/ now contains the files

    libfftw3f.a  libfftw3f.la  libfftw3f_threads.a  libfftw3f_threads.la
    

    Does that mean I can remove the directory ~/fftw-3.3.4 or is that still necessary?

    • Alen Milakovic
      Alen Milakovic about 9 years
      Is there some reason you just didn't use the distribution binary packages?
    • Pétur
      Pétur about 9 years
      @FaheemMitha I didn't know that was an option. There was no mention of that on the official FFTW website (that I could find). I'll keep that in mind next time!
    • Alen Milakovic
      Alen Milakovic about 9 years
      Most standard software is available as an Ubuntu package (which in most cases is a Debian package). Searching is usually easy - start with apt-cache search fftw for example. That searches the name and summary description, and usually suffices.
  • Mr. Unnormalized Posterior
    Mr. Unnormalized Posterior over 6 years
    While working with GPyTorch python library, I had to install this. So, I installed both libfftw3-dev and libfftw3-3.
  • Prasanta Bandyopadhyay
    Prasanta Bandyopadhyay over 2 years
    While installing gromacs, I also need to install fftw3. Can you tell me where to locate the file when installing from sudo apt-get
  • Stephen Kitt
    Stephen Kitt over 2 years
    @Prasanta which file are you looking for?
  • Prasanta Bandyopadhyay
    Prasanta Bandyopadhyay over 2 years
    Actually, I was looking for executable (I guess) with .s extension. I was only getting .a or .la extension and gromacs cmake installation wasn't okay with that.
  • Stephen Kitt
    Stephen Kitt over 2 years
    In my case, the GROMACS build looks for a number of fftw functions, all provided by /usr/lib/x86_64-linux-gnu/libfftw3f.so (apart from fftwf_have_sse but that’s normal). The cmake logs tell you exactly what it’s looking for.