Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6603 closed enhancement (fixed)

[with spkg, positive review] COIN-OR / CBC for SAGE

Reported by: ncohen Owned by: jkantor
Priority: major Milestone: sage-4.1.2
Component: packages: optional Keywords:
Cc: Merged in: Sage 4.1.2.alpha0
Authors: Nathann Cohen Reviewers: David Joyner
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by ncohen)

CBC is a Free ( though not GPL-compatible ) Linear Program and Mixed Integer Program Solver from the COIN-OR suite.

Even though it is not Free and will have to remain an optional package, COIN-OR has performances way above GLPK which is to be used by default in SAGE ( see http://trac.sagemath.org/sage_trac/ticket/6502 and http://groups.google.com/group/sage-devel/browse_thread/thread/9da47e06bcdfc49f )

This SPKG contains the last version of CBC and a Cython class to make it available through numerical.mip when installed.

The SPKG can be found at this address : http://www-sop.inria.fr/members/Nathann.Cohen/cbc-2.3.spkg

I hope you will like it ! ;-)

Change History (18)

comment:1 Changed 9 years ago by ncohen

  • Description modified (diff)

comment:2 Changed 9 years ago by wdj

ON an amd64 ubuntu 9.04 machine, I got an error in installationof cbc. Here is the tail:

make[2]: Leaving directory `/home/wdj/sagefiles/sage-4.1.1.alpha0/spkg/build/cbc-2.3/src'
make[1]: Leaving directory `/home/wdj/sagefiles/sage-4.1.1.alpha0/spkg/build/cbc-2.3/src'
python: can't open file 'setup.py': [Errno 2] No such file or directory

real    12m35.674s
user    10m40.044s
sys     1m53.819s
sage: An error occurred while installing cbc-2.3
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /home/wdj/sagefiles/sage-4.1.1.alpha0/install.log.  Describe your computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/home/wdj/sagefiles/sage-4.1.1.alpha0/spkg/build/cbc-2.3 and type 'make'.
Instead type "/home/wdj/sagefiles/sage-4.1.1.alpha0/sage -sh"
in order to set all environment variables correctly, then cd to
/home/wdj/sagefiles/sage-4.1.1.alpha0/spkg/build/cbc-2.3
(When you are done debugging, you can type "exit" to leave the
subshell.)

Any idea what the problem is?

comment:3 Changed 9 years ago by wdj

  • Summary changed from [with SPKG, need review] COIN-OR / CBC for SAGE to [with SPKG, need work] COIN-OR / CBC for SAGE

comment:4 Changed 9 years ago by ncohen

  • Summary changed from [with SPKG, need work] COIN-OR / CBC for SAGE to [with SPKG, need review] COIN-OR / CBC for SAGE

It comes from the fact that I stupidly forgot to add a "cd .." somewhere... I just updated the spkg, it should work a bit better now ;-)

comment:5 Changed 9 years ago by wdj

This installs fine on an amd64 ubuntu 9.04 machine and passes sage -testall.

Unless there are further tests to run, I give this a positive review as an optional package.

comment:6 Changed 9 years ago by ncohen

This spkg creates a class numerical.MIPCoin, but it is an extension to numerical.MIP ( see http://trac.sagemath.org/sage_trac/ticket/6502 ), and I think the reviewing process of these two files should go in paralell ;-)

( And I also hope there will be nothing to change :-) )

comment:7 Changed 9 years ago by ncohen

  • Type changed from defect to enhancement

I just updated the SPKG, which now raises exceptions when the computations are wrong for some reason, and added some bugfixes ;-)

comment:8 Changed 9 years ago by wdj

Regarding the problems in #6502, the last thing you said was "I suggest we wait until 4.1.1 is out."

We are now at 4.1.1.rc0. Would you like more checking done on this ticket? On #6502? Wait for 4.1.1.final to retest both?

comment:9 Changed 9 years ago by ncohen

The only thing that can be checked on this SPKG for the moment is the installation process. Most of the tests will occur during the reviewing of #6502 .

It seems you had some problems in #6502 applying the patch I posted, and I thought it may be because I was working on an old version of SAGE. If you are available to review #6502 I would be glad to install a new one and create a new patch for this version, containing all the stuff related to the class mip. It will take some time though, as I have to compile SAGE ( there is no binary version for my distribution ). Do you know how I could download the sources Sage 4.1.1.rc0 ?

As soon as it will be compiled, you will have the new patch ! ;-)

Thank you !

comment:11 Changed 9 years ago by wdj

I just gave #6502 a positive review. Does that mean this can change to positive as well?

comment:12 Changed 9 years ago by ncohen

I just updated the spkg to fix something important that I did not notice because I always worked on Integer programs. I also added an Exception in the case where the user tries to solve() a program without having defined its objective function, but that is all :-)

comment:13 Changed 9 years ago by wdj

This cbc-2.3.spkg package installs fine for 4.1.1.a1 on an amd64 ubuntu 9.04 machine and passes sage -testall, except for the known failures (abstract_method.py and lazy_attribute.py).

Nathann, can you tell me which existing Sage python or cython files (if any) your package modifies? Does it modify any files in another spkg (other than cbc, I mean)?

comment:14 Changed 9 years ago by ncohen

This spkg just install all the Cbc-related librarires with a regular /configure && make && make install, then installs the class sage.numerical.mipCoin with a setup.py script ( which, if I make no mistake, creates no file except in the build/directory.

In the end, I'd say this package does not touch a hair of any pre-existing file in Sage ! ;-)

comment:15 Changed 9 years ago by wdj

  • Summary changed from [with SPKG, need review] COIN-OR / CBC for SAGE to [with SPKG, positive review] COIN-OR / CBC for SAGE

Okay, thanks.

Changing this to "positive review" as an optional package.

comment:16 Changed 9 years ago by ncohen

  • Milestone set to sage-4.1.2

comment:17 Changed 9 years ago by mvngu

  • Authors set to Nathann Cohen
  • Component changed from numerical to optional packages
  • Merged in set to Sage 4.1.2.alpha0
  • Resolution set to fixed
  • Reviewers set to David Joyner
  • Status changed from new to closed
  • Summary changed from [with SPKG, positive review] COIN-OR / CBC for SAGE to [with spkg, positive review] COIN-OR / CBC for SAGE

Merged in optional packages repository. See this page

http://www.sagemath.org/packages/optional/

and CBC is available at

http://www.sagemath.org/packages/optional/cbc-2.3.spkg

comment:18 Changed 9 years ago by bascorp

  • Report Upstream set to N/A
Note: See TracTickets for help on using tickets.