Paralell execution of COM instances
1 次查看(过去 30 天)
显示 更早的评论
Hello!
I'm just trying to improve our test environment with the Paralell Toolbox; however I face a problem with starting several instances of Matlab by COM objects. So what I try to do basically is calling the function
function testpar
ML=ver('Matlab');
ML_Path=matlabroot;
ML_Ver=ML.Version;
res = [];
tic
parfor i=1:3
NewMatlab = actxserver(['matlab.application.single.',ML_Ver]);
Answer = NewMatlab.Feval('test',1);
res(i) = Answer{1};
NewMatlab.Quit;
NewMatlab.release;
end
disp(toc)
end
where the function "test" is simply
function a = test
a = 10;
for i = 1:10
a = a + i;
end
end
Unfortunately it seems to me that instead of opening three instances of Matlab in paralell the instances are called sequentially.
Is there any possibility to call the COM instances paralell?
Thanks a lot!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!