Deserialize error using parfor with Aspen Plus
Afficher commentaires plus anciens
Hi,
I am trying to parallelize external black-box simulations in Aspen Plus software through a .COM object using a parfor loop. I get a weird interface+number warning and a deserialize error. The exact same code with a regular "for" loop runs smoothly. Both Matlab and Aspen are 64-bit installations on a 64-bit windows 10 PC with 16 GB RAM, but Aspen is reported as 32-bit by Task Manager, so I suspect the problem can be related?
The code goes as following:
pool = gcp(); % Create or read parallel pool
parfor i=1:1
Aspen(i) = actxserver('Apwn.Document.36.0'); % Create COM.Apwn object
InitFromFile2(Aspen(i), ['C:\Users\a.penteado\Desktop\Aspen + Matlab\Parallel Test\Simulation' num2str(i) '.apw'], 1); % Open simulation file
Aspen(i).SuppressDialogs = 1; % Suppres dialogs = true
Aspen(i).Application.Tree.FindNode("\Data\Streams\FEED\Input\TEMP\MIXED").Value = 20*i; % Input value
Reinit(Aspen(i).Engine); % Reinitialize simulation
Run2(Aspen(i).Engine); % Run simulation
Q(i) = Aspen(i).Application.Tree.FindNode("\Data\Blocks\E-01\Output\QCALC").Value; % Output variable
end
Below the error messages, which are often printed multiple times:
Warning: Interface.8E567521_F9BA_11CF_90B2_0000C0A810C4 object could not be loaded.
> In parallel.internal.pool.deserialize (line 9)
In distcomp.remoteparfor/getCompleteIntervals (line 159)
In parallel_function>distributed_execution (line 820)
In parallel_function (line 587)
In runParallel (line 5)
Any help will be appreciated. Have a nice day!
Thank you,
Alberto
Réponses (1)
Dhinesh T
le 16 Avr 2018
0 votes
Hi, Did you solve the problem as I am in the same situation now? I look forward to hearing from you. Thank you Dhinesh
Catégories
En savoir plus sur Parallel Computing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!