GFortran 44 optimizations and Intel SSE4
Jacob Anderson
jwa@beyond-ordinary.com
Tue Nov 1 21:15:00 GMT 2011
More on this ...
If I specify all BUT the -O3, it works fine and I get an executable without
any link errors.
Only the "-O3" option causes the link errors.
-- jake
> -----Original Message-----
> From: fortran-owner@gcc.gnu.org [mailto:fortran-owner@gcc.gnu.org] On
> Behalf Of Jacob Anderson
> Sent: Tuesday, November 01, 2011 2:07 PM
> To: fortran@gcc.gnu.org
> Subject: RE: GFortran 44 optimizations and Intel SSE4
>
> Sure enough, when I added "-O3" to the options, I got the reference
> errors:
>
> undefined reference to `std::basic_ostream<char, std::char_traits<char>
> >& std::__ostream_insert<char, std::char_traits<char>
> >(std::basic_ostream<char, std::char_traits<char> >&, char const*,
> long)'
>
> undefined reference to `std::ctype<char>::_M_widen_init() const'
>
> etc ...
>
> Is there a special library that I need to use when compiling with -O3
> and gfortran44/gcc44?
>
>
> > -----Original Message-----
> > From: fortran-owner@gcc.gnu.org [mailto:fortran-owner@gcc.gnu.org] On
> > Behalf Of Jacob Anderson
> > Sent: Tuesday, November 01, 2011 1:55 PM
> > To: fortran@gcc.gnu.org
> > Subject: RE: GFortran 44 optimizations and Intel SSE4
> >
> > I was able to build the mvapich2 library using my optimizations. When
> > I tried to build an executable with said optimizations, I got:
> >
> > undefined reference to `std::ctype<char>::_M_widen_init() const
> >
> > If I remove the optimization options:
> >
> > -march=native -msse4.2 -maes -O3 -funroll-loops --param max-unroll-
> > times=4
> >
> > Then it links the executable just fine.
> >
> > It would see, without any credible evidence though, that using the
> > native architecture optimizations causes some incompatibilities....
> >
> > I am experimenting with the different options to find out which one
> > causes the link error.
> >
> > -- Jake
> >
> >
> > > -----Original Message-----
> > > From: fortran-owner@gcc.gnu.org [mailto:fortran-owner@gcc.gnu.org]
> > > On Behalf Of Tim Prince
> > > Sent: Tuesday, November 01, 2011 11:05 AM
> > > To: fortran@gcc.gnu.org
> > > Subject: Re: GFortran 44 optimizations and Intel SSE4
> > >
> > > On 11/1/2011 12:42 PM, Jacob Anderson wrote:
> > > > Hi,
> > > >
> > > > Thanks for the responses! Yes, I did mean the "-Ox" generic
> options.
> > > >
> > > > We are compiling against Intel X5670 and X5620, so no desktop
> > > architectures. The "SSE4.2" extensions are of interest for their
> > > vector capabilities. Is there any online documentation on the
> > > optimization algorithms used when the SSE4 optimizations are
> enabled?
> > > >
> > > > We are using gfortran44 version 4.4.4 20100726:
> > > >
> > > > GNU Fortran (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13) Copyright (C)
> > > > 2010 Free Software Foundation, Inc.
> > > >
> > > > Thanks
> > > >
> > > > -- jake
> > > >
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: fortran-owner@gcc.gnu.org
> > > >> [mailto:fortran-owner@gcc.gnu.org]
> > > >> On Behalf Of Tim Prince
> > > >> Sent: Tuesday, November 01, 2011 9:28 AM
> > > >> To: fortran@gcc.gnu.org
> > > >> Subject: Re: GFortran 44 optimizations and Intel SSE4
> > > >>
> > > >> On 11/1/2011 11:42 AM, Jacob Anderson wrote:
> > > >>
> > > >>>
> > > >>> Does the general optimization option to gfortran44 include Intel
> > > >>> SSE4
> > > >> optimizations (4.1 AND 4.2)?
> > > >>>
> > > >>
> > > >> Perhaps that's not what you meant to ask? By general, do you mean
> > > >> generic (definitely not including -msse4)?
> > > >>
> > > >> http://gcc.gnu.org/onlinedocs/gcc-4.4.6/gcc/i386-and-x86_002d64-
> > > >> Options.html#i386-and-x86_002d64-Options
> > > >>
> > > >> -msse4.1 and -msse4.2 are listed there.
> > > >>
> > > >> -mtune=barcelona , which you might use for Core I7 (with or
> > > >> without -msse4), if you don't want to use a current gfortran, is
> > > listed there.
> > > >>
> > > >> --
> > >
> > > Oh, just in case, auto-vectorization is enabled either by setting
> > > -O3 or by adding -ftree-vectorize to the options list at -O2 or -O1.
> > > For myself, I've got improved results on the Xeon 5500 and 5600
> > > series by adding -funroll-loops --param max-unroll-times=4
> > >
> > >
> > > --
> > > Tim Prince
> >
>
>
More information about the Fortran
mailing list