Hi Tyler,

On Sat, Jan 30, 2010 at 3:20 AM, Tyler <[email protected]> wrote:

<SNIP>

> However, I have installed Coin/CBC.  And in fact, if I try the command
>
> sage:  install_package('cbc')
>
> I get an error saying " Package is already installed."  So one part of
> sage thinks it is installed, while another does not!

I think the mismatch is due to the compiled Sage library, which lives
under SAGE_ROOT/devel/sage/. After you have installed CBC or GLPK, you
also need to run the command

./sage -b

This would get Sage in sync with the installed CBC or GLPK library.
The way MixedIntegerLinearProgram, or an interface to CBC/GLPK, is
written is that when you compile Sage from source, the relevant part
concerning CBC/GLPK is not compiled together with the Sage library.
After you have compiled Sage and you have installed CBC or GLPK, you
also need to invoke the above command so that the relevant interface
to CBC/GLPK is updated to account for the newly installed library.

Someone recently emailed me about this as well. Here's my response, so
it's recorded somewhere for people to read:

--- begin transcript ---

> Is there a way in spkg-install to ask sage to rebuild itself
> after adding the packages ?

You could put the following line at the end of the installation script
spkg-install

$SAGE_LOCAL/bin/sage-build

The command "sage -b" invokes that script. I patched glpk-4.38.p4 with
this line. But no matter how much I tested out the patched GLPK spkg,
I would still need to do "./sage -b" to get Sage to build the GLPK
specific code. Putting the following line at the end of spkg-install
works

$SAGE_LOCAL/bin/sage-build "-b"

But this will actually rebuild the whole Sage library, which takes
much longer than if you do "./sage -b". Perhaps you could mention in
the documentation for the function/class that uses GLPK/CBC, asking
user to run "./sage -b" after installing any of these two spkg's.
People on the sage-devel mailing list might know of a better way to
patch spkg-install for GLPK or CBC.

-- 
Regards
Minh Van Nguyen

-- 
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-support
URL: http://www.sagemath.org

Reply via email to