Opened 6 years ago

Closed 6 years ago

#21810 closed enhancement (fixed)

Move calculation of PARI stack size out of __init__

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-7.5
Component: interfaces Keywords: atelierpari2017
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Luca De Feo
Report Upstream: N/A Work issues:
Branch: 9374bbe (Commits, GitHub, GitLab) Commit: 9374bbece6ba110b5e276db42779d1128d6e2672
Dependencies: #21806 Stopgaps:

Status badges

Description

Move the calculation of the PARI stack sizes out of PariInstance.__init__ and require a size and vsize argument in the __init__ call.

Change History (14)

comment:1 Changed 6 years ago by Jeroen Demeyer

Dependencies: #21820

comment:2 Changed 6 years ago by Jeroen Demeyer

Dependencies: #21820#21806

comment:3 Changed 6 years ago by Jeroen Demeyer

Authors: Jeroen Demeyer

I'll do this when #21806 has positive_review.

comment:4 Changed 6 years ago by Jeroen Demeyer

Branch: u/jdemeyer/move_calculation_of_pari_stack_size_out_of___init__

comment:5 Changed 6 years ago by Jeroen Demeyer

Commit: 9374bbece6ba110b5e276db42779d1128d6e2672
Status: newneeds_review

New commits:

061467fAllow the PariInstance object to be allocated multiple times.
aa6e5ddRemoved trailing withespaces
9df4382Move initialization of PARI to PariInstance.__cinit__
c2d09afImprove documentation of _close()
4b81781Move _close() method right after __init__()
80d4098Typo
b70450dImprove documentation of _close()
9374bbeMove calculation of PARI stack size out of PariInstance

comment:6 Changed 6 years ago by Jeroen Demeyer

Keywords: atelierpari2017 added

comment:7 Changed 6 years ago by Luca De Feo

Status: needs_reviewpositive_review

All tests pass

comment:8 Changed 6 years ago by Luca De Feo

Reviewers: Luca De Feo

comment:9 Changed 6 years ago by Volker Braun

Status: positive_reviewneeds_work

seems to conflict with one of teh other pari tickets

Error compiling Cython file:
------------------------------------------------------------
...
#*****************************************************************************

include "sage/libs/linkages/padics/mpz.pxi"
include "FP_template.pxi"

from sage.libs.cypari2.pari_instance cimport pari_instance as pari
^
------------------------------------------------------------

sage/rings/padics/padic_floating_point_element.pyx:24:0: 'sage/libs/cypari2/pari_instance/pari_instance.pxd' not found
Traceback (most recent call last):
  File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 1074, in cythonize_one_helper
    return cythonize_one(*m)
  File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 1056, in cythonize_one
    raise CompileError(None, pyx_file)
CompileError: sage/rings/padics/padic_floating_point_element.pyx

comment:10 in reply to:  9 Changed 6 years ago by Jeroen Demeyer

Replying to vbraun:

seems to conflict with one of teh other pari tickets

We took care to make the various PARI tickets conflict-free (indeed, all those tickets are merged together in #22183 for example). There might be a conflict with a different ticket though...

comment:11 Changed 6 years ago by Jeroen Demeyer

The conflict is due to #20348. I suggest to wait until #20348 is closed and then merge it in this branch.

Last edited 6 years ago by Jeroen Demeyer (previous) (diff)

comment:12 Changed 6 years ago by Jeroen Demeyer

Status: needs_workpositive_review

comment:13 Changed 6 years ago by Jeroen Demeyer

#20348 needs work anyway and I asked them to change the pari import to be compatible with this ticket here.

comment:14 Changed 6 years ago by Volker Braun

Branch: u/jdemeyer/move_calculation_of_pari_stack_size_out_of___init__9374bbece6ba110b5e276db42779d1128d6e2672
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.