Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#18550 closed defect (fixed)

fftw-3[-single] 3.2.1 : should not have --enable-fma for Intel builds

Reported by: eborisch@… Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: fftw-3, fftw-3-single

Description

Both the fftw-3 and fftw-3-single ports have --enable-fma in their configure.args. These should be removed, as they are incorrect for Intel builds, and replaced with the appropriate platform-specific args.

Suggested args:
PPC: --enable-fma --enable-altivec
Intel: --enable-sse OR --enable-sse2 (for fftw-3-single, and fftw-3, respectively)

It might also be nice to add '-O3 -fomit-frame-pointer -fstrict-aliasing' to the configure.cflags-append -- most folks using FFTW are going for speed; might as well build for it. (These flags were found on the FFTW benchmark site: http://www.fftw.org/speed/Pentium4-3.06GHz/ and http://www.fftw.org/speed/G5-2GHz-macosx/)

Attachments (2)

fftw-3.diff (1.0 KB) - added by skymoo (Adam Mercer) 15 years ago.
apply flags to fftw-3
fftw-3-single.diff (1.2 KB) - added by skymoo (Adam Mercer) 15 years ago.
apply flags to fftw-3-single

Download all attachments as: .zip

Change History (16)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Keywords: fftw-3 removed
Owner: changed from macports-tickets@… to takeshi@…

comment:2 Changed 15 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:3 Changed 15 years ago by skymoo (Adam Mercer)

On Intel Leopard fftw-3 and fftw-3-single build without error using these suggested flags. I've attached patches, can anyone test on PPC?

Changed 15 years ago by skymoo (Adam Mercer)

Attachment: fftw-3.diff added

apply flags to fftw-3

Changed 15 years ago by skymoo (Adam Mercer)

Attachment: fftw-3-single.diff added

apply flags to fftw-3-single

comment:4 Changed 15 years ago by skymoo (Adam Mercer)

One thing I've just noticed is that the Portfiles already used the -fno-common cflag and the page you linked to didn't mention this cflag. Should this be used?

comment:5 Changed 15 years ago by skymoo (Adam Mercer)

fftw-3 fails to build with the universal variant with the following error:

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../kernel -I../../simd -msse2 -O2 -fno-common -O3 -fomit-frame-pointer -fstrict-aliasing -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -D_THREAD_SAFE -MT sse2.lo -MD -MP -MF .deps/sse2.Tpo -c sse2.c  -fno-common -DPIC -o .libs/sse2.o
sse2.c:27: error: variable 'fftw_sse2_pm' has initializer but incomplete type
sse2.c:28: error: extra brace group at end of initializer
sse2.c:28: error: (near initialization for 'fftw_sse2_pm')
sse2.c:28: warning: excess elements in union initializer
sse2.c:28: warning: (near initialization for 'fftw_sse2_pm')
make[3]: *** [sse2.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Also on Intel Leopard. Looks like the --enable-sse2 option is being passed to configure for the PPC build.

comment:6 Changed 15 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… added

Cc Me!

comment:7 Changed 15 years ago by skymoo (Adam Mercer)

Cc: ram@… removed
Keywords: fftw-3-single removed
Owner: changed from takeshi@… to ram@…
Port: fftw-3-single added
Status: newassigned

comment:8 in reply to:  4 Changed 15 years ago by eborisch@…

Replying to ram@…:

One thing I've just noticed is that the Portfiles already used the -fno-common cflag and the page you linked to didn't mention this cflag. Should this be used?

The -fno-common originated while addressing Ticket #14240 -- I'd guess leave it in for now!

comment:9 Changed 15 years ago by eborisch@…

How about this for fftw-3:

array set merger_configure_args {
        ppc    "--enable-fma --enable-altivec"
        ppc64  "--enable-fma --enable-altivec"
        i386    --enable-sse2
        x86_64  --enable-sse2
}

and this for fftw-3-single:

array set merger_configure_args {
        ppc    "--enable-fma --enable-altivec"
        ppc64  "--enable-fma --enable-altivec"
        i386    --enable-sse
        x86_64  --enable-sse
}

(Keeping your other changes to configure.args and configure.cflags-append)

comment:10 Changed 15 years ago by eborisch@…

The configure argument "-enable-type-prefix" in fftw-3-single should go away as well (not a valid - or needed - argument anymore.)

comment:11 in reply to:  9 Changed 15 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: assignedclosed

Replying to eborisch@…:

How about this for fftw-3:

array set merger_configure_args {
        ppc    "--enable-fma --enable-altivec"
        ppc64  "--enable-fma --enable-altivec"
        i386    --enable-sse2
        x86_64  --enable-sse2
}

That does the job, although --enable-altivec is only appropriate for the single precision build.

Replying to eborisch@…:

The configure argument "-enable-type-prefix" in fftw-3-single should go away as well (not a valid - or needed - argument anymore.)

Done

Changes committed in r47232, thanks!

comment:12 Changed 15 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: closedreopened

Reopening as the platform specific flags, --enable-sse2 for example, are not applied when the port is built for a single platform, i.e. not universally.

comment:13 Changed 15 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: reopenedclosed

Platform specific flags applied to non-universal builds in r47243

comment:14 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.