Vote for including GLPK standard in Sage

2 views
Skip to first unread message

Robert Miller

unread,
Jun 21, 2010, 2:02:43 PM6/21/10
to sage-devel
Hello,

Almost a year ago there was a brief discussion about this topic:

http://groups.google.com/group/sage-devel/browse_thread/thread/fed15c54478e8d5

GLPK is a GPLv3 program from the FSF for linear programming:

http://www.gnu.org/software/glpk/

Many of the awesome graph theory functions (such as for Hamiltonian
graphs) depend on some LP program being installed, and I think it
would be great if sage-standard could, e.g. solve the is_hamiltonian
question. Here are a few William Stein quotes from the last
discussion:

> NOTE: GLPK is GPLv3. Since we need to retain the ability to release GPLv2
> versions of Sage for now, this is another very good reason to make it
> optional for a while (so it is easy to swap out).
...
> I personally think GLPK will end up being standard in Sage before
> long, so I think your approach right now is pretty good. It's just
> that it has to be optional for a bit (a month or so), since that's
> what we do.

I recently emailed him about the GPLv3 issue, asking "is GPLv3 a
deal-breaker?" and he replied "No, it is not a dealbreaker."

As more and more functions requiring LP get merged into Sage, I think
the time has come to reconsider this.

--
Robert L. Miller
http://www.rlmiller.org/

William Stein

unread,
Jun 21, 2010, 2:20:19 PM6/21/10
to sage-...@googlegroups.com

This is an official call for a vote:

[ ] yes, include glpk

[ ] no, don't because.... ___________________


>
> --
> Robert L. Miller
> http://www.rlmiller.org/
>

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

kcrisman

unread,
Jun 21, 2010, 2:34:06 PM6/21/10
to sage-devel
As long as there are no licensing issues, we *definitely* need
something for semi-serious LP (and I don't even use it!). If this is
the most obvious candidate for an official package, do it. It's not
more than another 100 MB to the tarball, is it? ;)

- kcrisman

On Jun 21, 2:20 pm, William Stein <wst...@gmail.com> wrote:
> On Monday, June 21, 2010, Robert Miller <r...@rlmiller.org> wrote:
> > Hello,
>
> > Almost a year ago there was a brief discussion about this topic:
>
> >http://groups.google.com/group/sage-devel/browse_thread/thread/fed15c...
> > For more options, visit this group athttp://groups.google.com/group/sage-devel

David Joyner

unread,
Jun 21, 2010, 2:43:39 PM6/21/10
to sage-...@googlegroups.com
On Mon, Jun 21, 2010 at 2:20 PM, William Stein <wst...@gmail.com> wrote:
> On Monday, June 21, 2010, Robert Miller <r...@rlmiller.org> wrote:

...

>
> This is an official call for a vote:
>
> [ ]  yes, include glpk


I vote yes.

Robert Miller

unread,
Jun 21, 2010, 2:44:01 PM6/21/10
to sage-...@googlegroups.com
On Mon, Jun 21, 2010 at 11:34 AM, kcrisman <kcri...@gmail.com> wrote:
> As long as there are no licensing issues, we *definitely* need
> something for semi-serious LP (and I don't even use it!).  If this is
> the most obvious candidate for an official package, do it.  It's not
> more than another 100 MB to the tarball, is it?  ;)

The tarballs are roughly 3MB.

William Stein

unread,
Jun 21, 2010, 2:45:36 PM6/21/10
to sage-...@googlegroups.com
On Monday, June 21, 2010, Robert Miller <r...@rlmiller.org> wrote:

Build time?

Tested on solaris?

Tested on cygwin?


> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com

> For more options, visit this group at http://groups.google.com/group/sage-devel

Robert Miller

unread,
Jun 21, 2010, 2:51:08 PM6/21/10
to sage-...@googlegroups.com
> Build time?

On my MacBook, under two minutes:

$ time sage -f glpk
...
real 1m25.964s
user 0m58.227s
sys 0m14.410s

> Tested on solaris?
>
> Tested on cygwin?

Sorry, but I have no idea...

Martin Albrecht

unread,
Jun 21, 2010, 3:42:27 PM6/21/10
to sage-...@googlegroups.com
> Many of the awesome graph theory functions (such as for Hamiltonian
> graphs) depend on some LP program being installed, and I think it
> would be great if sage-standard could, e.g. solve the is_hamiltonian
> question.

I'm all in favour of having some LP (and MIP) solver in Sage by default. It
seems to me GLPK fits the requirements best. It is not a very efficient solver
(at least in my experience) but there is not GPL'd alternative AFAIK.

So I vote yes.

Martin

PS: Of course, we'll have to figure out Solaris and Cygwin support first etc.

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinr...@jabber.ccc.de

Mike Hansen

unread,
Jun 21, 2010, 3:46:01 PM6/21/10
to sage-...@googlegroups.com
On Mon, Jun 21, 2010 at 11:45 AM, William Stein <wst...@gmail.com> wrote:
> Tested on cygwin?

Seems to work on Cygwin:

real 9m30.674s
user 2m52.117s
sys 5m37.069s
Successfully installed glpk-4.42.p0
Now cleaning up tmp files.
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing glpk-4.42.p0.spkg
mhansen@WINXP2 ~/sage-4.3.5

--Mike

mhampton

unread,
Jun 21, 2010, 3:59:15 PM6/21/10
to sage-devel

>
> This is an official call for a vote:
>
> [ X]  yes, include glpk

I have not had any problems installing glpk, which I have done quite a
bit in testing the sandpiles package. I believe it builds on solaris
(definitely used to), and I know it does on a range of linux and mac
machines I have used.

