octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59597] bogus result returned by mexCallMATLAB


From: Sébastien Villemot
Subject: [Octave-bug-tracker] [bug #59597] bogus result returned by mexCallMATLAB
Date: Wed, 9 Dec 2020 05:57:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #22, bug #59597 (project octave):


[comment #21 commentaire #21 :]
> In DynamicModelCaller using only dlopen/LoadLibrary to load a mex function
may not work. Each mex function requires its own workspace/context to manage
its memory. The function 'call_mex' in 'libinterp/corefcn/mex.cc' shows how
the mex_context (memory manager) works. Instead of loading mex by dlopen
calling the mex by its name and letting Octave to properly find and call the
function I think is a better option. 'addpath' may be needed to help the
interpreter to find the function.

When using dlopen(), we indeed load a MEX but we actually do not run the
mexFunction(), we only run other subfunctions that do not give back control to
Octave. So your point is moot.

Please remember that this MEX works fine with MATLAB (all versions from R2009b
to R2020b), and has worked fine with all versions of Octave before 6.1.0. I
consider it unlikely that the problem comes from a design issue in this MEX.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59597>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]