{"action":"created","issue":{"url":"https://api.github.com/repos/eomahony/Numberjack/issues/23","labels_url":"https://api.github.com/repos/eomahony/Numberjack/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/eomahony/Numberjack/issues/23/comments","events_url":"https://api.github.com/repos/eomahony/Numberjack/issues/23/events","html_url":"https://github.com/eomahony/Numberjack/issues/23","id":103497207,"number":23,"title":"Mistral2 causes Segmentation fault: 11","user":{"login":"pthedinger","id":3942805,"avatar_url":"https://avatars.githubusercontent.com/u/3942805?v=3","gravatar_id":"","url":"https://api.github.com/users/pthedinger","html_url":"https://github.com/pthedinger","followers_url":"https://api.github.com/users/pthedinger/followers","following_url":"https://api.github.com/users/pthedinger/following{/other_user}","gists_url":"https://api.github.com/users/pthedinger/gists{/gist_id}","starred_url":"https://api.github.com/users/pthedinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pthedinger/subscriptions","organizations_url":"https://api.github.com/users/pthedinger/orgs","repos_url":"https://api.github.com/users/pthedinger/repos","events_url":"https://api.github.com/users/pthedinger/events{/privacy}","received_events_url":"https://api.github.com/users/pthedinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-27T12:27:58Z","updated_at":"2015-08-27T13:04:50Z","closed_at":null,"body":"Running the following on my MacBook results in a segfault:\r\n\r\n    from Numberjack import *\r\n\r\n    N = 1000\r\n    variables = {}\r\n    for x in range(2):\r\n        variable = Variable(N)\r\n        variables[x] = variable\r\n\r\n    model = Model( Minimise( max(variables.values()) ))\r\n\r\n    model.add(variables[0] + 2 <= variables[1])\r\n    model.add((variables[0] < 5) | (variables[0] > 9))\r\n\r\n    solver = model.load('Mistral2')\r\n    solver.setVerbosity(0)\r\n    solved = solver.solve()\r\n\r\n    print solved\r\n    for name in sorted(variables.keys()):\r\n        variable = variables[name]\r\n        print \"{}: {}\".format(name, variable.get_value())\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eomahony/Numberjack/issues/comments/135418372","html_url":"https://github.com/eomahony/Numberjack/issues/23#issuecomment-135418372","issue_url":"https://api.github.com/repos/eomahony/Numberjack/issues/23","id":135418372,"user":{"login":"9thbit","id":435164,"avatar_url":"https://avatars.githubusercontent.com/u/435164?v=3","gravatar_id":"","url":"https://api.github.com/users/9thbit","html_url":"https://github.com/9thbit","followers_url":"https://api.github.com/users/9thbit/followers","following_url":"https://api.github.com/users/9thbit/following{/other_user}","gists_url":"https://api.github.com/users/9thbit/gists{/gist_id}","starred_url":"https://api.github.com/users/9thbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9thbit/subscriptions","organizations_url":"https://api.github.com/users/9thbit/orgs","repos_url":"https://api.github.com/users/9thbit/repos","events_url":"https://api.github.com/users/9thbit/events{/privacy}","received_events_url":"https://api.github.com/users/9thbit/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T13:04:50Z","updated_at":"2015-08-27T13:04:50Z","body":"Both of these models are working fine for me with Mistral and Mistral2 using the current master branch. Do you know what version you have installed @pthedinger?\r\n\r\nBy the way, you can really simplify your variable declaration further using a VarArray like so:\r\n`variables = VarArray(2, N)`"}}