How to use the full CPU-power at a workstation?

4 Ansichten (letzte 30 Tage)
Kilian
Kilian am 16 Apr. 2012
Dear Matlab-Community,
I try to solve 3-dimensional partial differential equations with the help of a finite integration technique. To solve the discrete system I have to add large data-fields, multiply them elementwise or divide by a scalar. I work at a HP Z800 workstation with 48 GB RAM and with two Intel Xeon X5690 @ 3.47 GHz (together 12 cores and 24 threads). The Matlab-version is R2012a and the OS is a 64bit Windows Enterprise edition.
A realistic model of a pipeline needs 43 millions cells and about 18 GB RAM but in the end MATLAB uses only 6 % of the CPU-power. In a lot of Matlab-forums and the Matlab-help I found the hint, that Matlab supports by default multithreading computation but in my opinion 6% aren't an effective multithreading computation.
Please help and tell me, how to speed up the addition or the multiplication of 3-dimensional data-fields. How can I use the full CPU-power?
Thanks and best regards, Kilian
PS: Also the Parallel Computing Toolbox is installed, but to solve the functions in parallel, I have to copy the workspace which is too large with 18 GB.

Antworten (2)

Jason Ross
Jason Ross am 16 Apr. 2012
Before beginning any sort of optimization effort, have you profiled your code to know where the slow parts are?
I'd also suggest posting the slow code sections.
Also, keep in mind that memory and network can also be portions of the system that can slow execution. In your case, it doesn't sound like RAM should be much of a barrier, but if you are pulling a large data file up and processing it (especially from a network), that may take processing time.

Kilian
Kilian am 19 Apr. 2012
Hello Jason!
Thanks for your answer. I have profiled my code step by step and found my problem.
I use logical arrays to find the cells I have to update, e.g.
A(indices) = B(indices).*C(indices) + ...
A,B and C are 3-dimensional arrays and 'indices' is a logical 3-dimensional array.
This way is very slow. Now I use vectors A_indices = A(indices) and calculate
A_indices = B_indices.*C_indices + ...
Best regards
Kilian

Kategorien

Mehr zu Performance and Memory finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by