Invalid MEX-file error
5 views (last 30 days)
Show older comments
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 Comments
Answers (1)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!