Matlab and Hyperthreading/Dual cores

  • MATLAB
  • Thread starter 600burger
  • Start date
  • Tags
    Matlab
In summary, HT is an early imitation of dual core. MATLAB does not take the same hit from dual core processors as other applications.
  • #1
600burger
64
0
I recently noticed while crunching some CFD numbers in Matlab that only 50% of my HT processor is being used. I understand basicly that HT is an early imitation of dual core. I assume if i turn off HT i will regain my lost cycles.

My question is regarding an invedible upgrade to my rig, which in this day and age most likely means dual core. Does MATLAB take the same "hit" from dual core?

-Thanks!
 
Physics news on Phys.org
  • #2
600burger said:
I recently noticed while crunching some CFD numbers in Matlab that only 50% of my HT processor is being used. I understand basicly that HT is an early imitation of dual core. I assume if i turn off HT i will regain my lost cycles.
No cycles are lost. A dual core processor and hyperthreading are two different things.

600burger said:
My question is regarding an invedible upgrade to my rig, which in this day and age most likely means dual core. Does MATLAB take the same "hit" from dual core?
Matlab was not designed as a multi/threaded application, which I think is rather embarrasing. Version R2007a seems to allow some multiple threads but I am not sure if this was some kind of a hack or an elegant redesign. Note that just because an application is called multi threaded that does not mean it´s throughput increases linearly with multiple cores. Every application can be made multi threaded with tons of synchronization locks which in the end can even make it slower instead of faster.

I found a document that gives a summary http://www.mathworks.com/support/solutions/data/1-372IPG.html?1-372IPG"
 
Last edited by a moderator:
  • #3
A hyperthreaded processor has two execution contexts (i.e. it appears to the outside world to have "two processors") yet has only one processor's worth of function units. In other words, when one context is using part of the chip -- say, an adder -- the other context cannot.

In certain kinds of situations, when you're running two programs which do very different things, there may not be much competition for function units, and your programs may well run much faster.

On the other hand, when you're running a single thread on a single context, or running two programs which need the same function units, you will not see any improvement at all.

- Warren
 

FAQ: Matlab and Hyperthreading/Dual cores

1. What is Matlab?

Matlab is a high-level programming language and interactive environment commonly used for scientific and engineering applications. It allows users to perform data analysis, visualization, and numerical computations.

2. What is hyperthreading?

Hyperthreading is a technology found in processors that allows a single physical core to behave like two virtual cores. This can improve CPU performance by allowing multiple threads to be executed simultaneously.

3. What are dual cores?

Dual cores refer to processors that have two physical cores on a single chip. This means that the processor can handle two sets of instructions simultaneously, improving overall performance compared to a single-core processor.

4. Can Matlab take advantage of hyperthreading and dual cores?

Yes, Matlab is able to utilize both hyperthreading and dual cores to improve performance. However, the extent to which it can benefit from these technologies depends on the specific tasks and algorithms being executed.

5. How can I optimize Matlab for hyperthreading and dual cores?

To optimize Matlab for hyperthreading and dual cores, you can use the "maxNumCompThreads" function to specify the maximum number of threads to use for multithreaded computations. You can also use the "parfor" function to parallelize for loops and distribute tasks across multiple cores.

Back
Top