You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, it is rather difficult to do in a completely general way, because Opt contains a pointer to a C struct that itself contains pointers to C structs as well as C function pointers.
It would be better to serialize the parameters you used to create the Opt object, and then just create a new one.
Thanks @stevengj. I created a type called NLoptimizer holding some parameters that are passed to Opt and a convert function that maps NLoptimizer ojbects to Opt objects. This workaround allows me to use NLopt in parallel. If you think that this could be useful to other users too, I could open a pull request. Here is the code:
@stevenj is it easy to write a
serialize
function forOpt
type objects? I need it when I run some functions in parallel. See also this Julia issue:JuliaLang/julia#5954 (comment)
The text was updated successfully, but these errors were encountered: