terminate called after throwing an instance of 'std::bad_alloc'

304 views
Skip to first unread message

Alberto Manzini

unread,
Aug 29, 2022, 12:46:20 PM8/29/22
to or-tools-discuss
Hi everyone, I'm getting this message while solver is starting search for solutions (see  attached image).

The problem dimensions are like this one:
#Variables: 81727 (#bools:103 #ints:111 in objective)
- 80444 Booleans in [0,1]
- 269 different domains in [-3744,56590] with a largest complexity of 174.
- 330 constants in {-1,0,1,2,3,5,6,7,8,11,12,13, ... 68,3382,3408,3409,4276,4612,6292,6293,6294,6295}
#kBoolOr: 23 (#literals: 23)
#kInterval: 598 (#enforced: 267)
#kLinear1: 82691 (#enforced: 82398)
#kLinear2: 42128 (#enforced: 2605) (#complex_domain: 1044)
#kLinear3: 765 (#enforced: 281)
#kLinearN: 504 (#terms: 80045)
#kNoOverlap: 77 (#intervals: 306, #optional: 178, #variable_sizes: 152)
#kReservoir: 44

I'm using 8 workers for the solver search on a 16GB RAM machine.

Maybe I should use less workers in order to avoid this memory error?
Thanks,
Alberto
bad_alloc.png

Laurent Perron

unread,
Aug 29, 2022, 1:07:00 PM8/29/22
to or-tools-discuss
Yes. Try 8.

--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/14494939-3b4f-4885-a93e-f0fb9a45a136n%40googlegroups.com.

Alberto Manzini

unread,
Aug 30, 2022, 3:32:54 AM8/30/22
to or-tools-discuss
Sorry, you mean 8 workers? Because I'm already using that configuration

I'm using 8 workers for the solver search on a 16GB RAM machine.

Laurent Perron

unread,
Aug 30, 2022, 3:57:49 AM8/30/22
to or-tools-discuss
:-)

Below 8 workers, the performance degrades a lot.

I wonder why you have negative value in your domains. Is this for past fixed events ?
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



Alberto Manzini

unread,
Aug 30, 2022, 9:34:54 AM8/30/22
to or-tools-discuss
Because some of the variables are used to linearize the decomposition of an expression in its positive and negative component ( f+ = max(f, 0), f- = min(f, 0) )

Why are you asking this? It's somehow better to have only positive domains?
Thanks,
Alberto

Laurent Perron

unread,
Aug 30, 2022, 9:37:07 AM8/30/22
to or-tools-discuss
No, that was surprising in a scheduling model.

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Reply all
Reply to author
Forward
0 new messages