Slashdot Mirror


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?"

6 of 56 comments (clear)

  1. My Beliefs by MBCook · · Score: 4, Informative
    OK, here is my impression from years of reading hardware sites.

    The P4 has amazing floating point performance, but you have to use packed SSE2/3 to get it. For general (non-packed SSE or x86) floating point performance, the Athlon lines are strong.

    If you can get a low end Athlon 64 (like one of the single channel versions) that might be great for you. They are the "budget" versions but have great FPUs, more registers if your software can use it, and are true 64-bit.

    As for the Athlon (non-64), I wouldn't personally. I would think you could get a low end Athlon 64 (like I said above) for a reasonable price that would smoke it.

    Last of all, the Intel compiler is designed for Intel chips (duh), but the code can be run by Athlons and Opterons and even on the AMD chips it's code is often better performing than GCC code. That said, if you get a P4, using that compiler is probably a must because it is sooooo good at seting up floating point stuff and gets much better performance (but then again, what do you expect?). So give it a try no matter what you buy, it will probably help your performance.

    So those are my theories/impressions. You can get SFF PC that will hold just about any processor. Too bad money is an object because that dual-cpu Iwill Opteron SFF that will come out later this year would kill anything else in a SFF (assuming you can take advantage of the 2nd CPU with whatever you're doing, which I assume you can).

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  2. $80? by jeffy124 · · Score: 4, Insightful

    Try thinking this through in terms of return-on-investment. If $80 is all you're going to save on a product that's around $1000, it may not be worth it, especially given what else you know is going into each product. First, it's an 8% savings, hardly a significant bargain. Second, from what it sounds like you'll be doing with it, $80 extra for an Intel chip is very small sum for the increased performance (10% from your description above) you'll be getting in return. Third, assume you do find similar performance for an AMD, but might require payment for a compiler negating the $80 savings. Finally, ask yourself if searching for a free (as in beer) AMD compiler is worth $80 of your time if you already have everything in place for an Intel.

    I think you're best bet is the little extra you spend for the Prescott model.

    --
    The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
  3. save the money for tools by ghostlibrary · · Score: 5, Insightful

    Save your CPU money for the compiler (e.g. PGF90, or what have you), or for development tools, and for more RAM. A good compiler will give you a better handle on numerical accuracy than a 'better' CPU stuck with an off compiler. More RAM will keep you from being stingy in single/double precision allocations.

    Also, factor in your work time. A few percentage difference between CPUs won't count nearly as much as the 2 hours you saved because you had a good debugger, or the 4 hours saved because your editor makes it easier to write and jump around your code.

    Your accuracy will be pretty much the same, you just have to understand how computers represent floats and plan accordingly. Use accurate representations even if they're slower to get the numerical accuracy you need, then optimize the slow parts.

    Only optimize the stuff that runs slow. That means profile, don't just guess. You'll often be surprised by where the bottlenecks are.

    Higher accuracy usually means more memory (going with doubles rather than floats) or work (converting to integers within your desired floating range to control floating point accuracy). CPU won't be a biggie, but having lots of RAM will help.

    If you have a choice between spending 3 months writing and optimizing code, or spending 1 month writing code that isn't optimized, think of what 2 months of runtime will do. If it takes you a while to write the code, just buy your super-accurate machine _after_ coding, when it's time to do your real runs (since chip speeds already increase).

    In fact, if it takes you 3 months to optimize, you'd be better off keeping the slow code, doing another project, and 3 months later just buying a faster PC to run the slow old code :)

    All this off the top of my head, hope it helps.

    --
    A.
  4. Re:My Beliefs (Continued) by MBCook · · Score: 4, Informative
    I have something to add that another post reminded me of. If memory latency is important to you (I know know much about numerical simulations so I don't know), then you want an x86-64 chip by AMD. Becuase of the on-die memory controller, the memory latency is substantially lower than on P4s (especially the high end P4s with the huge clock speeds).

    The last thing I have to say is that as another poster pointed out, are you stuck in the Wintel world? Because the G4 and G5s (the later especially) are supposed to be VERY good at this kind of thing. So you could use a XServe G5 (pretty small) or just a normal G5 (not as small). They aren't that cheap (probably couldn't get one in your budget, but maybe used) but they should preform great. They are also true 64-bit. Also, IBM sells G5 computers, so you're not stuck buying an Apple (you might be able to get a cheaper one that way too). Not sure about the sizes of those though.

    Just more stuff to think about.

    --
    Comment forecast: Bits of genius surrounded by a sea of mediocrity.
  5. Re:there is a difference by CaptainCheese · · Score: 4, Interesting

    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.

    --
    -- .sigs are a waste of data...turn them off...
  6. CPU? Use the GPU! by Bazman · · Score: 4, Interesting

    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