Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running @spawn solve(m) gives an stack overflow #514

Closed
h3nnn4n opened this issue Aug 7, 2015 · 4 comments
Closed

Running @spawn solve(m) gives an stack overflow #514

h3nnn4n opened this issue Aug 7, 2015 · 4 comments

Comments

@h3nnn4n
Copy link

h3nnn4n commented Aug 7, 2015

When running @Spawn solve(m) on the code below a stack overflow is given.

using JuMP

m = Model()
@defVar(m, 0 <= x <= 2 )
@defVar(m, 0 <= y <= 30 )

@setObjective(m, Max, 5x + 3*y )
@addConstraint(m, 1x + 5y <= 3.0 )

ref = @spawn solve(m)

The error:

ERROR: stack overflow
 in resize! at ./array.jl:506
 in ensureroom at ./iobuffer.jl:182
 in write at ./iobuffer.jl:267
 in serialize at serialize.jl:89
 in serialize_type_data at serialize.jl:271
 in serialize at serialize.jl:289
 in serialize at serialize.jl:78
 in serialize_type_data at serialize.jl:278
 in serialize_type at serialize.jl:299
 in serialize at serialize.jl:318
 in serialize at serialize.jl:324 (repeats 3 times)
...
 in serialize at serialize.jl:134
 in serialize at serialize.jl:324 (repeats 4 times)
 in serialize at serialize.jl:134
 in serialize at serialize.jl:324 (repeats 3 times)
 in serialize at serialize.jl:78
 in serialize at serialize.jl:218
 in send_msg_ at multi.jl:172
 in remotecall at multi.jl:686
 in remotecall at multi.jl:690
 in spawn_somewhere at multi.jl:1276
 in include at ./boot.jl:245
 in include_from_node1 at loading.jl:128
 in process_options at ./client.jl:285
 in _start at ./client.jl:354
while loading /homenis/renan/julia_bnb/new/bnb.jl, in expression starting on line 10
WARNING: Forcibly interrupting busy workers
WARNING: Unable to terminate all workers

The only way around I found so far is to create the model on the worker where it will run, returning the model to work on later ends up on the same problem as above.

@mlubin
Copy link
Member

mlubin commented Aug 7, 2015

JuMP models aren't serializable across julia processes. Even if they were, it wouldn't be the most compact or efficient way to transfer a problem instance.

@h3nnn4n
Copy link
Author

h3nnn4n commented Aug 10, 2015

So I cant @async solve on a couple of models?

@mlubin
Copy link
Member

mlubin commented Aug 10, 2015

Currently no. Leaving open as a feature request.
If you'd like to take a stab at getting this working, we're happy to help out. I'm not entirely sure what the major technical challenges are.

@mlubin
Copy link
Member

mlubin commented Jan 3, 2017

Just tested on Julia 0.5, and this example now works. There are still open issues with using JuMP within parallel code, however (#673).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants