CPU allocated to Matlab is bounded at 25% for entering code, with or without parallel computing on

2 Ansichten (letzte 30 Tage)
Hello,
Has anyone come across a method for increasing Matlab CPU usage to 100% instead of being bounded at 25%, for writing code instead of computing. When I am fixing an error for this script and replacing one line with a few others, it takes about 10 minutes for it to do it, regardless of how many changes have to be made in the script. Running parallel computing doesn't change that fact (though I would be surprised if it could). Sometimes the code I have to replace could be as large as half a page in a quite a few places (which word and notepad cannot do), so manually copying and pasting could waste as much as a full day.I am rather new to Matlab, as I only started using this 4 months ago, so any help will be welcome.
Thanks

Akzeptierte Antwort

per isakson
per isakson am 21 Feb. 2015
Bearbeitet: per isakson am 22 Feb. 2015
  • Standard Matlab is single threaded, but there are functions which run in parallel.
  • There is the Parallel Toolbox
  • One may run several sessions in parallel. Edit and debug in one and do production runs in others. Requires some care with the search path so that one doesn't make changes in files, which are used in the production runs.
  • Your description, "code I have to replace could be as large as half a page in a quite a few places" makes me wonder ...
  • "notepad cannot do" &nbsp the free Notepad++ can, I'm sure. It even highlights some Matlab syntax.
  2 Kommentare
Arthur
Arthur am 22 Feb. 2015
Didn't know one could run multiple Matlabs(it never occurred to try that), or that such a Notepad existed. Really useful to know, that will save me a lot of time spent waiting.
As for what I am doing, I am creating an Dynamic Computable General Equilibrium (DCGE), an economic model, which is somewhat complex (26 industries), which is why this is rather huge, as some variables for a function fit half a page.
Funny enough, since having sent this question, the CPU usage finally broke through that 25% limit, it managed to hit around 60%(for single seesion) when adding something to the script, really have no idea why it does that now compared to before. So, I guess it is no longer single thread bound.
All the same, thanks for the help.
per isakson
per isakson am 23 Feb. 2015
I chose to believe that my "but there are functions which run in parallel" explains why you seen "60%", e.g. BLAS.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by