LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-22-2003, 01:06 PM   #1
xudeyong
LQ Newbie
 
Registered: May 2003
Posts: 5

Rep: Reputation: 0
GCC has option for Xeon cpu ???


Hi all,

Does anyone know that the latest GCC version 3.4 has "-mcpu "option for xeon cpu???

Each time when I compile code using gcc or g77, it will read information from file "specs" . I read file "specs" and see there are a couple of cpu options in the files, such as i386,. i486 , pentium, pentiumpro etc, but there is no xeon. I use GCC 3.1 so far . so when I specify the "-mcpu=xeon" in the command line, it said xeon is bad value.

If GCC 3.4 has xeon cpu option in the file "specs" , then maybe I can specify "-mcpu=xeon" in the compile command line to test my slower code on xeon machine. Check my previous thread if you have interest on my codes running slower on xeon machine who has higher speed and more memory.

By the way, what is the use of file "specs" ? I don't understand this file completely.

Any idea ???? Thanks to all of you in advance.

Deyong
 
Old 05-22-2003, 01:56 PM   #2
bastard23
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 275

Rep: Reputation: 30
xudeyong,
I don't follow the processors much, but aren't the Xeon cpus just like their "desktop" versions, except a bigger/faster cache? Perhaps "rated" for SMP configs?

There isn't much for the compiler to optimize there. It's more up to your code to stay in the cache size. I believe (you should probably read the gcc mailing list archive for real info) that the cpu optimizations done are things like using newer instructions, or changing instruction order to keep the pipelines filled.

You would be better off looking at the '-f' optimizations (-funroll-loops vs. -funroll-all-loops) to see what runs faster on different cpus.

Oh, on reading your previous post, isn't a Xeon 1.8 a Pentium IV? vs. a PIII 1.0. I think they are about the same speed. Try compiling the code twice, once with -march=pentium3, and with -march=pentium4. Try to see any difference there.

The specs file is basically a preprocessor for options. If you needed to which C library got used, you could do it here.

Good luck,
chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc unrecognized option ruben22 Linux From Scratch 9 11-12-2008 04:41 AM
what does the option -s of gcc mean ? hongxing Linux - Software 3 11-28-2005 08:12 PM
gcc option -E use. niverson Programming 2 10-11-2004 04:06 PM
One virtual cpu missing (Dual Xeon system) muflon Linux - Hardware 3 08-03-2004 12:06 AM
Strange warnings with -Wredundant-decls option (gcc-3.4.0) yuray Linux - Software 0 05-03-2004 06:41 AM


All times are GMT -5. The time now is 12:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration