Ubuntu

SSE is not enabled for amd64

Reported by Roland Schulz on 2010-07-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fftw3 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: fftw3

For x86/i386 FFTW is compiled with --enable-sse(2). For amd64/x86-64 this flag is missing. Adding this flag is very important for the performance.

The part from debian rules where it is set for i386:

+ifeq ($(ARCHITECTURE), i386)
+ archconfflags_single := --enable-sse
+ archconfflags_double := --enable-sse2
+ archconfflags := $(archconfflags) --with-gcc-arch=pentium4
+endif

The equivalent rule should be added for amd64.

Related branches

Sylvestre Ledru (sylvestre) wrote :

Two comments:
* This is wrong for i386 (at least under Debian): we should not restrict users to SSE or SSE2.
* About amd64, this bug is invalid (at least for the SSE). SSE is enabled by default under amd64 [1]
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
`sse'
[...]
"This is the default choice for the x86-64 compiler."

Roland Schulz (roland-rschulz) wrote :

Yes it is correct that for amd64 SSE is enabled by default in the compiler. But (if I'm not wrong) the FFTW --enable-sse flag does not (only) set compiler flags. Instead it activates the specially written SSE optimized kernels are compiled. Because the --enable-sse flag is not passed, those kernels are not compiled even though all amd64 processors have SSE/SSE2. Thus SSE is activated in the compiler but not for FFTW.

stevenj (stevenj) wrote :

I'm one of the FFTW developers, and I can confirm that the SSE/SSE2 code is NOT compiled in FFTW if the --enable-sse/--enable-sse2 flags (in single/double precision) are omitted. You should definitely pass these flags to the configure script on x86-64 systems.

stevenj (stevenj) wrote :

One other comment: it is save to use these flags on i386 - the resulting FFTW binary still works on machines not supporting SSE/SSE2, because it checks at runtime to see if SSE/SSE2 is available and disables FFTW's SSE/SSE2 routines if not.

See also http://fftw.org/doc/Installation-on-Unix.html

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fftw3 - 3.2.2-1ubuntu1

---------------
fftw3 (3.2.2-1ubuntu1) oneiric; urgency=low

  * Rebuild with gfortran-4.6.
  * Configure with --enable-sse --enable-sse2 on amd64. LP: #602586.
 -- Matthias Klose <email address hidden> Sat, 10 Sep 2011 11:19:17 +0200

Changed in fftw3 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers