RE: Custom Gentoo Compile

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Wagner, Steven G
Date:  
To: Main PLUG discussion list
Subject: RE: Custom Gentoo Compile
Thank you for such an insightful response, Alexander. I am currently running
Gentoo on a Sempron with the -02 flag setting. I will definitely take your
advice and research this more thoroughly. You've set me on a path and I
appreciate you sharing this wisdom greatly. In the end, I would much prefer
to learn to utilize a free utility, like GCC, intelligently than pay for
someone else to do my work for me. It's so much more rewarding!

I'm sure I'll be back with more questions, have a great week.

Steven

-----Original Message-----
From:
[mailto:plug-discuss-bounces@lists.plug.phoenix.az.us]On Behalf Of
Alexander Henry
Sent: Sunday, June 04, 2006 9:52 PM
To: Main PLUG discussion list
Subject: Re: Custom Gentoo Compile


On Fri, 02 Jun 2006 00:51:25 -0700, Wagner, Steven G <>
wrote:

> I came across this article,
> http://www.cpuplanet.com/news/article.php/3111051, and was wondering if
> there was a way I could compile Gentoo with this company's compilers
> rather
> than GCC. Their compilers are designed to optimize code for Opteron
> chips,
> so I was thinking that it would be nice to build a 64-bit Linux cluster
> with
> Opteron servers running Gentoo custom-compiled for Opterons. They claim
> that
> their compilers boost performance by 40%. Maybe I'm way off-base here,
> but
> it's late and I just got home from work :)
>
> Thanks,
>
> Steve


Gentoo is already made so that you zero in on a particular microprocessor.

http://gentoo-wiki.com/Safe_Cflags

The table in the web page above has recommended flags for all of the CPUs
out there. You usually just stick those settings in make.conf, and the
settings are applied to all compiled packages. You can also specify
different compile flags for each package, if you wish, though I've not yet
gotten that paranoid. I searched briefly, it looks like you do it with a
combination of settings in /etc/portage/package.keywords and a program
called flagedit, and I see some scripts you put in your make.conf.

All Linux distros are compiled to be compatible, not optimized for speed
on a particular CPU. The -mtune flag compiles for compatibility. Leaving
out -mtune and using -march will compile for exactly that CPU
architecture. So you'd already be getting a performance boost versus the
Fedoras and Suses just by using Gentoo with the entry in Safe_Cflags for
ther opteron.

I've never seen instructions in Gentoo forums, wiki, or handbook on using
anything except gcc!

People consider compilers to be an academic problem rather than a business
one. They're mostly concerned about how to make data structures with
trees and lattices to build and optimize the instructions. A graduate
student spends two semesters making a new algorithm, then it's publish or
perish. GCC being open source, you publish an implementation there
first. I took an advanced compiler course, and there are LOTS of obscure
compiler flags to turn on and off different compiler features. The -O2
and -O3 flags encompass "safer" sets of these. man gcc, then search for
-O2, you'll see the list here. The ones you see here are "safe", there
are plenty of "unsafe" ones that pop in to GCC as time passes. If you
want a nice non-narcotic trip, search again for one of the options listed
under -O2, and read what they do :) Then try finding stuff not listed
under -O2 or -O3 with really nasty warnings by them or other non-sensical
language like "not supported in GCC".

I'm willing to bet that once you find out what compiler algorithms
PathScale uses, you could just turn on those switches in GCC. It may be
that GCC doesn't implement one or another feature well, but then you could
pull the white paper on the algorithm, recode it, and it'll be done. I
think PathScale is trying to cyphon some of those big bioinformatics
bucks. That money will dry up once they realize the work was already done
in GCC long before PathScale did it. That's just a guess, but I think
that's more likely the situation.

You'd also get a performance boost when your kernel and programs are
compiled without all the hooks for all the stuff on a desktop, and made
just for running jobs on a network cluster. That's more a matter of the
environment than the compiler itself, but then that wouldn't be the first
time a piece of company marketing had some "slight" misnomers in it :)

--
Alexander
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.1/355 - Release Date: 6/2/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.1/355 - Release Date: 6/2/2006

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss