• Competitor rules

    Please remember that any mention of competitors, hinting at competitors or offering to provide details of competitors will result in an account suspension. The full rules can be found under the 'Terms and Rules' link in the bottom right corner of your screen. Just don't mention competitors in any way, shape or form and you'll be OK.

Talk to me about Mathematica

Associate
Joined
11 Dec 2004
Posts
1,979
Hey all,

I'm starting a PhD soon, and I need to sort out a desktop computer for myself. The only real computational work I'll be doing will be quite intense numerical work done in Wolfram Mathematica (a fairly standard maths programming package), and possibly some other comparable programs if and when I require them.

Does anyone know what kind of processors these programs prefer? Results on the internet are few and far between, but a Sandybridge i7 topped the single decent benchmark that I found (this was before Ivy was released, I think).

My main reason for asking is that I have a sneaking suspicion that a properly programmed Mathematica simulation might prefer more cores over higher clocks, so I was wondering if I could get away with a 8-core AMD rather than a more expensive Intel i7 or i5. I'm not certain where the money is coming from yet, whether it's from my own computer budget (that I may or may not have) or from the department, so I don't know how much I'm allowed to spend. I certainly can't afford a top-of-the-line Sandybridge-E, so I'd be looking at an Ivy i7 at most, or an i5 if the numerical performance is comparable. I know OcUK has a soft spot for Intel over AMD at the moment, but we generally talk about gaming here rather than numerical simulations, so I don't know if Intel are still top dog in this area or not.

This may all be a moot point since I'm not sure how much say I'll have over the detailed specs (might have to order an off-the-shelf rather than a custom build), but I thought I'd best find out anyway. I've been a loyal OcUKer for years, so I'd like to order from here, but I'm not sure what our IT department would make of it - I get the impression I'm supposed to send them a link to a prebuilt computer and they'll buy it, rather than speccing one up via the 'Configurator', but I might try my luck if I can figure out a spec that will give excellent performance.

So: clock speed vs number of cores for mathematical programming? If anyone's knowledgeable about this sort of thing, I'd greatly appreciate an answer.

Thanks,
Steven
 
Mathematica is optimized for the latest operating systems and hardware, so you can use any system you want.
Hardware Specifications

Processor: Intel Pentium III 650 MHz or equivalent
Disk Space: 4 GB
System Memory (RAM): 512 MB required; 1 GB+ recommended

http://www.wolfram.com/mathematica/features/system-requirements.html

That isn't what OP asked :p

There's nothing obvious about online, and I am not nearly smart enough to have used Mathmatica, but this guy seems to know his apples

