#9312: Fix GLPK spkg for SAGE64
---------------------------------------------------------------+------------
Reporter: rlm | Owner:
tbd
Type: defect | Status:
needs_info
Priority: major | Milestone:
sage-4.4.4
Component: optional packages | Keywords:
Author: David Kirkby | Upstream:
N/A
Reviewer: | Merged:
Work_issues: Needs extensive testing - I've done very little |
---------------------------------------------------------------+------------
Changes (by newvalueoldvalue):
* cc: ncohen (added)
* work_issues: => Needs extensive testing - I've done very little
* author: => David Kirkby
Comment:
I've updated this package somewhat
http://boxen.math.washington.edu/home/kirkby/patches/glpk-4.44.spkg
to fix what were quite a number of problems with how the package was put
together. I've not tested this as a library. Someone more knowledgeable
can test this properly. I've only tested it on Solaris and !OpenSolaris to
see that it builds ok and passes the self-tests in the source code.
I've not changed any of the python stuff, so it should be unchanged. The
major change was to disable building of the static libraries, which I
doubt Python needs.
== Changes made ==
* Updated to the latest upstream code, version 4.44.
* Added code to allow a 64-bit build on any platform.
If SAGE64 is set to "yes", the compiler flag -m64 is added
by default. That flag works with GCC and !SunStudio, but not
all compilers - IBM's compiler for AIX and HP's for HP-UX
both use different flags to create a 64-bit build.
If the compiler does not use -m64 for 64-bit builds, then
the environment variable CFLAG64 can be set to indicate what
flag gets added.
* Added a file spkg-check so the self-test code is built.
This includes code which will add the appropriate flag
for 64-bit builds if the test procedures need code to be
compiled. (Sometimes running 'make test' actually needs
the compiler flags set properly, so I do it just in case.
It appears to be unnecessary with this version of GLPK,
but might with later releases.
* Added the configure option --with-gmp which will speed up
processing of large integers (see src/INSTALL)
* Added the configure option --disable-static since there is
no need to build static libraries. (see src/INSTALL)
* Added the configure option --with-zlib. Adding this allows
GLPK API routines and the stand-alone solver to read and
write compressed data files performing compression and
decompression "on the fly" (see src/INSTALL)
* Removed linking of the 'ld' library in spkg-install, as the
reason for it being added was not clear.
* Corrected SPKG.txt to indicate this code is GPL 3.
(see src/COPYING)
* Added the !ChangeLog section to the SPKG.txt file
* Added zlib, python and mpir as dependencies in SPKG.txt
* Checked that the configure script actually does configure
properly, if not exits.
* Checked that 'make' does build the code properly, if not exits.
* Checked that 'make install' does actually install the library
* Checked that running 'python setup.py install' does actually work.
If this is not done, code can appear to install properly as it
passes 'configure', 'make' and 'make install'. So unusually there
are 4 cases where spkg-install can fail.
== Desirable changes not made ==
* There is a "patch" directory which I did not remove, as there is one
file referenced there. It should be called "patches" and I believe from
discussions on sage-devel it can perhaps be removed.
* setup.py has no comments.
* setup.py has lots of ../../../.. in directory entires and does not
refer to $SAGE_ROOT or $SAGE_LOCAL. Since I'm not a good Python
programmer, I've not attempted to fix this.
As you can see, if SAGE_CHECK is set to "yes", this passes the one self
test that there is (pretty dismal IMHO)
== Test system #1 (others MUST test on other hardware and test properly)
==
* Sun Blade 1000
* 2 x 900 MHz UltraSPARC III+ CPUs
* 2 GB RAM
* Solaris 10 03/2005 (first release of Solaris 10)
* gcc 4.4.3 (uses Sun linker and assembler)
* SEAGATE-ST3146807FC 2 Gbit/s 15,000 rpm fiber channel disk (FCAL)
* UFS (not ZFS) local file system.
* Sage 4.4.4.alpha1
* GLPK 4.44 source code integrated.
{{{
Removing /export/home/drkirkby/sage-4.4.4.alpha1/local/lib/python2.6/site-
packages/UNKNOWN-0.0.0-py2.6.egg-info
Writing /export/home/drkirkby/sage-4.4.4.alpha1/local/lib/python2.6/site-
packages/UNKNOWN-0.0.0-py2.6.egg-info
real 3m13.451s
user 2m41.607s
sys 0m28.154s
Successfully installed glpk-4.44
Running the test suite.
GLPK will now be tested
Making check in include
make[1]: Entering directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src/include'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src/include'
Making check in src
make[1]: Entering directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src/src'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src/src'
Making check in examples
make[1]: Entering directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src/examples'
./glpsol --version
GLPSOL: GLPK LP/MIP Solver, v4.44
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010 Andrew Makhorin, Department for Applied Informatics, Moscow
Aviation Institute, Moscow, Russia. All rights reserved.
This program has ABSOLUTELY NO WARRANTY.
This program is free software; you may re-distribute it under the terms
of the GNU General Public License version 3 or later.
./glpsol --mps ./plan.mps
GLPSOL: GLPK LP/MIP Solver, v4.44
Parameter(s) specified in the command line:
--mps ./plan.mps
Reading problem data from `./plan.mps'...
Problem: PLAN
Objective: VALUE
8 rows, 7 columns, 48 non-zeros
54 records were read
GLPK Simplex Optimizer, v4.44
8 rows, 7 columns, 48 non-zeros
Preprocessing...
7 rows, 7 columns, 41 non-zeros
Scaling...
A: min|aij| = 1.000e-02 max|aij| = 1.000e+00 ratio = 1.000e+02
GM: min|aij| = 2.534e-01 max|aij| = 3.946e+00 ratio = 1.557e+01
EQ: min|aij| = 6.422e-02 max|aij| = 1.000e+00 ratio = 1.557e+01
Constructing initial basis...
Size of triangular part = 7
0: obj = 6.500000000e+02 infeas = 3.788e+03 (0)
* 2: obj = 4.376770833e+02 infeas = 0.000e+00 (0)
* 10: obj = 2.962166065e+02 infeas = 0.000e+00 (0)
OPTIMAL SOLUTION FOUND
Time used: 0.0 secs
Memory used: 0.0 Mb (51150 bytes)
make[1]: Leaving directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src/examples'
make[1]: Entering directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src'
make[1]: Leaving directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44/src'
Now cleaning up tmp files.
rm: Cannot remove any directory in the path of the current working
directory
/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/glpk-4.44
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing glpk-4.44.spkg
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9312#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.