-Marshall Hampton

Nathann Cohen

unread,
Jun 21, 2010, 4:13:21 PM6/21/10
to sage-devel
A +1 from me, of course.... :-)

Nathann

Michele Comignano

unread,
Jun 21, 2010, 4:37:56 PM6/21/10
to sage-...@googlegroups.com
Il 21/06/2010 20:20, William Stein ha scritto:
> This is an official call for a vote:
>
> [ ] yes, include glpk
>
> [ ] no, don't because.... ___________________
>
>
[X] yes, include glpk

Having a class to build easily MILP problems and discover that p.solve() raise an excetion by default is somewhat frustrating!

:)

--
Michele Comignano
Computer Science student
University of Pisa, Italy

Dima Pasechnik

unread,
Jun 21, 2010, 4:40:15 PM6/21/10
to sage-devel
yes, sure!

By the way, GLPK has a CVXOPT interface, so this would also means that
this interface
needs to be somehow taken care of in a new release of CVXOPT package,
that I hopefully
will be able to deal with in July...

Dima


On Jun 21, 8:02 pm, Robert Miller <r...@rlmiller.org> wrote:
> Hello,
>
> Almost a year ago there was a brief discussion about this topic:
>
> http://groups.google.com/group/sage-devel/browse_thread/thread/fed15c...

Dr. David Kirkby

unread,
Jun 21, 2010, 4:47:52 PM6/21/10
to sage-...@googlegroups.com
On 06/21/10 07:45 PM, William Stein wrote:
> On Monday, June 21, 2010, Robert Miller<r...@rlmiller.org> wrote:
>> On Mon, Jun 21, 2010 at 11:34 AM, kcrisman<kcri...@gmail.com> wrote:
>>> As long as there are no licensing issues, we *definitely* need
>>> something for semi-serious LP (and I don't even use it!). If this is
>>> the most obvious candidate for an official package, do it. It's not
>>> more than another 100 MB to the tarball, is it? ;)
>>
>> The tarballs are roughly 3MB.
>>
>
> Build time?

Pretty quick!

On my Sun Ultra 27, with a parallel build, I can build it in under 7 seconds!
'configure' takes a bit under 3 seconds, and 'make' takes a bit under 3.8 seconds.

For a serial build, it takes a little under 20 seconds.

So even on old hardware, that is not going to take too long.

> Tested on solaris?

32-bit Solaris 10 on SPARC - OK
64-bit Solaris 10 on SPARC - OK
32-bit OpenSolaris on x64 - OK
64-bit OpenSolaris on x64 - OK

In all cases, I just used 'configure' to the source code. I've not tried it
whatever a Sage package decides to link to it.

Robert Bradshaw

unread,
Jun 21, 2010, 5:08:19 PM6/21/10
to sage-...@googlegroups.com

Makes sense to me. Does it have a spkg-check?

- Robert

Jason Grout

unread,
Jun 21, 2010, 8:35:45 PM6/21/10
to sage-...@googlegroups.com
On 6/21/10 11:20 AM, William Stein wrote:

> [ ] yes, include glpk
>
> [ ] no, don't because.... ___________________


Yes.

Thanks,

Jason

Rob Beezer

unread,
Jun 22, 2010, 12:00:14 AM6/22/10
to sage-devel
On Jun 21, 11:20 am, William Stein <wst...@gmail.com> wrote:
> This is an official call for a vote:

Just some input to throw into the mix. About 16 months ago, out of
curiosity, I signed up for the GLPK mailing list. It is fairly active
at about 100 messages/month, with about a quarter of those from the
official maintainer (Andrew Makhorin). Various folks seem interested
in writing other front-ends on top of it. So based on limited
observation, it seems to have a fairly healthy community with a
responsive maintainer.

Rob

Dr David Kirkby

unread,
Jun 22, 2010, 2:02:26 AM6/22/10
to sage-devel


On 21 June, 21:47, "Dr. David Kirkby" <david.kir...@onetel.net> wrote:
> On 06/21/10 07:45 PM, William Stein wrote:

> > Tested on solaris?
>
> 32-bit Solaris 10 on SPARC - OK
> 64-bit Solaris 10 on SPARC - OK
> 32-bit OpenSolaris on x64 - OK
> 64-bit OpenSolaris on x64 - OK
>
> In all cases, I just used 'configure' to the source code. I've not tried it
> whatever a Sage package decides to link to it.

CORRECTION

My observation was based on the glpk source code, not the package in
Sage - I was not aware there was one.

The package does not even add the -m64 flag, so will not build on
OpenSolaris x64 or on some Macs - it completley ignores the SAGE64
variable.

So whilst the package could be made to work, as it is, I think it
should not be included.

Dave

Robert Miller

unread,
Jun 22, 2010, 11:40:25 AM6/22/10
to sage-...@googlegroups.com
On Mon, Jun 21, 2010 at 11:02 PM, Dr David Kirkby <drki...@gmail.com> wrote:
> The package does not even add the -m64 flag, so will not build on
> OpenSolaris x64 or on some Macs - it completley ignores the SAGE64
> variable.
>
> So whilst the package could be made to work, as it is, I think it
> should not be included.

Dave,

I've made a ticket for this -- #9312. If you felt like posting a new
spkg there, I would gladly review it. Or if you want to do it the
other way around, since you have better access to Solaris
architectures, that would be fine by me too.

Harald Schilly

unread,
Jun 22, 2010, 12:32:40 PM6/22/10
to sage-devel
i'm for cbc but since i've just learned that the cpl is not compatible
with the gpl i say

> [ x ]  yes, include glpk

;)

H
Reply all
Reply to author
Forward
0 new messages