Mac Pro configuration for numerical computing with Matlab

Discussion in 'Mac Pro' started by msvadi, May 12, 2014.

  1. msvadi macrumors regular

    Joined:
    Aug 12, 2010
    #1
    Hi,

    I'm planning to buy a Mac Pro for running (statistical) Monte Carlo simulations with Matlab. My programs can be easily parallelized, so I would like to have more cores. At the same time, since the processor speed drops with the number of cores, I wonder if a 8-core or even 6-core machine would be more efficient than 12 cores. Does anyone here uses Mac Pros for similar purposes? What do you think the optimal number of cores is?

    Another question: do you think it makes sense for me to go with a more powerful GPU (D700 instead of D500)? I have not tried yet GPU computing with Matlab, so I'm not sure if it's worth it.

    Thanks
     
  2. Earl Urly macrumors regular

    Joined:
    Jul 11, 2004
    #2
  3. msvadi thread starter macrumors regular

    Joined:
    Aug 12, 2010
    #3
    I see, thanks. I'll forget about GPU computing for now.
     
  4. itsmrjon macrumors regular

    Joined:
    Jun 11, 2011
    Location:
    Chicago
    #4
    If you want a real speedup move away from Matlab all together.

    Since MC algorithms are embarrassingly parallel you can get linear or even possibly superlinear speedup if you know what you are doing. So assuming you are that good at your implementation, speedup will be on the order of clock*cores, meaning you should have as many cores as possible.

    Now, onto the grittier details... you need to efficiently and effectively generate random numbers across as many cores as possible, this is where you are going to see the penalty, unless you use a very good RNG library. I strongly recommend using SPRNG (http://www.sprng.org/) if you want to see that linear speedup.

    But this brings me back to my original point... if you want to use a good parallel random number generation library AND see good speedups, you'll have to move away from matlab, regardless of whether you buy a mac pro or not.

    --------
    topic 2: GPU

    MC algorithms are amazing on the mac pro GPU. I actually just wrote one for pricing american options using PyOpenCL, speedup was ~50x over using 8 cores on the d500s. But once again, Matlab uses CUDA not OpenCL, so you'll need to switch programming languages.

    My serious recommendation, look into Python with Numpy. It can do array like expressions similar to matlab, it is faster, and it is more extensible. You can also use the PyOpenCL package for writing code that will execute on the GPUs (http://mathema.tician.de/software/pyopencl).
     
  5. msvadi thread starter macrumors regular

    Joined:
    Aug 12, 2010
    #5
    Thanks, itsmrjon, this is helpful and very intriguing. I've heard already many good things about python/numpy, and it's certainly on my list of things to learn.
     

Share This Page