decyphir / breach

Other
51 stars 19 forks source link

Invalid MEX-file #9

Open hongkaichensbu opened 2 years ago

hongkaichensbu commented 2 years ago

To Run the tutorial in the Readme file, I got a dependency error when running

Rphi.Eval(Bdata)

Invalid MEX-file 'C:\Users\test\breach\@STL_Formula\private\RobustEv.mexw64': The specified module could not be found.

Error in STL_Formula/STL_EvalThom_Gen>GetValues (line 306) [time_values, valarray] = RobustEv(time_values, -valarray, I___);

Error in STL_Formula/STL_EvalThom_Gen>GetValues (line 216) [valarray1, time_values1] = GetValues(Sys, phi.phi1, P, traj, partition, relabs, interval);

Error in STL_Formula/STL_EvalThom_Gen (line 100) [val, time_values] = GetValues(Sys, phi, Pii, traj, partition, relabs, interval);

Error in STL_Formula/STL_Eval_IO (line 90) [val, tau] = STL_EvalThom_Gen(Sys, phi, P, trajs, partition, relabs, taus);

Error in stl_monitor/get_standard_rob (line 260) [rob, time] = STL_Eval_IO(this.Sys, phi, this.P0, this.P.traj{1}, this.inout, this.relabs, time);

Error in stl_monitor/computeSignals (line 95) [time, Xout] = this.get_standard_rob(this.formula, 0);

Error in stl_monitor/eval (line 99) [t, Xout] = this.computeSignals(t, X,p);

Error in BreachRequirement/evalRequirement (line 1351) [val, time, Xout] = req.eval(time, Xin, pin);

Error in BreachRequirement/eval_req (line 1338) [val, ~, ~, val_vac] = this.evalRequirement(req, time, Xin, p_in);

Error in BreachRequirement/evalAllTraces (line 284) traces_vals_vac(it, ipre)] = eval_req(this,req,it);

Error in BreachRequirement/Eval (line 240) [traces_vals, traces_vals_precond, traces_vals_vac] = this.evalAllTraces(varargin{:});

Error in demo1 (line 13) Rphi.Eval(Bdata)

I am wondering if there is a quick fix to it?

Matlab version: 2021a and 2021b OS: Windows 10

adonze commented 2 years ago

Sounds like you'll have to recompile the binaries. This happens sometimes, not sure yet when and why. For this, make sure you have a C++ compiler setup for matlab (try mex -setup). MinGW-w64 should work. Then run InstallBreach from Breach main folder.

If everythings (compilation) goes well, you can try again the Eval call.

hongkaichensbu commented 2 years ago

Hi Alex,

I downloaded the latest MinGW-w64 from Matlab Add-on and recompiled it. Everything goes well now.

I also tried another computer before this. It went well too.

Thanks.