Closed franktoffel closed 8 years ago
I am working with @franktoffel and I managed to detect another issue. When using --keepfiles
, an empty AssertionError
is raised (that's why there's no error message) when parsing the .sol
file coming from NEOS.
Here is the resulting .sol file:
CBC 2.9.4 optimal, objective 2.81
0 nodes, 0 iterations, 0.003 seconds
Options
3
1
1
0
3
3
9
9
0
0
0
1
0
1
1
0
0
0
0
0
objno 0 0
suffix 0 9 8 0 0
sstatus
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
suffix 1 3 8 0 0
sstatus
0 3
1 3
2 3
kestrel_options:solver=cbc
Executing on neos-7.neos-server.org
CBC 2.9.4:
And the failing assertion is exactly this one:
https://software.sandia.gov/trac/pyomo/browser/pyomo/trunk/pyomo/opt/plugins/sol.py?rev=10784#L174
I am fairly new to Pyomo but this was worth an hour of careful debugging, so I hope it's useful.
@Juanlu001, thanks for tracking down the issue in the SOL parser. I've actually never encountered an NL file with that section inside of it (kestrel_options:..), but we will have to correct the SOL parser to handle that.
I'll also do some testing on my Windows VM and try to come up with a more forgiving way of cleaning up files on Windows. Not sure why that flag is not having any effect.
@ghackebeil I have repeated my test with --keepfiles
and indeed @Juanlu001 is right: I have got an AssertionError
I have updated the description above. At this point I am not sure if this error was always there and I confused while writing this issue.
There are two problems here actually. On the one side there's the problem with closing temporary files on Windows, and on the other side there's a closs platform failure to parse certain .sol
files. @ghackebeil Do you want us to file a separate issue for Pyomo? I must confess that GitHub is very convenient for me to have these discussions but I understand that Pyomo's home is elsewhere.
@Juanlu001, I believe I have fixed the issue with the .sol
parser in Pyomo. You are correct that part of this conversation belongs on the Pyomo trac site. It would be great if you could open up a ticket there, so I can document the fix.
I just submitted a new ticket which is now awaiting moderation, sorry @whart222 for the noise but the system rejected me twice for putting too many links (one). For future reference, here is the changeset:
https://software.sandia.gov/trac/pyomo/changeset/11162
We will try to patch the latest released version of Pyomo with these changes so we can move on. Thanks a lot for working on this @ghackebeil.
I just tried the latest patches and the error is gone. Thanks again.
@franktoffel: I just realized from your comment that the deletion_errors_are_fatal
flag was working as expected (because the error changed to an assertion error that was related the SOL file issue). I think we can close this issue.
When trying to solve the diet problem with NEOS Server I get the following error:
[Error 32] The process cannot access the file because it is being used by another process
This is apparently due to the fact that Windows tries to clean up temporary files (see old ticket).
Is there a solution nowadays or NEOS Server cannot be called from windows terminals?
I have tried two workarounds but neither of them seem to fix this issue:
deletion_errors_are_fatal = False
inpyutilib\component\config\tempfiles.py
(line 24) returns an assert error as described below