Invalid MEX-file error

4 ビュー (過去 30 日間)
Buse Ebrem Bilgin
Buse Ebrem Bilgin 2019 年 10 月 7 日
回答済み: Chidvi Modala 2019 年 10 月 10 日
Hi,
I'm trying to use Genetic Algorithm in a parallel way with an external software (Lumerical FDTD solver). I checked the blog, and updated my code; you can see it below:
spmd // I include this part according to the previous answers about the same topic
mkdir(sprintf('worker%d', labindex));
copyfile('3D_sym.fsp',sprintf('worker%d/',labindex)); // my sim. file
cd(sprintf('worker%d', labindex));
end
funcao = @(ch) symmetric_3d(ch);
options = optimoptions('ga','MaxGenerations',20,'PopulationType','bitstring','PopulationSize',10,'UseParallel',true); % sets PARALLEL
LB = [];
UB = [];
ch = ga(funcao,9,[],[],[],[],LB,UB,[],options);
%Objective function
function y = symmetric_3d(ch)
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');
sim_file_path=('C:\Users\Buse\Documents\LumericalMatlab\Paper sim\4-fold symmetry'); % update this path to user's folder
sim_file_name=('3D_sym.fsp');
h=appopen('fdtd'); // This is where I am taking the error
appputvar(h,'sim_file_path',sim_file_path);
appputvar(h,'sim_file_name',sim_file_name);
.
.
.
end
After the workers start to work, I'm taking the error of
Invalid MEX-file
‘C:\Users\Buse\AppData\Local\Temp\tp99cfa8cc_5cfe_47b2_85c0_a22c630f3610rp5300\a\tp63e4ed59_c57d_469d_b137_1605eaa753ca\appopen.mexw64’:
Missing dependent shared libraries:
matlab-interop.dll’ required by
‘C:\Users\Buse\AppData\Local\Temp\tp99cfa8cc_5cfe_47b2_85c0_a22c630f3610rp5300\a\tp63e4ed59_c57d_469d_b137_1605eaa753ca\appopen.mexw64’.
I couldn't file anything about this ddl file. How can I fix this error?
Regards

回答 (1 件)

Chidvi Modala
Chidvi Modala 2019 年 10 月 10 日

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by