Google Search
Login & Blog Feeds
Blogroll
Recent Comments
- Engineering, Control Systems and Statistics | Blog at ControlTheoryPro.com on Observations on Control System Modeling
- spradlig on MATLAB Pricing (Final Part in the Mathworks is behaving like Microsoft series)
- spradlig on MATLAB Pricing (Final Part in the Mathworks is behaving like Microsoft series)
- PointOnePA on MATLAB Pricing (Final Part in the Mathworks is behaving like Microsoft series)
- spradlig on Observations on Control System Modeling
Archives
- October 2009
- April 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
Categories
23rd November 2008
What finally worked
I have a quad core machine at my desk so I run multiple MATLAB windows. These multiple windows allowed me to test some distributed computing processes. As a result I set up a script for allowing the multiple windows to run. I was using Stateflow in the model which requires a compile before each run. As a result the model had to be run from a temporary directory.
This temporary directory was the first sign that the function, when distributed, is working. The second sign was when the output file is saved.
Long story short, the batch command worked. The batch command works but only with the PathDependencies and FileDependencies properties set. The function is something like this
jj = batch(‘monte_sim_loop’, ‘matlabpool’, 0, ‘PathDependencies’, {…}, ‘FileDependencies’, {…});
The matlabpool set to 0 is important. I tried to using a matlabpool of 3 for my initial runs. It tied up 4 nodes but only run 1 instance of the sim. Then I created a loop
for ii = 1:15
jj = batch(…
end
The reason that a matlabpool of 3 tied up 4 nodes was that the matlabpool property is for how many additional nodes you want running. It originally appeared to be an overhead function that was created. A coworker discovered the matlabpool command already assumes 1 node and so anything higher than 0 ties up that many extra PCs for the 1 job task. Since I just want my jobs distributed (not parallel) I set the property to 0. When I ran the loop above, 15 computers were tied up and 15 nodes worth of results were produced.
If you know more, please share
I invite anyone and everyone who knows more about how to use the Parallel Computing Toolbox to share. Use the comments to share. Or if you like I welcome guest bloggers.
Thanks