Borrar filtros
Borrar filtros

parrallel computation,4-core machine

1 visualización (últimos 30 días)
ahmad
ahmad el 22 de Mayo de 2012
I have got an Intel-4core machine recently ,R2011a installed on it.but,I still don't believe that I am using all of my machine's computation ability.actually I couldn't find any multi-threading option in preferences and when I run BENCH command I get a fast and reasonable response but when I run my program it gets sort of same time as my laptop.

Respuesta aceptada

Jason Ross
Jason Ross el 24 de Mayo de 2012
Things to know about performance of code:
  1. You need to know how many cores you really have. If you have a machine with "hyper-threading", you can have two actual cores, but they appear to the OS as four. Therefore, it's possible to have something like a Core2Duo in your laptop and a 2-core processor in your desktop, and have the same number of cores. Look up the spec sheet for your processor to find out.
  2. Parallel execution can be implicit or explicit. Some MATLAB functions are multithreaded, and will automatically take advantage. Others are not. Other functions (in combination with the Parallel Computing Toolbox) will take advantage of multiple cores, but you must change your code to use parallel computing constructs (parfor, spmd, etc)
  3. The most valuable thing you can do to search for speedup is to use the profiler to see what's taking up the most time in your code. Otherwise it's just guesswork and pre-optimization. It's possible that you are waiting on something like disk I/O to read a file and parse it, or there is some other bit of code that's written inefficiently, or you aren't preallocating, you could vectorize, etc.
  3 comentarios
Jason Ross
Jason Ross el 29 de Mayo de 2012
If you've identified the slow section of code, I'd suggest you start a new question that asks "is there a way to increase the performance of this operation" and post the part that's slow. There have been many such questions asked where meaningful results came out -- but people have to be able to see the code.
Thomas
Thomas el 20 de Jul. de 2012
Accepted by Binish..

Iniciar sesión para comentar.

Más respuestas (1)

Thomas
Thomas el 22 de Mayo de 2012
I do not think bench command is not parallelized.
To make use of all the cores you need the Parallel computing toolbox and you need to parallelize your code (If it can be parallelized..) to actually see a speed up..
see
  1 comentario
ahmad
ahmad el 24 de Mayo de 2012
I think that even without parallelizing my code I should get a faster response from my machine just because it has a 12GB memory and 6 cores of 3.2GHz processors.since I am using MATLAB R2011a, I don't find any option to see whether my MATLAB sees all of my cores when it is running the code or not?

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by