Message Boards Message Boards

0
|
9823 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

More Memory, More Speed?

Posted 9 years ago

Greetings,

I'm repeatedly running a program that takes hours to complete. Will more RAM speed up the process? I've 8GB with an Intel Core i7 @ 3.6GHz under Windows 7 (64 bit).

Best,

Dean Sparrow

POSTED BY: Dean Sparrow
5 Replies

Sorry, Jay. No improvements yet. I wish I knew more about parallel computing. For example, does it work automatically or must I "kick-start" it somehow?

POSTED BY: Dean Sparrow

Hi Dean, The faster code workshop indicated that using built-in functions and using real numbers (with decimal points) produces faster running programs. This is not considered parallel processing generally. Check your Parallel Kernel Preferences -> Local Kernels to see that the number of local kernels matches the expected number of cores for your processor. Verify that they are working by looking at the Parallel Kernel Status (bottom right button under the Parallel Kernel Configuration box).

If there are other computers running Mathematica, you can try and set up a lightweight grid to share the load (Parallel Kernel Preferences -> Lightweight Grid) See http://bit.ly/1KlvxmM for more info. Next you could uses remote Kernels on the Wolfram servers if you have the license for it (Parallel Kernel Preferences -> Remote Kernels). The approach throws more kernels at the problem without having to optimize code as much.

If you want to use CUDA, then I don't think "automatically" is the right word. Mathematica programs have to include CUDA functions to take advantage of the parallel processing in your GPU. Your NVIDIA graphics card drivers need to support support CUDA. The following Mathematica functions can be used to check that CUDA is available and ready to use.

Needs["CUDALink`"]
CUDAQ[]
CUDAInformation[];
TabView[Table[ii -> Grid[Replace[#, Rule[x_, y_] -> {x, y}] & /@ CUDAInformation[ii], Frame -> All], {ii, 1, $CUDADeviceCount}]]
CUDADriverVersion[] 
CUDAResourcesInformation[]
SystemInformation[]

Then use to CUDA tutorial to learn to rewrite your code to use the graphics card GPU ( http:bit.ly/1Oka6GO ).

POSTED BY: Jay Morreale

Thanks. The task manager shows 4GB memory used, so I'll try your other suggestions.

POSTED BY: Dean Sparrow

Hi Dean, Would you let me know which suggestion provides the most improvement?

POSTED BY: Jay Morreale

Hi Dean, When your program is running, how much memory is being used as reported by the task manager? If the program doesn't use a significant percentage of memory then probably not. You can try running the Intel Linpack ( http://intel.ly/1YcxyJd ) and Mathematica benchmark (see code below) tests to tune the performance of the computer (increase swap space for example).

The Write Faster Code with Wolfram Language Virtual Workshop 2014 might be more helpful in showing ways to speed your code ( http://bit.ly/1Mc3Ddy ). Also, you might use your graphics card to speed up code with the CUDA features of Mathematica ( http://bit.ly/1gr9EHL ). Depending on your license, you may be able to use some virtual processors (see the Wolfram parallel computing guide http://bit.ly/1iwsiAd ).

If you have the budget, really need speed, and your program is compatible, Check out the NVIDIA accelerators K20, K40, and K80 ( http://bit.ly/1QGf3Id ). They're really neat but expensive. Also, Intel is offering a developers special on the Xeon Phi 31S1P ( intel.ly/1OZ4pLE ). it is on sale at Amazon for $225 (amzn.to/1KgRm4L ). It's rated at 1TFLOP at 270 W TDP. Make sure your motherboard and power supply are compatible with it. You'll also need investigate how to get Mathematica to talk to it through perhaps through MPSS or OpenCL.

Mathematica benchmarking

Needs["Benchmarking`"]

Benchmark[]
POSTED BY: Jay Morreale
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract