From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,1b412df22c3ee016 X-Google-Attributes: gid111c93,public From: Toon Moene Subject: Re: Compiler and performance Date: 1998/09/05 Message-ID: <6ss0h0$f29$1@newnews.nl.uu.net>#1/1 X-Deja-AN: 388214604 References: <35EADB4B.13E9456D@itm.rwth-aachen.de> <0ehrs6.0cn.ln@ewrcsdra.demon.co.uk> Organization: Moene Computational Physics, Maartensdijk, The Netherlands Newsgroups: comp.os.linux.alpha rsimpson@ewrcsdra.Cut_This_Out.demon.co.uk wrote: > 1) Get the ffmath library - > http://people.frankfurt.netsurf.de/Joachim.Wesner/. This made a BIG > difference to our Fortran codes. Indeed ! Thanks to Joachim for this effort ! > 2) I understand that haifa does not work under Alpha with egcs 1.0.3. I > deduce this from the fact that one of the changes under egcs 1.1a is listed > as "haifa now works under Alpha". Well, in the egcs 1.0.x series, the HAIFA instruction scheduler was included as an untested option. Unfortunately, (AFAIUnderstand), Red Hat build their egcs 1.0.2-8 with HAIFA enabled, which introduced subtle bugs in the compiler - yeah, you just can't win. Goes to show that "works for us" isn't a guarantee with compilers ... > 3) Switching to 1.1a did not improve the speed of my code until I enabled > the -fno-emulate-complex option whereupon I got a big improvement. My > results files were identicle with and without this option. I start to get an idea when -fno-emulate-complex works and when it doesn't. One of the main problems with the internal representation of Single Precision Complex Data in the "middle" end of the compiler - i.e. the routines between the various front-ends and backends is that an item that's 64-bits wide is kept as a single item. On targets that are basically 64-bit architectures (like the Alpha, some Sparc and some MIPS targets), this interferes with the way two 32-bit parts are handled vis-a-vis the 64-bit registers. One way to see this is to try to compile the LAPACK distribution from ftp.netlib.org with -fno-emulate-complex on an Alpha - it dies in one of the first single precision complex routines with an abort in gen_low_part; i.e. it tries to insert or extract a (32-bit) part of a 64-bit register that doesn't support 32-bit parts (like the floating point registers on an Alpha). So, it *might* be that for DOUBLE COMPLEX there's actually no problem. There's hope that this will be solved in the not to distant future, because glibc (as a consequence of having to move to the C9X Standard) is going to use the internal complex representation more often. HTH, -- Toon Moene (mailto:toon@moene.indiv.nluug.nl) Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Phone: +31 346 214290; Fax: +31 346 214286 g77 Support: mailto:fortran@gnu.org; egcs: mailto:egcs-bugs@cygnus.com