[Bug-glpk] [Fwd: Re: glpk prints warnings which lead to failing sagemath tests]

2018-03-02 Thread Andrew Makhorin
 Forwarded Message 
From: Tobias Hansen 
To: Andrew Makhorin 
Cc: Sébastien Villemot , bug-glpk@gnu.org,
891465-forwar...@bugs.debian.org
Subject: Re: glpk prints warnings which lead to failing sagemath tests
Date: Fri, 2 Mar 2018 10:33:14 +0100

On 03/01/2018 11:06 AM, Andrew Makhorin wrote:
>> Comments from the sage ticket https://trac.sagemath.org/ticket/24824#ticket
>>
>> Comment (by jdemeyer):
>>
>>  Replying to [comment:5 thansen]:
>>  > GLP_MSG_OFF is not a relevant option to disable terminal/stdout output.
>>
>>  It's not our goal to completely disable terminal output. We still want to
>>  see error messages for example.
> To fix the bug please replace lines 923-930 in glpk/src/draft/glpios03.c
>
> #if 1 /* 16/III-2016 */
>   if (((glp_iocp *)T->parm)->flip)
> #if 0 /* 20/I-2018 */
>  xprintf("WARNING: LONG-STEP DUAL SIMPLEX WILL BE USED\n");
> #else
>  xprintf("Long-step dual simplex will be used\n");
> #endif
> #endif
>
> with the following ones:
>
> #if 1 /* 01/III-2018 */
>   if (((glp_iocp *)T->parm)->flip)
>  if (T->parm->msg_lev >= GLP_MSG_ALL)
> xprintf("Long-step dual simplex will be used\n");
> #endif
>
> Please note that this change will appear in the next release of glpk.

Thank you!

>
>> Comment (by jdemeyer):
>>
>>  It would also be good to know what the message "Long-step dual simplex
>>  will be used" means. Is it supposed to be a warning to say that we are
>>  doing something wrong?
>>
>>
> Now (in glpk 4.65) it is an informational message, not warning.
>
> I again would like to repeat that parsing of the solver standard output
> to perform testing is not a good idea, because the glpk api does not
> specify it. If you say to me what namely do you need to test, I could
> suggest a more relevant test.
>

There's nothing in particular that needs to be tested. sagemath has tests for 
pretty much everything it can do and if it uses some library (and the library 
does not have some warnings or errors to report) one should just get sagemath's 
result of the calculation. It's just to test sagemath as a whole, other 
programs are expected to have their own tests etc.

Best,
Tobias




___
Bug-glpk mailing list
Bug-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-glpk


[Bug-glpk] [Fwd: Re: glpk prints warnings which lead to failing sagemath tests]

2018-03-02 Thread Andrew Makhorin
 Forwarded Message 
From: Sébastien Villemot 
To: Andrew Makhorin 
Cc: Tobias Hansen , bug-glpk@gnu.org,
891465-forwar...@bugs.debian.org
Subject: Re: glpk prints warnings which lead to failing sagemath tests
Date: Fri, 2 Mar 2018 09:07:52 +0100

On Thu, Mar 01, 2018 at 01:06:00PM +0300, Andrew Makhorin wrote:

> To fix the bug please replace lines 923-930 in glpk/src/draft/glpios03.c
> 
> #if 1 /* 16/III-2016 */
>   if (((glp_iocp *)T->parm)->flip)
> #if 0 /* 20/I-2018 */
>  xprintf("WARNING: LONG-STEP DUAL SIMPLEX WILL BE USED\n");
> #else
>  xprintf("Long-step dual simplex will be used\n");
> #endif
> #endif
> 
> with the following ones:
> 
> #if 1 /* 01/III-2018 */
>   if (((glp_iocp *)T->parm)->flip)
>  if (T->parm->msg_lev >= GLP_MSG_ALL)
> xprintf("Long-step dual simplex will be used\n");
> #endif
> 
> Please note that this change will appear in the next release of glpk.

Thanks Andrew, I am going to apply this patch to the Debian package for glpk.

Best,

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  http://sebastien.villemot.name
⠈⠳⣄  http://www.debian.org



___
Bug-glpk mailing list
Bug-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-glpk


[Bug-glpk] [Fwd: Re: glpk prints warnings which lead to failing sagemath tests]

2018-02-28 Thread Andrew Makhorin
 Forwarded Message 
From: Tobias Hansen 
To: Andrew Makhorin 
Cc: Sébastien Villemot , bug-glpk@gnu.org,
891465-forwar...@bugs.debian.org
Subject: Re: glpk prints warnings which lead to failing sagemath tests
Date: Wed, 28 Feb 2018 12:01:48 +0100

