Trying to get executable to use other computer's multiple cores with matlabpool, but getting error
2 ビュー (過去 30 日間)
古いコメントを表示
Using Matlab 2011a on a winXP 32 bit machine with 2 cores, I have a program I turned into an executable using Matlab Compiler that I want to run on another windows7, 64 bit, quad core computer. Here's the simplified version...
clear all
close all
matlabpool open 2
currdir = cd;
imDir = [cd '\0625_15\'];
parfor ii = 1:8
%%process code %%
end
y = toc;
matlabpool close
I've installed the MRC on the new machine and have also tried, with success, using 1 processor in the code (ie. not using matlabpool). Using 1 core in the executable runs fine on the new machine.
When the executable runs on the newer machine with "matlabpool open 2", I get an error saying...
Starting matlabpool using the 'localconfig-hyperthread' configuration ... connected to 2 labs
??? The class "distcomp.remoteparfor" is undefined
How can I get the code to run and take advantage of the multiple cores of the newer machine? Do I need to include the local scheduler configuration file? If so, how do I do this exactly?
0 件のコメント
採用された回答
James
2012 年 1 月 25 日
1 件のコメント
Walter Roberson
2012 年 1 月 25 日
Dang, I never think to look for this because I assume people already know that. The compiler does not handle scripts.
その他の回答 (2 件)
Walter Roberson
2012 年 1 月 20 日
Yes, you should be using the local scheduler, and there are some other steps you should look at. Please see http://www.mathworks.com/matlabcentral/answers/26472-how-to-define-local-matlabpool-size-at-runtime-for-parallel-computing-toolbox-use-in-compiled-matl
4 件のコメント
Walter Roberson
2012 年 1 月 21 日
You should be changing the "matlabpool open 2" to "matlabpool" or "matlabpool open".
Note also in the documentation "Note A compiled application should set mcruserdata ParallelConfigurationFile before calling any Parallel Computing Toolbox™ code."
It appears to me from the discussion in that other thread and the documentation pointed to, that the cluster vs non-cluster is not important for this purpose.
Regrettably, standing on the downtown corners, holding out a hat, and asking, "Spare Parallel Computing Toolbox?" has only netted me two bus tickets, a used comb, half a submarine sandwich, and 43 cents in change, so I cannot test these matters myself.
参考
カテゴリ
Help Center および File 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!