RS: [Beowulf] Sempron compile optimization

Robert G. Brown rgb at phy.duke.edu
Wed Nov 23 11:43:14 EST 2005


On Wed, 23 Nov 2005, Alan Ward wrote:

> I'm running a Fedora, classicaly compiled for "i686", on the aforesaid Semperon 3000+ (actually a 1800MHz clock).

Do I understand you correctly here?  Why not use x86_64 FC 4 on an
x86_64 box?  Of course running i686 binaries, libraries, and so on won't
give you top performance, and in that case you ARE de facto
cross-compiling -- for your native architecture.

Again, it was my understanding that if you run an x86_64 version of a
distro, the kernel, the libraries, and the applications are all compiled
with gcc which is ITSELF compiled for that architecture, and gcc
defaults to doing the right thing and linking the right libraries
automagically.  In fact if anything, the trick is to get i386 apps to
run -- that requires that the libraries be loaded and linkable, not that
easy to manage when the default library is x86_64.

    rgb

>
>> Sorry, to be more explicit, I think that MOST people probably don't want
>> to use -m features, whether or not they work.  The compiler will usually
>> "do the right thing" without them, unless you are cross-compiling.  I
>> think they are there mostly for cross-compilers.
>
> So far, a quick series summation gave me:
>
> * "vanilla" gcc (no switches):  19.1 s
>
> * add -march=athlon: 9.9 s
>
> * other FPU options (-sse, -3dnow) have no further effect, probably incorporated into athlon.
>
> * replace with -march=x86-64: 8.3 s
>
> * add -m64: cc1 complains, doesn't compile. Doc says it should work (yah).
>
> No exactly rocket science, but a 130% speedup that doesn't cost anything. Disclaimer: probably depends quite a lot on your code, as usual.
>
> The bad news is: you also get to recompile all your dynamically linked libraries, or you don't win anything. Happened to me with libgmp.
>
> Best,
> Alan Ward
>
>
>
>

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu


_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list