[Numpy-discussion] Simplifying compiler optimization flags logic (fortran compilers)

Bruce Southey bsouthey@gmail....
Mon Nov 3 08:44:19 CST 2008

Michael Abshoff wrote:
> Jarrod Millman wrote:
>> On Sat, Nov 1, 2008 at 1:07 AM, Robert Kern <robert.kern@gmail.com> wrote:
> Hi,
>>> On Fri, Oct 31, 2008 at 05:25, David Cournapeau
>>> <david@ar.media.kyoto-u.ac.jp> wrote:
>>>>    I was wondering whether it was really worth having a lot of magic
>>>> going on in fcompilers for flags like -msse2 and co (everything done in
>>>> get_flags_arch, for example). It is quite fragile (we had several
>>>> problems wrt buggy compilers, buggy CPU detection), and I am not sure it
>>>> buys us much anyway. Did some people notice a difference between
>>>> gfortran -O3 -msse2 and gfortran -O3 ?
>>> You're probably right.
> we removed setting the various SSE flags in Sage's numpy install because 
> they caused segfaults when using gfortran. I don't think that there is a 
> significant performance difference with SSE for that code because we use 
> Lapack and ATLAS build with SSE when it is available.
>> I think it is probably best to take out some of the magic in fcompilers as well.
> Cheers,
> Michael
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
I just wanted to point out that the man page on Linux and the GCC manual 
for i386 and x86 options 
"For the i386 compiler, you need to use -march=cpu-type, -msse or -msse2 
switches to enable SSE extensions and make this option effective. For 
the x86-64 compiler, these extensions are enabled by default."
"This is the default choice for the x86-64 compiler."

While this is still a relatively few proportion of processors and I do 
not know when GCC started this,  the sse flags should be redundant and 
thus removed as more people use x86_64 processors.


More information about the Numpy-discussion mailing list