On 2008-07-03 09:06:04 -0400, Michael Meissner wrote: > > Also, is there a way to *automatically* get the best march value for > > the local machine? In my case, jobs run on various machines (they're > > submitted by SGE): they generate C code, compile it locally and run > > it. I don't even have a direct ssh access to some of these machines. > > -march=native was added in GCC 4.2 will probe the system and set the > appropriate tuning defaults. Some Linux vendors have ported the > -march=native support back to their 4.1 compilers. I could try that; this is not the case of the default compiler here (gcc 4.1.2 in Debian/etch), but gcc 4.3 is installed on every x86 and x86_64 machines here. According to the gcc man page, "native" is available only for such machines anyway, and there are only two other machines (a PowerPC and an Itanium), for which I can give particular options. > I am currently working on a project (function specific option > support) that would allow you to compile a function with different > options. Sounds interesting. This would have been very useful in the past to provide -ffloat-store (still a bit nowadays) to functions that needed it. > The current patches that are in review allow you to specify the > options for the function, but you have to do the appropriate glue > work to make sure a function compiled for the right system gets > chosen. I hope to go to the next stage where the compiler would > generate the clone functions and dispatch them automatically. Something a bit similar to fat binaries, but with a finer grain and more features? -- Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)