For symbolic computations in Mathematica
we need large, fast caches and good performance in single-threaded integer
workloads (characteristics that are shared by code compilation and
videogames), and for numerical computations good memory bandwidth and
multithreaded floating-point performance are called for (in common with
HPC workloads and to some extent video encoding). In both cases Intel
processors are a better match for Mathematica's requirements than AMD
processors, which are more optimized for throughput in multithreaded
integer workloads (although, if you make extensive use of the Parallel`
package, AMD processors may be much more attractive)

http://forums.wolfram.com/mathgroup/archive/2012/May/msg00170.html

So, it depends on what kind of mathmagic you are performing. I'd go SB/IB for guaranteed performance in pretty much everything else and maybe take the (mostly insignificant) hit in operations where Bulldozer pulls ahead
 
*£5k spec*

32 threads, 96GB of RAM.


I'd love one, but I forsee the department having a minor fit if I asked for one of those. :p

There's nothing obvious about online, and I am not nearly smart enough to have used Mathmatica, but this guy seems to know his apples

http://forums.wolfram.com/mathgroup/archive/2012/May/msg00170.html

So, it depends on what kind of mathmagic you are performing. I'd go SB/IB for guaranteed performance in pretty much everything else and maybe take the (mostly insignificant) hit in operations where Bulldozer pulls ahead

Fantastic find! Yeah, I'm leaning towards Intel anyway, but I figured this might be one of those situations where AMD's more numerous cores came into play, but it doesn't sound like it from the info there. Depends how I code things, ultimately, as to how much use I make of parallel processing.
 
I know you ruled out SB-E but a good compromise would be a system built around an i7 3930k. Its a bit more expensive than the top ivy/sandy bridge quads but you get 6 cores and its a better overclocker than ivy bridge. For number crunching theres very little that will beat it unless you want multi cpu setups like the xeon system above.
 
Steven
A four core SB or IVY would be your best bet, given your budget constraints.

The AMD 8 core BD would not be a good choice as it actually has only 4 FP units and very weak AVX capabilities.

You would do well to ask your question at
http://www.mersenneforum.org/

Lots of marhematica users there.
 
I know you ruled out SB-E but a good compromise would be a system built around an i7 3930k. Its a bit more expensive than the top ivy/sandy bridge quads but you get 6 cores and its a better overclocker than ivy bridge. For number crunching theres very little that will beat it unless you want multi cpu setups like the xeon system above.

It does sound like it'd be a killer processor, but the price puts me off. If I'm able to talk the department into funding it then that would be a great option, otherwise I think it's probably too much.

Steven
A four core SB or IVY would be your best bet, given your budget constraints.

The AMD 8 core BD would not be a good choice as it actually has only 4 FP units and very weak AVX capabilities.

Interesting, thanks for that.


What's the difference between the cheapest SB-E (the i7-3820 @ 3.6Ghz) and the cheapest overclockable Ivy i7 (the i7-3770K @ 3.5Ghz)? They're similar in price, the Ivy has lower clocks but is more efficient so the clock speeds are almost equal in real terms...they look to be pretty similar. Does the 3820 have a locked multiplier? And even if so, is there any advantage in that SB-E over the Ivy?
 
What's the difference between the cheapest SB-E (the i7-3820 @ 3.6Ghz) and the cheapest overclockable Ivy i7 (the i7-3770K @ 3.5Ghz)? They're similar in price, the Ivy has lower clocks but is more efficient so the clock speeds are almost equal in real terms...they look to be pretty similar. Does the 3820 have a locked multiplier? And even if so, is there any advantage in that SB-E over the Ivy?

Quad channel memory on SB-E vs Dual channel on IB. Having said that its only relevant if you are going to use it.
 
What will you be doing? Numerical or more on the logic/integer side? PDE, optimisation, or cryptography?

More numerical than anything else. I'm actually more pen-and-paper focussed than computational, I just need the computer to do some brute-force calculations that aren't possible (or practical) analytically.

Quad channel memory on SB-E vs Dual channel on IB. Having said that its only relevant if you are going to use it.

When would this feature come into play, and what kind of performance increase would we be talking? I suspect what I'm doing is more dependant on processor clock speed and cores than on any memory-related properties, but that's really just a guess.
 
It seems Mathematica is poorly optimised for AMD CPUs ATM:

https://groups.google.com/forum/?fromgroups#!topic/comp.soft-sys.math.mathematica/KLn0k0kQ198[1-25]

"Thank you, Oleksandr, for your insightful comments!

It appears that the name "Bulldozer" of the AMD FX processor is misleading
because it implies slow but numerous and well coordinated cores but, in facts, the cores are fast but do not collaborate well. And my testing suggests that there are effectively 4 cores rather than the announced 8 cores.

My posted testing was imperfect, indeed, and I have modified it as shown below:

*******************************************************
DEFINITIONS

(* Test program 1 - efficiency of using MKL, that is, autimatic threading \
over the cores *)
NN = 1000;
AMatr = Table[RandomReal[], {i, 1, NN}, {j, 1, NN}];

TestProgram1 := Module[{},
Do[MatrixExp[AMatr], {10}];
]

(* Test program 2 - Pure speed of one core *)
cc = Compile[{{x, _Real}, {n, _Integer}},
Module[{sum, inc}, sum = 1.0; inc = 1.0;

Do[inc = inc*x/i; sum = sum + inc, {i, n}]; sum],
CompilationTarget -> "C"];

TestProgram2 := Do[cc[1.6, 10000000], {100}]

(* Test program 2 - Parallelized operations *)
cP1 = Compile[{{x}},
Module[{sum = 1.0, inc = 1.0},
Do[inc = inc*x/i; sum = sum + inc, {i, 10000000}]; sum],
RuntimeAttributes -> {Listable}, Parallelization -> True,
CompilationTarget -> "C"];
arg = Table[ 1.6, {100}];

TestProgram3 := cP1[arg];

Note that (timing of TestProgram2 / timing of TestProgram3) = effective number of cores

EXECUTION

1) Execution by Mac Pro (Intel Xeon 2 x 4 core, 2.4 GHz)

TestProgram1 // AbsoluteTiming

{8.600441, Null} - Best MKL performance in threading

TestProgram2 // AbsoluteTiming

{13.93487, Null} - Slowest single-core speed

TestProgram3; // AbsoluteTiming

{1.229, Null} - Effective number of cores 11.4 that I do not understand


2) Execution by Lenovo laptop (Intel i7-QM2060, 2.2 GHz, Windows 7 64 bit)

TestProgram1 // AbsoluteTiming

{11.7116698, Null}

In[33]:= TestProgram2 // AbsoluteTiming

Out[33]= {10.5296023, Null}

In[34]:= TestProgram3; // AbsoluteTiming

Out[34]= {3.5562034, Null} - effective number of cores 3 that is plausible for a quad processor


3) Execution by iBuyPower PC (AMD FX "Bulldozer" 8 cores 3.6 GHz Linux Ubuntu 64 bit)

TestProgram1 // AbsoluteTiming

{14.650569, Null} - Poor MKL performance in threading

TestProgram2 // AbsoluteTiming

{4.049293, Null} - the fastest single core

TestProgram3; // AbsoluteTiming

{0.914659, Null} - effective number of cores 4 rather than 8

************************************************************

These results show that the slowest Intel Xeon processors of the Mac are the best coordinated. The AMD machine is just opposite to this. Note their close performance in TestProgram 3, in spite of the big price difference ($3500 Mac Pro vs $850 iBuyPower). For programs using self-written procedures compiled in C our AMD PC is quite competitive. The Lenovo laptop is a good allrounder in the middle between these two machines. "
 
Yet more evidence in favour of Intel, thanks. Barring some bolt from the blue showing me that my particular work prefers AMDs, I think it'll be Intel regardless of the price range, if I get any say over it. Xeons would be best, but impractically expensive, so an i7 of some description with hyperthreading is probably the best bet. If I manage to convince the powers that be to order from OcUK, I'll probably be limited to standard specs done on the 'Configurator', where the Ivy i7 spec seems to come out around £100 cheaper for reasons I don't quite see at the moment.
 
Yet more evidence in favour of Intel, thanks. Barring some bolt from the blue showing me that my particular work prefers AMDs, I think it'll be Intel regardless of the price range, if I get any say over it. Xeons would be best, but impractically expensive, so an i7 of some description with hyperthreading is probably the best bet. If I manage to convince the powers that be to order from OcUK, I'll probably be limited to standard specs done on the 'Configurator', where the Ivy i7 spec seems to come out around £100 cheaper for reasons I don't quite see at the moment.

A Xeon E3 1230 V2 is around £180. It is basically a lower clocked Core i7 3770 without the IGP.
 
Back
Top Bottom