필터 지우기
필터 지우기

parrallel computation,4-core machine

조회 수: 1 (최근 30일)
ahmad
ahmad 2012년 5월 22일
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.

채택된 답변

Jason Ross
Jason Ross 2012년 5월 24일
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
Jason Ross
Jason Ross 2012년 5월 29일
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 2012년 7월 20일
Accepted by Binish..

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Thomas
Thomas 2012년 5월 22일
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
ahmad
ahmad 2012년 5월 24일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by