Parallel Computing: dot name reference
5 次查看(过去 30 天)
显示 更早的评论
Hello,
I’m running an optimization in Matlab evealuating a Comsol model through Livelink. I use the UseParallel option for parallel computing. For a number of generations everything runs fine, then I get the following error.
error: Dot name reference on non-scalar structure.
Error in C:\Program Files\COMSOL\COMSOL43b\mli\mphload.p>mphload (line 104)
Error in compute_fitness (line 16)
model=mphload([cd '\Output',num2str(workerNo),'\',model_,num2str(workerNo),'.mph'],['M' num2str(workerNo)]);
Error in foptim14 (line 12)
f=compute_fitness(para_n,workerNo);
Error in set_ga_options>@(para)foptim14(para,scale_factor,setup_date) (line 4)
gaproblem.fitnessfcn=@(para)foptim14(para,scale_factor,setup_date);
Error in createAnonymousFcn>@(x)fcn(x,FcnArgs{:}) (line 11)
fcn_handle = @(x) fcn(x,FcnArgs{:});
Error in fcnvectorizer>(parfor body) (line 18)
y(i,:) = feval(fun,(pop(i,:)));
Error in parallel_function>make_general_channel/channel_general (line 891)
O = F(C{:});
Error in remoteParallelFunction (line 28)
out = parallel.internal.pool.serialize(feval(channel, channelArgs{:}));
Has anybody got an idea what could cause this sudden error? I am a bit confused because it works perfectly up to a certain point.
0 个评论
回答(1 个)
Pouya Jamali
2014-1-26
Considering the error sequence, I think it is reproduced owing to your COMSOL model. Maybe this happens because of convergence issues or even bugs in Livelink. In the case of convergence and simulation issues you need to be careful about the parameter values you supply to the model as they may cause simulation faults when inappropriate. A primary test is to grab the parameters at the iteration, which reports the error, and then check your COMSOL model manually with those parameters to see if it runs. After this check up, a suggested quick workaround would be restricting optimization parameters to a certain boundary, according to the mental understanding of the system's physical behavior.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!