On 02/28/2018 09:51 AM, Andrew Makhorin wrote:
> On Mon, 2018-02-26 at 18:56 +0100, Tobias Hansen wrote:
>> On 02/26/2018 04:46 PM, Andrew Makhorin wrote:
>>> On Mon, 2018-02-26 at 12:00 +0100, Sébastien Villemot wrote:
 Dear GLPK maintainer,

 I received the attached bug report and patch for the glpk package in 
 Debian.

 What’s your take on this? Should I apply the patch, or is this something 
 that
 should better be fixed at the sagemath level?

 Best,

 P.S.: please keep all addresses in CC when replying.
>>> Thank you for your bug report.
>>>
>>> Could you please explain in more details how glpk is tested? Both glpk
>>> lp and mip solvers issue many messages to the standard output, so it is
>>> unclear to me how some of the messages may affect the tests.
>>>
>>> Andrew Makhorin
>> Hi,
>>
>> one example that I checked was using the mip solver (not sure if other
>> solvers are affected) with msg_lev set to GLP_MSG_OFF. Normally there
>> is no terminal output, now there is the message "Long-step dual
>> simplex will be used". GLPK is used from a Python program which checks
>> the terminal output in its test suite.
> GLP_MSG_OFF is not a relevant option to disable terminal/stdout output. 
> Please use glp_term_out(GLP_OFF) and glp_term_out(GLP_ON) instead--these
> calls disable/enable terminal output on a lower level independently on
> options passed to the solvers.
>
> Besides, as was noticed by Heinrich, it is not a good idea to parse the
> terminal output to test glpk (what namely do you want to test in such a
> way?).
>
> Best regards,
>
> Andrew Makhorin

Comments from the sage ticket https://trac.sagemath.org/ticket/24824#ticket

Comment (by jdemeyer):

 Replying to [comment:5 thansen]:
 > GLP_MSG_OFF is not a relevant option to disable terminal/stdout output.

 It's not our goal to completely disable terminal output. We still want to
 see error messages for example.

Comment (by jdemeyer):

 It would also be good to know what the message "Long-step dual simplex
 will be used" means. Is it supposed to be a warning to say that we are
 doing something wrong?



>
>> Best,
>> Tobias Hansen
>>
>>
>>>
 MHTML Document attachment (Bug#891465: glpk: prints warnings which
 lead to failing sagemath tests)
>  Forwarded Message 
> From: Tobias Hansen 
> Reply-to: Tobias Hansen , 891...@bugs.debian.org
> To: sub...@bugs.debian.org
> Subject: Bug#891465: glpk: prints warnings which lead to failing
> sagemath tests
> Date: Sun, 25 Feb 2018 20:54:19 +0100
>
> Source: glpk
> Version: 4.65-1
> Severity: normal
> Tags: patch
>
> Hi there,
>
> since version 4.65 glpk started to frequently print the message
>> "Long-step dual simplex will be used", leading to many failed tests
>> for sagemath and sagemath failing to build. Not sure if it's a bug in
>> glpk but it seems to me it shouldn't print this. Could you maybe
>> deactivate the messages to allow sagemath to build?
> Best,
> Tobias
>>
>>
>





___
Bug-glpk mailing list
Bug-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-glpk


[Bug-glpk] [Fwd: Re: glpk prints warnings which lead to failing sagemath tests]

2018-02-28 Thread Andrew Makhorin
 Forwarded Message 
From: Tobias Hansen 
To: Andrew Makhorin 
Cc: Sébastien Villemot , bug-glpk@gnu.org,
891465-forwar...@bugs.debian.org
Subject: Re: glpk prints warnings which lead to failing sagemath tests
Date: Wed, 28 Feb 2018 11:42:20 +0100

On 02/28/2018 09:51 AM, Andrew Makhorin wrote:
> On Mon, 2018-02-26 at 18:56 +0100, Tobias Hansen wrote:
>> On 02/26/2018 04:46 PM, Andrew Makhorin wrote:
>>> On Mon, 2018-02-26 at 12:00 +0100, Sébastien Villemot wrote:
 Dear GLPK maintainer,

 I received the attached bug report and patch for the glpk package in 
 Debian.

 What’s your take on this? Should I apply the patch, or is this something 
 that
 should better be fixed at the sagemath level?

 Best,

 P.S.: please keep all addresses in CC when replying.
