Opened 7 years ago

Last modified 4 years ago

#15809 needs_work enhancement

Compile Denis Simon's scripts with gp2c

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-wishlist
Component: interfaces Keywords:
Cc: embray Merged in:
Authors: Jeroen Demeyer Reviewers:
Report Upstream: N/A Work issues:
Branch: u/jdemeyer/ticket/15809 (Commits) Commit: 86ef8147702939e0deb427a98c5de296a5b4074b
Dependencies: #18874, #19860 Stopgaps:

Description (last modified by jdemeyer)

After merging Simon's scripts into one script, they are turned into C code by gp2c, which is then compiled into the Sage <-> PARI library interface.

Using them is exactly the same as using other PARI functions:

sage: EllipticCurve("389a1")._pari_().ellrank()
[2, 2, [[1/16, -9/64], [5/4, 5/8]]]

The focus of this ticket is really on making a general mechanism, not so much on Simon's scripts (in particular, simon_two_descent has not been changed). It should be very easy to add new scripts in the future.

Change History (14)

comment:1 Changed 7 years ago by jdemeyer

  • Component changed from PLEASE CHANGE to interfaces
  • Type changed from PLEASE CHANGE to enhancement

comment:2 Changed 7 years ago by jdemeyer

Are we sure that this would yield a significant speed-up? I have not profiled this at all, but if most of the time is spent in PARI functions like bnfinit(), then gp2c will not help.

comment:3 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 6 years ago by jdemeyer

  • Dependencies changed from #11005 to #258

comment:6 Changed 6 years ago by jdemeyer

  • Dependencies changed from #258 to #258, #18874

comment:7 Changed 6 years ago by jdemeyer

  • Dependencies changed from #258, #18874 to #258, #18874, #18583

comment:8 Changed 6 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/15809

comment:9 Changed 6 years ago by git

  • Commit set to 9322e17de2e26c31121e31890b56637c51a62aa9

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

a6e0513Remove duplicate global variables
e7cdb76Add a gp2c optional package
fbd976eAdd fixes for PARI 2.8
2daa9aeAdd a patch to fix global()
ad14931Merge commit '2daa9ae692d1f1fc2d1799aec0b57cae76022e41'; commit 'd9c97acc74bebfb486d55a9e35263851f42e6845' into t/18874/fix_braces_in_simon_scripts
9322e17Compile Denis Simon's scripts with gp2c

comment:10 Changed 6 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Description modified (diff)
  • Milestone changed from sage-6.4 to sage-6.8
  • Status changed from new to needs_review

comment:11 Changed 5 years ago by git

  • Commit changed from 9322e17de2e26c31121e31890b56637c51a62aa9 to c00347845a67fa0e6996dad577f3707f198876a2

Branch pushed to git repo; I updated commit sha1. New commits:

3f5fed2Merge tag '6.9.beta3' into t/15809/ticket/15809
122c0daUpgrade GP2C
c003478Merge branch 't/19860/upgrade_gp2c_optional_package' into t/15809/ticket/15809

comment:12 Changed 5 years ago by jdemeyer

  • Dependencies changed from #258, #18874, #18583 to #18874, #19860

comment:13 Changed 5 years ago by git

  • Commit changed from c00347845a67fa0e6996dad577f3707f198876a2 to 86ef8147702939e0deb427a98c5de296a5b4074b

Branch pushed to git repo; I updated commit sha1. New commits:

86ef814Minor changes

comment:14 Changed 4 years ago by embray

  • Cc embray added
  • Milestone changed from sage-6.8 to sage-wishlist
  • Status changed from needs_review to needs_work

Obviously needs to be reworked insofar as how the build steps fit in, but looks like a good idea otherwise. It would also be good to incorporate Tim Dokchitser's script src/ext/pari/dokchitser/computel.gp. This would probably enable rewriting sage.lfunctions.dokchitser to use the pari interface instead of gp+pexpect; see #22718.

I might take a stab at this if Jeroen doesn't get a chance first.

Note: See TracTickets for help on using tickets.