conjure icon indicating copy to clipboard operation
conjure copied to clipboard

Conjure produce bad answers if same param file is reused

Open ChrisJefferson opened this issue 2 years ago • 4 comments

I was getting some incorrect answers from conjure, and I think I've figured out why -- I have 3 files in a directory (attached), a.essence, b.essence and c.param. These files aren't interesting a.essence and b.essence are just files which have quite a lot of answers.

If I do:

conjure solve a.essence c.param --solver=lingeling --number-of-solutions=all
(in another window)
conjure solve b.essence c.param --solver=lingeling --number-of-solutions=all

Then the second conjure solve exits with no solutions, and the first stops, printing the solutions it found so far.

ChrisJefferson avatar Sep 23 '22 16:09 ChrisJefferson

That could be a savile row issue, i.e. the second SR to start is overwriting the files of the first one -- what are the filenames of the param files produced by conjure? i.e. are they the same for both commands

pwn1 avatar Sep 24 '22 15:09 pwn1

Just to make a note here as well Chris. The default model will be called conjure-output/model000001.eprime, hence if the same param name is used Conjure might explicitly set the filenames used by SR to clash. Even if Conjure didn't set these I think the defaults of SR would cause them to clash as well.

I would use a separate output directory per Essence file.

We can change Conjure's default output directory to something like conjure-output/essenceBaseFilename but then if you have 2 essence files with the same name but at different locations, you would still have a collision. Maybe that is a rarer case, but would be even more annoying when it happens...

ozgurakgun avatar Sep 26 '22 08:09 ozgurakgun

Any suggestions for this one @ChrisJefferson? I can implement what I suggest in the previous comment without too much hassle (output dir named after the essence file) but this can also be achieved by setting an output directory manually (using -o).

ozgurakgun avatar Nov 03 '22 09:11 ozgurakgun

This is looking at an old commit -- I wonder if we should just put things in a subdirectory of conjure-output based on hash of the contents of the file? This would make it harder for people to go digging for outputs, but should make it easier to run lots of conjures.

ChrisJefferson avatar Jun 26 '23 09:06 ChrisJefferson