sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 466 forks source link

Upgrade lrslib to version 6.2; build a shared library; build parallel (multicore/MPI) plrs, mplrs #20886

Closed mkoeppe closed 8 years ago

mkoeppe commented 8 years ago

This ticket upgrades lrslib to version 6.2. This version, according to http://cgm.cs.mcgill.ca/~avis/C/lrs.html, has the following new features:

Since Polymake (#20892) seems to need the shared library of lrslib, but lrslib uses a hand-written makefile that does not work on Mac OS X, I have added an autotools build system. It is available here: https://github.com/mkoeppe/lrslib/tree/autoconfiscation

"Upstream" URL: https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-07-05/lrslib-062.autotools-2016-07-05.tar.gz Download and put into upstream under the name "lrslib-062+autotools-2016-07-05.tar.gz"

Upstream: Reported upstream. No feedback yet.

CC: @dimpase @videlec @mkoeppe @fchapoton @kiwifb @tscrim @drvinceknight @theref @vbraun @jdemeyer

Component: packages: optional

Keywords: days78

Author: Matthias Koeppe

Branch/Commit: 8b3ad56

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/20886

mkoeppe commented 8 years ago

Description changed:

--- 
+++ 
@@ -1 +1,4 @@
 http://cgm.cs.mcgill.ca/~avis/C/lrs.html
+
+Polymake (#20892) seems to need the shared library.
+
videlec commented 8 years ago

Description changed:

--- 
+++ 
@@ -2,3 +2,4 @@

 Polymake (#20892) seems to need the shared library.

+upstream tarball: http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-062.tar.gz
mkoeppe commented 8 years ago
comment:4

Thanks for the tarball location. I think I made the patch for last version from here: https://github.com/mkoeppe/lrslib

mkoeppe commented 8 years ago

Description changed:

--- 
+++ 
@@ -3,3 +3,5 @@
 Polymake (#20892) seems to need the shared library.

 upstream tarball: http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-062.tar.gz
+
+Autoconfiscated, builds shared libs: https://github.com/mkoeppe/lrslib/tree/autoconfiscation
kcrisman commented 8 years ago
comment:8

Though lrs would still be an optional package (I think it is currently)?

mkoeppe commented 8 years ago
comment:9

The 'lrs' package was renamed to 'lrslib' while transitioning to new-style packages (#18127). 'lrslib' installs both the library and the executables.

mkoeppe commented 8 years ago

Upstream: Not yet reported upstream; Will do shortly.

mkoeppe commented 8 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,7 @@
-http://cgm.cs.mcgill.ca/~avis/C/lrs.html
+This ticket upgrades lrslib to version 6.2. This version, according to http://cgm.cs.mcgill.ca/~avis/C/lrs.html, has the following new features:
+- (new in 6.0) mplrs: C wrapper for lrs that allows for parallelization on clusters of machines and uses the MPI library   quickstart
+- (major revision in 6.1) lrsnash, 2nash:  Computes all Nash equlibria of a two person non-cooperative game.  2nash is a 2-processor parallel version

-Polymake (#20892) seems to need the shared library.
+Since Polymake (#20892) seems to need the shared library of lrslib, but lrslib uses a hand-written makefile that does not work on Mac OS X, I have added an autotools build system. It is available here: https://github.com/mkoeppe/lrslib/tree/autoconfiscation

-upstream tarball: http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-062.tar.gz
-
-Autoconfiscated, builds shared libs: https://github.com/mkoeppe/lrslib/tree/autoconfiscation
+"Upstream" URL: https://github.com/mkoeppe/lrslib/archive/lrslib-062+autotools-2016-06-28.tar.gz
mkoeppe commented 8 years ago

Branch: u/mkoeppe/upgrade_lrslib_to_version_6_2build_a_shared_library__build_parallelmulticore_mpiplrsmplrs

mkoeppe commented 8 years ago

Commit: 02fcdb9

mkoeppe commented 8 years ago

New commits:

02fcdb9Upgrade lrs to version 062 (autotoolized)
kcrisman commented 8 years ago
comment:13

When you do this, be sure to test all the game theory stuff with the optional package. Do they need renaming? I don't think I even knew about this renaming to lib.

mkoeppe commented 8 years ago
comment:14

The renaming was done in #18127, and at that time some "#optional" tests had to be adjusted.

kcrisman commented 8 years ago
comment:15

Awesome.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 02fcdb9 to bb8b740

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

bb8b740Adjust scripts
mkoeppe commented 8 years ago
comment:17

Needs testing (especially on non-Mac OS X).

mkoeppe commented 8 years ago

Author: Matthias Koeppe

kcrisman commented 8 years ago

Reviewer: Karl-Dieter Crisman

kcrisman commented 8 years ago

Changed reviewer from Karl-Dieter Crisman to none

tscrim commented 8 years ago
comment:21

I tried to use the link on the ticket for the upstream tarball, and there seems to be a checksum difference (in addition to the file name being wrong).

mkoeppe commented 8 years ago

Description changed:

--- 
+++ 
@@ -4,4 +4,5 @@

 Since Polymake (#20892) seems to need the shared library of lrslib, but lrslib uses a hand-written makefile that does not work on Mac OS X, I have added an autotools build system. It is available here: https://github.com/mkoeppe/lrslib/tree/autoconfiscation

-"Upstream" URL: https://github.com/mkoeppe/lrslib/archive/lrslib-062+autotools-2016-06-28.tar.gz
+"Upstream" URL: https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-06-28a/lrslib-062.autotools-2016-06-28a.tar.gz
+Download and put into upstream under the name "lrslib-062+autotools-2016-06-28a.tar.gz"
mkoeppe commented 8 years ago
comment:23

Sorry, I had forgotten to update the link.

tscrim commented 8 years ago
comment:25

Thanks (though the tarball have a . instead of a + in the name). However, this failed to build for me with Ubuntu 14.04 LTS due to it not finding boost:

[lrslib-062+autotools-2016-06-28a] /usr/bin/ld: cannot find -lboost_thread
[lrslib-062+autotools-2016-06-28a] /usr/bin/ld: cannot find -lboost_system

Does this need the full version of boost or is Sage's stripped down version sufficient? FYI - I don't have a system-wide install of boost.

tscrim commented 8 years ago
comment:26

Also, to that effect, we should add a dependencies file.

mkoeppe commented 8 years ago
comment:27

It looks like I need to improve the configure script to detect that boost_thread and boost_system are missing.

Please try with the full boost package, this is what I installed. I'll add it to dependencies.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e96fab2Add dependencies
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from bb8b740 to e96fab2

kcrisman commented 8 years ago
comment:30

Replying to @mkoeppe:

It looks like I need to improve the configure script to detect that boost_thread and boost_system are missing.

Please try with the full boost package, this is what I installed.

That's annoying, considering we didn't need that before. Is there any possibility of an lrs which doesn't require the full boost?

tscrim commented 8 years ago
comment:31

I would somewhat hope there could be a way to link it to the cropped version of boost we ship with Sage. I could not test if this would link to the systemwide boost or would just force an install of the full Sage spkg boost. However, this worked without any trouble for me on my Ubuntu machine (which also installed boost).

tscrim commented 8 years ago

Changed keywords from none to days78

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from e96fab2 to 35c1b6c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

1a24aaclrslib: Remove dependency on full boost package; conditionalize plrs build on boost
35c1b6cMerge tag '7.3.beta6' into t/20886/upgrade_lrslib_to_version_6_2__build_a_shared_library__build_parallel__multicore_mpi__plrs__mplrs
mkoeppe commented 8 years ago

Description changed:

--- 
+++ 
@@ -4,5 +4,5 @@

 Since Polymake (#20892) seems to need the shared library of lrslib, but lrslib uses a hand-written makefile that does not work on Mac OS X, I have added an autotools build system. It is available here: https://github.com/mkoeppe/lrslib/tree/autoconfiscation

-"Upstream" URL: https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-06-28a/lrslib-062.autotools-2016-06-28a.tar.gz
-Download and put into upstream under the name "lrslib-062+autotools-2016-06-28a.tar.gz"
+"Upstream" URL: https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-06-28a/lrslib-062.autotools-2016-07-05.tar.gz
+Download and put into upstream under the name "lrslib-062+autotools-2016-07-05.tar.gz"
mkoeppe commented 8 years ago

Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.

mkoeppe commented 8 years ago
comment:34

I've updated the package's configure script so it detects whether the full boost is available. If so, it builds one additional binary, plrs, which is not used by current Sage.

tscrim commented 8 years ago
comment:35

Thank you. I think, which is why I've cc-ed Jeroen and Volker if one of them could confirm, that the correct way to do the dependencies file is to use $(MP_LIBRARY). Once that is done, I think we can set this to a positive review.

tscrim commented 8 years ago

Reviewer: Travis Scrimshaw

vbraun commented 8 years ago
comment:36

Make it so

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

8b3ad56lrslib: Fix up dependencies
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 35c1b6c to 8b3ad56

tscrim commented 8 years ago

Description changed:

--- 
+++ 
@@ -4,5 +4,5 @@

 Since Polymake (#20892) seems to need the shared library of lrslib, but lrslib uses a hand-written makefile that does not work on Mac OS X, I have added an autotools build system. It is available here: https://github.com/mkoeppe/lrslib/tree/autoconfiscation

-"Upstream" URL: https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-06-28a/lrslib-062.autotools-2016-07-05.tar.gz
+"Upstream" URL: https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-07-05/lrslib-062.autotools-2016-07-05.tar.gz
 Download and put into upstream under the name "lrslib-062+autotools-2016-07-05.tar.gz"
tscrim commented 8 years ago
comment:38

This looks good to me now; thanks.

Note to Volker, you will have to rename the tarball when you put it on the server.

mkoeppe commented 8 years ago
comment:39

Thanks for reviewing, Travis!

mkoeppe commented 8 years ago
comment:40

Follow-up:

vbraun commented 8 years ago

Changed branch from u/mkoeppe/upgrade_lrslib_to_version_6_2build_a_shared_library__build_parallelmulticore_mpiplrsmplrs to 8b3ad56