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 CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by