>>> Thank you for your bug report.
>>>
>>> Could you please explain in more details how glpk is tested? Both glpk
>>> lp and mip solvers issue many messages to the standard output, so it is
>>> unclear to me how some of the messages may affect the tests.
>>>
>>> Andrew Makhorin
>> Hi,
>>
>> one example that I checked was using the mip solver (not sure if other
>> solvers are affected) with msg_lev set to GLP_MSG_OFF. Normally there
>> is no terminal output, now there is the message "Long-step dual
>> simplex will be used". GLPK is used from a Python program which checks
>> the terminal output in its test suite.
> GLP_MSG_OFF is not a relevant option to disable terminal/stdout output. 
> Please use glp_term_out(GLP_OFF) and glp_term_out(GLP_ON) instead--these
> calls disable/enable terminal output on a lower level independently on
> options passed to the solvers.
>
> Besides, as was noticed by Heinrich, it is not a good idea to parse the
> terminal output to test glpk (what namely do you want to test in such a
> way?).
>
> Best regards,
>
> Andrew Makhorin

The terminal output that is parsed is the output of the program that is linked 
against glpk. And it seems Octave also gets these messages in its output now, 
see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891465#20

Best,
Tobias


>
>
 MHTML Document attachment (Bug#891465: glpk: prints warnings which
 lead to failing sagemath tests)
>  Forwarded Message 
> From: Tobias Hansen 
> Reply-to: Tobias Hansen , 891...@bugs.debian.org
> To: sub...@bugs.debian.org
> Subject: Bug#891465: glpk: prints warnings which lead to failing
> sagemath tests
> Date: Sun, 25 Feb 2018 20:54:19 +0100
>
> Source: glpk
> Version: 4.65-1
> Severity: normal
> Tags: patch
>
> Hi there,
>
> since version 4.65 glpk started to frequently print the message
>> "Long-step dual simplex will be used", leading to many failed tests
>> for sagemath and sagemath failing to build. Not sure if it's a bug in
>> glpk but it seems to me it shouldn't print this. Could you maybe
>> deactivate the messages to allow sagemath to build?
> Best,
> Tobias
>>
>>
>






___
Bug-glpk mailing list
Bug-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-glpk


[Bug-glpk] [Fwd: Re: glpk prints warnings which lead to failing sagemath tests]

2018-02-26 Thread Andrew Makhorin
 Forwarded Message 
From: Tobias Hansen 
To: Andrew Makhorin , Sébastien Villemot

Cc: bug-glpk@gnu.org, 891465-forwar...@bugs.debian.org
Subject: Re: glpk prints warnings which lead to failing sagemath tests
Date: Mon, 26 Feb 2018 18:56:47 +0100

On 02/26/2018 04:46 PM, Andrew Makhorin wrote:
> On Mon, 2018-02-26 at 12:00 +0100, Sébastien Villemot wrote:
>> Dear GLPK maintainer,
>>
>> I received the attached bug report and patch for the glpk package in Debian.
>>
>> What’s your take on this? Should I apply the patch, or is this something that
>> should better be fixed at the sagemath level?
>>
>> Best,
>>
>> P.S.: please keep all addresses in CC when replying.
> Thank you for your bug report.
>
> Could you please explain in more details how glpk is tested? Both glpk
> lp and mip solvers issue many messages to the standard output, so it is
> unclear to me how some of the messages may affect the tests.
>
> Andrew Makhorin

Hi,

one example that I checked was using the mip solver (not sure if other solvers 
are affected) with msg_lev set to GLP_MSG_OFF. Normally there is no terminal 
output, now there is the message "Long-step dual simplex will be used". GLPK is 
used from a Python program which checks the terminal output in its test suite.

Best,
Tobias Hansen


>
>
>> MHTML Document attachment (Bug#891465: glpk: prints warnings which
>> lead to failing sagemath tests)
>>>  Forwarded Message 
>>> From: Tobias Hansen 
>>> Reply-to: Tobias Hansen , 891...@bugs.debian.org
>>> To: sub...@bugs.debian.org
>>> Subject: Bug#891465: glpk: prints warnings which lead to failing
>>> sagemath tests
>>> Date: Sun, 25 Feb 2018 20:54:19 +0100
>>>
>>> Source: glpk
>>> Version: 4.65-1
>>> Severity: normal
>>> Tags: patch
>>>
>>> Hi there,
>>>
>>> since version 4.65 glpk started to frequently print the message "Long-step 
>>> dual simplex will be used", leading to many failed tests for sagemath and 
>>> sagemath failing to build. Not sure if it's a bug in glpk but it seems to 
>>> me it shouldn't print this. Could you maybe deactivate the messages to 
>>> allow sagemath to build?
>>>
>>> Best,
>>> Tobias
>






___
Bug-glpk mailing list
Bug-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-glpk