FFTW3 build with SSE options.

Has anyone been able to build FFTW3 with the SSE options enabled
in the configuration? Like:

./configure --enable-sse --enable-float …

This seems to trigger references to the gcc inline assembler function ‘asm’
which then kills pgcc. Using the -Masmkeyword does’t help! I can build
it with CC="-fastsse" but that’s not quite the same thing.


Hi gas,

I believe “–enable-sse” is used to include the SIMD “sse*.c” files into the project and does not mean that the compiler should generate sse instructions. Unfortunately, these files use extended asm statements which pgcc does not yet support. You’ll need to either compile with gcc or not use “–enable-sse”.

  • Mat

Thanks Mat. This is pretty much what I have conluded. I’m going
to build the /simd directory with gcc3.x and then finish off the build
with pgcc. Are there any plans to put an inline asm macro/intrinsic
into pgcc anytime soon? The reason for using --enable-sse is that
the FFTW3 build is about twice as fast with it! I’ll also contact fftw.org
and see if they have any plans to solve this type of problem. Is PGI
planning to put the Intel SSE intrinsics into pgcc? This would also
solve the problem.


We’ve dicussed it and do have a plan in place. However, it is a huge undertaking and right now our highest priority is performance. I believe we will eventually add support for extended asm since we can not compile the Linux kernel until we do, but we don’t have a firm timeline.

  • Mat

The FFTW3 library is extensively used on linux clusters and the SSE support is vital to its
performance on Pentium and Opteron processors. It would be worth your trouble to at
least come up with a workaround to the makefiles to allow pgcc to build the FFTW3 library.
The absence of the FFTW3 benchmarks from your advertising material is conspicuous. I
would also suggest the Seismic Unix pfafft (prime factor algorithm fft) benchmarks. This
a second choice, but would indicate pgcc performance in this area. The pfafft program is
entirely in C like the FFTW3 package.


Once the 6.0 release is out the door, myself and the other application engineers will be able to get back to writing more of the “Tips and Techniques” guides. We are planning on adding FFTW3 as well as information about working with libtool. I’ll also add the Seismic Unix pfafft to the list.

Thanks for the suggestions,