CPUs/Compilers for Numerical Simulations?
X43B asks: "I'm building a 'luggable' computer for numerical simulation work (very niche, I know). My goal is to have the best single precision floating point performance for under $1000. I have decided on a Shuttle XPC layout. I can build a AMD 3500+ for ~$80 less than a Prescott 3.4Ghz. I know the AMD is supposed to be a better 'general purpose' CPU however I found this comparison which says the Intels are better for floating point. Additionally, even though the AMD is somewhat cheaper, I have found the free Intel Linux FORTRAN compiler quicker than gfortran. So even if the AMD had similar performance for cross compiling, the Intel would be ~10% faster with the free compiler. Does anyone have any recommendations on AMD vs Intel for single precision floating point operations? If you recommend the AMD, what (cheap or free) compiler can be used that is comparable to the Intel?"
AMD and Intel both subscribe to the IEEE 754 standard for FPU units, which defines the functions of single and double precision FPU operations and various other things, like how to handle the inevitable rounding errors.
No FPU meeting this standard will produce different results than any other FPU. They're just faster or slower at doing it.
You'll only start getting differences when you hack non-standard speed optimisations into your code. It's unfair to blame Intel and AMD for people writing incompetently coded software - they just provide the stick, it's the coder who's beating you with it.
--
...[your] best bet is the little extra you spend for the Prescott model.
And the little extra you spend on the massive heatsink you buy to keep it cool in an enclosed space.
A few SFF systems come with their own heatsink, most notably Shuttle XPCs with their proprietary ICE heatsink. I'd go for one of those if using a Prescott.
Intel has a set of optimized mathematical libraries for all sorts of applications (linear algebra, image processing, random number generation, FFT's, etc). Not only are they optimized for Intel systems, but they save you the time of coding it yourself.
Intel also provides the VTune Performance Analyzer, which allows you to trace the path through your programs and determine where the bottlenecks are.
I've used the Intel Linux Fortran compiler and I am very happy with it. Code that runs fine on my Sun workstation (950 Mhz, 6 gig RAM) at school works 4-5x faster on my home PC (2.8 Ghz, 1 gig RAM). It's got all the fancy optimization options, but a simple -O3 -ipo will get you 90% there.
My two bits.
Favorite
i have not tried this with intel's fortran compiler, *but*, from what i've heard, the intel c/c++ compiler produces code that performs substantially better than gcc on an amd processor. does the code running on an amd perform comparably to code running on an "equivalent" (take that term to mean what you will) intel box? i have no idea, but *if* i remember correctly, i was seeing a good 15-20% increase over gcc on the stuff i was doing targeting a p4. since amd makes chips which are, in theory, binary compatible with p4s, it may be worth a shot. another thing to recommend the intel compilers: their native support of openmp. if you do go with a dual box, you can give the intel compiler hints about how to parallelize your code to take full advantage of all n processors (don't know if you'll have ht turned on or not). hope this helps at least a little bit.
Maybe you just want a better graphics card? Nowadays you can run numerical calculations on the graphics card's processor - and no, you don't get random noise all over your screen, its not simple memory-mapped graphics! Plus it gives you the excuse to buy a machine that can play Doom 3.
More info here: http://www.gpgpu.org/
Whatever you do, make sure you have a properly tuned ATLAS library:
http://math-atlas.sourceforge.net/
I don't know if anyone has got ATLAS or BLAS to work on GPUs yet.
Baz