matlab crashes out for funcs using math libs
Closed this issue · 4 comments
Hi Robert,
Testing matlab, works great for testfun.m
but if change to anything with sin
or exp
, it crashes out:
y = x(1).^2 + exp(x(2));
MATLAB: management.cpp:761: find: Assertion `find: no active context for type 'std::shared_ptr<InterruptStateData>'' failed.
MATLAB: management.cpp:761: find: Assertion `find: no active context for type 'std::shared_ptr<InterruptStateData>'' failed.
Aborted (core dumped)
Also wondering if uses vectorized calls, ie does the func have to handle arrays in some elementwise fashion?
(eventually that would be the fastest).
On to other interfaces!
Cheers, Alex
The function doesn't have to handle vectorized calls at all, since I'm fitting on a single call at a time (and I doubt I'll change that).
Interesting on the internal calls. That is very peculiar. I'm on it.
What I meant about vectorized is that when baozbi needs to query a p^dim block of func values at once, it would be faster to do that in a vectorized way (multiple pts in, multiple vals out).
But that's for later. Cheers, Alex
Right. The function to fit (the callback
) will never need to handle vector inputs. It's straightforward to add vectorized calls to baobzi, and that's already in the works.