Which solver/model library can be used recursively / reentrantly

Hello, my code currently consists of a recursive function f and I am planning on using an optimization solver (global optimization for integer programming with binary variables) for solving a sub-problem of the function f.

Because the function is recursive in nature and also designed so that it is expected to be run concurrently multiple-times independently by separate thraeds, my question is whether it is possible to use a solver inside that function and if then what library would you recommend.

The actual implementation consist of f that has inside a minimalization of recursively called f (which contains other minimalization problem in itself). It is not very deep recursion and the minimalization acts only on not-too-many variables. I’ve read somewhere that e.g. GLPK does not support re-entrancy so is there any way in Julia to do this?

Hi there! Since this is your first time posting, take a moment to read to suggestions at: Please read: make it easier to help you

In particular, it’s easier to provide an answer if you can make your question more concrete, e.g., by supplying a minimal example of the code you have tried, or an implementation of a toy model.

You can also use the search feature of discourse to look for similar questions.

For example, there might be some issues with @theads and the solvers:

There is also this post on StackOverflow:

1 Like

Thank you for your help and time. I figured out there is a way how to rewrite it differently and more easily which makes this question pointless.