Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

malloc(): Not enough space in some MiniZinc subsolvers

See original GitHub issue

solver: MiniZinc’s int, cp, lcg and chuffed subsolvers CPMpy: version v0.9.9 commit e79b3afedc934a9437c2ddb3a9f54d7e2d7bd3ee minizinc-python release version 0.7.0 commit {

While using CPMpy to model a problem and some Minzinc’s subsolvers to solve the problem, I found a malloc() error. This error is probably for, but after advise from Ignace I’m posting it here just to be sure. The amount of constraints are minimized, but the remaining constraints can probably still smaller.

from cpmpy import *

file = "almostMinimimal" # don't forget to unzip first
m = Model().from_file(file)
m.solve(solver="minizinc:lcg") # or int, cp, lcg, chuffed

bug found while working on my master thesis.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6

github_iconTop GitHub Comments

tiascommented, Nov 22, 2022

No, OK, then it is on our side, e.g.

x1 = intvar(0,5, name="x1")
c = cpm_array([1,2,5,7,13,21])[x1]
cc = flatten_constraint(abs(c) > 5)

should have IV1: 1…21 but it is -int…int and that is what you carry along in your mutations. That is the bug we should fix

rubenkindtcommented, Nov 22, 2022

The file above got created by taking a random (sub)solver and a random existing (solvable) problem executing 4 of the 40 created sat-preserving transformations on some (or all) the constraints,then test if the problem is still solve-able and extracting it if it failed via to_file. I did find some places where I take a random argument’s “.lb” without first checking if that argument had a “.lb”. So it could be that I set those values to gibberish assuming Python allowed it (normally Python would crash I think). Tomorrow I will search further to see if this is what happened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · CPMpy/cpmpy - GitHub
Cumulative: can not assume args are numpy array. #177 opened 4 days ago by tias ... malloc(): Not enough space in some MiniZinc...
Read more >
Why does malloc() fail when there is enough memory?
One reason might be that the allocated memory has to be contiguous. If there is no such large block available then the allocation...
Read more >
Solved: malloc() : not enough space - HPE Community
Hi, I am running HP-UX 11.0, and a malloc() call (in one of my C programs) returns an ENOMEM (out of memory messages)...
Read more >
problem not enough space - C Board
malloc :: Not enough space Process returned -1 (0xFFFFFFFF) execution time : 0.213 s Press any key to continue. Assuming a pointer and...
Read more >
Strange problem with malloc() - Code Composer Studio forum
malloc run well and return the first address of the allocated array. ... There simply isn't enough room to allocate 70000 or 50000...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found