Yes, it raises interest.
> now that giac has about the same timings than magma for
> GCD...
We have all run into some problems trying to build the source code you
posted here:
http://xcas.svn.sourceforge.net/viewvc/xcas/
I wonder if you might use the account I gave you on
redhawk.math.washington.edu (username: parisse) to
update giac so that it will build fine on there. It would also be
nice if you could login to redhawk.math.washington.edu (same
credentials as I gave you for sage.math -- I made an account for you),
go to /scratch/ make yourself a directory, and build giac there as
well, then checkin any changes needed to do the build to your svn
repo. Let me know what you need me to apt-get install.
Thanks!
-- William
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
Hi,
Is your factoring code (and corresponding benchmarks) multithreaded?
I just wanted to add that we had no trouble at all building a giac
package for Sage using your release 0.9.0 version of Giac. So
whatever you were doing for that build was good.
In case you're curious, the giac-0.9.0 I made is here:
http://sage.math.washington.edu/home/wstein/tmp/giac-0.9.0.spkg
It's just a bzip2'd tarball:
tar jxvf giac-0.9.0.spkg
to see inside.
I'm *REALLY*, really, really confused about which tarball is the
source code for the
latest version of giac. Just to clarify, please send me a direct link
in email here, please.
Thanks!
> I'm on vacation with low
> Internet bandwith, I will give you more feedback on your giac spkg
> later, what does it do currently? Build giac inside sage but no
> interface from sage prompt I guess?
>
> --
> 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
After installing enough latex packages so that the docs seemed to
build, my build still fails here:
...
make[3]: Entering directory
`/scratch/wstein/build/sage-4.4.4/spkg/build/giac-2010-07-17/src/doc'
make install-exec-hook
make[4]: Entering directory
`/scratch/wstein/build/sage-4.4.4/spkg/build/giac-2010-07-17/src/doc'
/bin/bash /scratch/wstein/build/sage-4.4.4/spkg/build/giac-2010-07-17/src/config/install-sh
-d /scratch/wstein/build/sage-4.4.4/local/shar
e/giac/doc/dxcas
/bin/bash /scratch/wstein/build/sage-4.4.4/spkg/build/giac-2010-07-17/src/config/install-sh
-d /scratch/wstein/build/sage-4.4.4/local/shar
e/giac/doc//pari
/usr/bin/install -c -m 644 ../doc/dxcas/*
/scratch/wstein/build/sage-4.4.4/local/share/giac/doc/dxcas
/usr/bin/install -c -m 644 ../doc/pari/*
/scratch/wstein/build/sage-4.4.4/local/share/giac/doc/pari
ln -s ../aide_cas /scratch/wstein/build/sage-4.4.4/local/share/giac/doc/aide_cas
ln: creating symbolic link
`/scratch/wstein/build/sage-4.4.4/local/share/giac/doc/aide_cas': File
exists
make[4]: *** [install-exec-hook] Error 1
make[4]: Leaving directory
`/scratch/wstein/build/sage-4.4.4/spkg/build/giac-2010-07-
----
I manually deleted the relevant file
/scratch/wstein/build/sage-4.4.4/local/share/giac/doc/aide_cas
and was able to get the build to finish. So very close to "works first try".
How do I surpress printing when using giac? E.g., how do I keep giac
from printing massive amounts when I do:
8>> f1:=(x+y+z+1)^20+1; p1:=normal(f1*(f1+1));
9>> factor(p1);
By the way, I tried the above and it took only 0.63 seconds, which is
very impressive (!). It's much faster than Sage-4.4.4 and Magma.
sage: R.<x,y,z> = QQ[]
sage: f1 = (x+y+z+1)^20+1; p1=f1*(f1+1)
sage: time a = p1.factor()
CPU times: user 19.65 s, sys: 0.00 s, total: 19.65 s
Wall time: 19.68 s
sage: k=magma(p1)
sage: magma.eval('time a := Factorization(%s);'%k.name())
'Time: 9.480'
I put my experimental giac spkg here:
http://sage.math.washington.edu/home/wstein/patches/giac-20100717.spkg
To build it you have to "sage -f -m giac-20100717". Then "sage -sh",
then delete the file it complains about (repeat, lather), type "make
install", etc.
Note that there are a *ton* of system-wide dependencies needed to get
these to build.
I installed them all on redhawk.math.washington.edu, which
sagemath-users have access
to.
Anyway, the cool thing is that this package is possible to build, and
does let one replicate Parisse's benchmarks with something built from
source (not a binary). Cool.
William
--
Nope, that's all it is. spkg's are really simple.
-- William
Hi,
Please remark the spkg so when you type
tar jxvf giac.spkg
you get a directory named "giac". This is a requirement of the spkg
format, which
I forgot to mention. It's also a good idea to name the package with
a version, e.g.,
giac-20100719.spkg, in which case it would extract to giac-20100719.
I didn't expect your spkg to just work for me after the above rename,
so I wrote some stuff about debugging below. However, it turns out
your package *did* just 100% work for me! Thanks!
Could you post a very, very simple example C program that uses
libgiac.so to create a polynomial and factor it? That would be
helpful, in evaluating how giac could be used from Python most
efficiently.
--------------------------------------------------------------------------
It would be very helpful if you could:
(1) install Sage, then
(2) type
./sage -i giac.spkg
and fix the mistakes until it works.
Some hints:
- In order to make an spkg, the best thing to do is put the spkg in
a directory, say giac-20100719,
then do
sage -pkg giac-20100719
This is important. For example, your giac.spkg extracts to a
directory giac_spkg, which unfortunately won't work. The name of the
directory *must* be everything before spkg.
After fixing that, the next thing that breaks is:
- In order to try to fix this, I would type "sage -sh", then navigate to
SAGE_ROOT/spkg/build/giac-20100719/src
Doing "sage -sh" sets up the environment to be just as it was when
spkg-install was run.
I hope this helps. Don't hesitate to ask further questions, and also
note this page:
http://sagemath.org/doc/developer/producing_spkgs.html
entitled "Producing New Sage Packages".
-- William
-
> (I also updated the benchmarks page
> http://www-fourier.ujf-grenoble.fr/~parisse/giac/benchmarks/benchmarks.html).
>
> --
> 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
>
--
Why? You just have to:
(1) install sage
(2) type "./sage -i giac-0.9.0.spkg
Note that the package name must have the format:
package_name-version_number.spkg
Note that "-'.
If you want me to be giac user, I hope it isn't too much to ask that
you be a Sage user :-).
> Please note that the CXXFLAGS I gave are correct for x64 linux only,
> is there a way to specify it in the spkg-install file (something like
> #ifdef __x86_64__ in C++?
Not easily. It's just shell script though, so...
>> Could you post a very, very simple example C program that uses
>> libgiac.so to create a polynomial and factor it? That would be
>> helpful, in evaluating how giac could be used from Python most
>> efficiently.
>>
> I don't have a C interface, here is one in C++ using symbolic format.
No problem, C++ is great.
> One could also directly use giac polynomial, but probably the symbolic
> format is better for a Python interface. Most giac user commands have
> an equivalent in C++ with a _ as prefix, a first argument that is the
> argument of the giac user function or a vector of these arguments (if
> multiargs) and a second argument which is a context pointer (this
> makes possible to have independant sessions with one running kernel,
> each session with it's own context pointer).
>
> // -*- compile-command: "g++ -g example_factor.cc -lgiac -lgmp" -*-
> #include <giac/giac.h>
>
> using namespace std;
> using namespace giac;
>
> int main(){
> cout << "Enter expression " ;
> string s;
> cin >> s; // or define e.g. string s("x^4-y^4")
> cout << s << endl;
> giac::context ct;
> gen c(s,&ct);
> c=eval(c,1,&ct);
> cout << "Factor :" << _factor(c,&ct) << endl;
> return 0;
> }
>
Thanks! That will be very helpful.
I understand. I think this explains why it would also be hard for
you to work on another remote computer, e.g.,
sage.math.washington.edu. I assume that even if you have account
there, typing is too slow to be useful.
>
>> If you want me to be giac user, I hope it isn't too much to ask that
>> you be a Sage user :-).
>>
>
> Of course, I will certainly install it next time I have a good
> Internet connection.
>
>> > Please note that the CXXFLAGS I gave are correct for x64 linux only,
>> > is there a way to specify it in the spkg-install file (something like
>> > #ifdef __x86_64__ in C++?
>>
>> Not easily. It's just shell script though, so...
>>
>
> Then, until someone finds a trick to do so, I will disable the flag
> for 32 bits (disabling SMARTPTR64 will cause sizeof(gen) to be 16
> instead of 8 that will slow some operations because more memory will
> be needed). I have also renamed giac_0...spkg to giac-0...
Thanks!
Is there any chance you could write an email explaining the basic
ideas behind your new factorization implementation? I'm just curious
what goes into it. Even something along the lines of this page would
be nice:
http://magma.maths.usyd.edu.au/magma/htmlhelp/text315.htm
-- William