How to change the default pari/sage

asked 2022-09-09 17:06:48 +0200

mabd gravatar image

updated 2022-09-09 17:11:31 +0200

Hi, and thank you for your hard work.

I downloaded sage 9.7/sourcecode over WSL/Ubunttu 20.04 and compiled and installed it. without problems. then working with pari. I noticed it is slower than usual.

I downloaded pari seperately and compiled it with ./Configure --tune --mt=pthread now it is faster. So I would like to change the default sage/pari to my new gp-sta pari How i can do this? Thank you

edit retag flag offensive close merge delete

Comments

The overall method would be to rebuild your version of Sage. First unpack the tarball into a new directory (don't overwrite the old one in case this experiment fails) and run ./configure, and read the output to make sure it is detecting and will use the version of pari you've installed. If things look good, then compile it.

John Palmieri gravatar imageJohn Palmieri ( 2022-09-09 19:51:35 +0200 )edit

Hi, thank you for your comment

1)There is no tar file for 9.7 I used git clone --branch develop https://github.com/sagemath/sage.git ---> so i should may be duplicate the sage/folder

2) sage didn't use the default os/pari

=========

over ubuntu i have three pari now

a) (os/pari) gp from anywhere will call an old GP/PARI CALCULATOR Version 2.11.2 ( compiled: Jul 12 2019)

b) (mine/pari) a new pari that i compiled with --tune --mt=pthread i called from inside its folder using

./gp

c) (sage/pari) from pari shell

sage --sh

gp

this is the not optimal used by sage

===========

can i replace the sage/pari files with the gp-sta (the new one)

PS: Both b and c have been ccompiled by the same local compiler

==========

it is painfull to recompile sage it took 6 hours

mabd gravatar imagemabd ( 2022-09-10 10:32:15 +0200 )edit

You should create a new git clone and try with that one. Also, read the output from ./configure, which is recorded in the file config.log: there will be a section marked "## Checking whether SageMath should install SPKG pari... ##". Read what it says. I am not a pari expert or a configure expert, but it looks like, from the file build/pkgs/pari/spkg-configure.m4, that Sage needs pari but also libpari, pari_elldata, pari_galdata, and some other packages. Again, read the output from ./configure to see if anything is missing.

John Palmieri gravatar imageJohn Palmieri ( 2022-09-10 20:21:14 +0200 )edit

To speed up the build process, did you read README.md? Step 10 describes how to build in parallel, and this can speed things up greatly.

John Palmieri gravatar imageJohn Palmieri ( 2022-09-10 20:23:00 +0200 )edit

If Sage insists on building its own pari, then you can pass configure options to it by setting the environment variable PARI_CONFIGURE. You could conceivably try setting SAGE_TUNE_PARIto "yes": search for these variables in https://doc.sagemath.org/html/en/inst....

John Palmieri gravatar imageJohn Palmieri ( 2022-09-10 20:25:30 +0200 )edit