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

Conjure produce bad answers if same param file is reused #533

Open
ChrisJefferson opened this issue Sep 23, 2022 · 4 comments
Open

Conjure produce bad answers if same param file is reused #533

ChrisJefferson opened this issue Sep 23, 2022 · 4 comments

Comments

@ChrisJefferson
Copy link
Collaborator

ChrisJefferson commented Sep 23, 2022

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.

@pwn1
Copy link
Collaborator

pwn1 commented Sep 24, 2022

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

@ozgurakgun
Copy link
Collaborator

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
Copy link
Collaborator

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).

@ChrisJefferson
Copy link
Collaborator Author

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.

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

No branches or pull requests

3 participants