MATLAB Answers

0

Invalid MEX-file error

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

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: Chidvi Modala 2019 年 10 月 10 日

  0 件のコメント

サインイン to comment.



Translated by