1

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?

  • Is there some reason you just didn't use the distribution binary packages? – Faheem Mitha Jun 15 '15 at 9:54
  • @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! – Pétur Jun 15 '15 at 10:19
  • 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. – Faheem Mitha Jun 15 '15 at 10:44
4

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
  • While working with GPyTorch python library, I had to install this. So, I installed both libfftw3-dev and libfftw3-3. – imsrgadich Mar 29 '18 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.