Parallel Computing: dot name reference

5 visualizzazioni (ultimi 30 giorni)
PJ
PJ il 25 Gen 2014
Commentato: PJ il 26 Gen 2014
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.

Risposte (1)

Pouya Jamali
Pouya Jamali il 26 Gen 2014
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.
  1 Commento
PJ
PJ il 26 Gen 2014
This was also my first approach. However the parameters giving the error cmpute fine in Comsol GUI. It seems to me that from a certain point onwards the conection via Livelink does not work correctly anymore. For example, the optimization works fine for 3 generations, then the error occurs, and the best fitness value found until then gives an error as well. I suppose it is due to the Comsol model object which does not work correctly with the parallel approach...

Accedi per commentare.

Categorie

Scopri di più su Get Started with Optimization Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by