scipopt / soplex

Sequential object-oriented simPlex
Other
59 stars 18 forks source link

Regression by solved Issue #22, Dynamic buffer growth when reading LP files #27

Closed hartmut-h closed 6 months ago

hartmut-h commented 7 months ago

Hello,

my fix for buffer growth (issue #22) contained a regression, sorry: By adding a while loop within the for loop the inner break statement on error lets leave only the while loop, but it should let leave the for loop as well. This was the case before, where instead of the while there was an if statement. This bug happens, if one forgets the End statement in the LP file. Then soplex repeatedly outputs "ELPFRD07 No 'End' marker found", until it is interrupted. With the attached fix, using a goto, soplex takes the hurdle of missing End marker and proceeds with work. Only the warning about the missing marker is issued once, as it was in the original version. I would be glad if you could fix this. fix-end-marker.diff.gz

Best Regards Hartmut

leoneifler commented 7 months ago

Hi Hartmut,

thanks for following up on this. I changed your suggested fix slightly.

These changes will appear on GitHub after they pass our CI. Comments are still welcome, of course.

hartmut-h commented 7 months ago

Hi Leon,

On Fri, 19 Jan 2024, Leon Eifler wrote:

  • I changed the first case to go to syntax_error (and removed finished = true) since if buf_size >= INT_MAX we should not act like nothing happened.

right, good, i believed it would change the original situation.

  • I don´t like adding yet another goto label, so I just added if(finished) break; after the while loop.

thanks a lot, i was also hesitating... in another list this morning this supporting link came up: https://xkcd.com/292/ :-)

Best Regards, Hartmut

leoneifler commented 7 months ago

:rofl: that is perfect.

hartmut-h commented 7 months ago

Thanks a lot for fixing the end marker issue, but as of today, the repeated printout persists here. In the fix to spxlpbase_real.hpp, line 920 finished = true; should be followed a break; to leave the while loop. Then the warning is printed only once.

leoneifler commented 6 months ago

Sorry for the long pause here, as well. Life got in the way. You are completely right and I just pushed the suggested fix, which should appear on GitHub until tomorrow.