conda-forge / sagelib-feedstock

A conda-smithy repository for sagelib.
BSD 3-Clause "New" or "Revised" License
4 stars 8 forks source link

sagelib=9.3 does not work with latest pari #135

Open saraedum opened 2 years ago

saraedum commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

@videlec reported:

In a conda environment with sagelib=9.3 it is impossible to import sage.modular.multiple_zeta_values in sage. The reason is a mismatch of signature of the pari function zetamultall. Should we downgrade pari for that specific sage version?

Installed packages

(unknown)

Environment info

(unknown)
videlec commented 2 years ago

A one line command to reproduce the bug in the conda environment

$ sage -c 'import sage.modular.multiple_zeta'
Traceback (most recent call last):
  File "sage/misc/cachefunc.pyx", line 996, in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:5970)
  File "sage/misc/weak_dict.pyx", line 704, in sage.misc.weak_dict.WeakValueDictionary.__getitem__ (build/cythonized/sage/misc/weak_dict.c:3724)
KeyError: ((<class 'sage.modular.multiple_zeta.MultizetaValues'>,), ())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vincent/miniconda3/envs/sage-9.3-test/bin/sage-eval", line 10, in <module>
    eval(compile(s,'<cmdline>','exec'))
  File "<cmdline>", line 1, in <module>
  File "/home/vincent/miniconda3/envs/sage-9.3-test/lib/python3.9/site-packages/sage/modular/multiple_zeta.py", line 548, in <module>
    Values = MultizetaValues()
  File "sage/misc/classcall_metaclass.pyx", line 322, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1751)
  File "sage/misc/cachefunc.pyx", line 1001, in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:6098)
  File "/home/vincent/miniconda3/envs/sage-9.3-test/lib/python3.9/site-packages/sage/structure/unique_representation.py", line 1007, in __classcall__
    instance = typecall(cls, *args, **options)
  File "sage/misc/classcall_metaclass.pyx", line 486, in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:2215)
  File "/home/vincent/miniconda3/envs/sage-9.3-test/lib/python3.9/site-packages/sage/modular/multiple_zeta.py", line 430, in __init__
    self.reset()
  File "/home/vincent/miniconda3/envs/sage-9.3-test/lib/python3.9/site-packages/sage/modular/multiple_zeta.py", line 461, in reset
    self._data = pari.zetamultall(self.max_weight, self.prec)
  File "cypari2/auto_instance.pxi", line 35275, in cypari2.pari_instance.Pari_auto.zetamultall
  File "cypari2/handle_error.pyx", line 213, in cypari2.handle_error._pari_err_handle
cypari2.handle_error.PariError: invalid flag in zetamultall

Installed packages

# packages in environment at /home/vincent/miniconda3/envs/sage-9.3-test:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
arb                       2.19.0               h7e34412_1    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py39hb9d737c_2    conda-forge
arpack                    3.7.0                hdefa2d7_2    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bdw-gc                    8.0.6                h4bd325d_0    conda-forge
beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
bleach                    5.0.0              pyhd8ed1ab_0    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
cddlib                    1!0.94m              h9202a9a_0    conda-forge
cffi                      1.15.0           py39h4bc2ebd_0    conda-forge
cliquer                   1.22                 h516909a_0    conda-forge
cypari2                   2.1.2            py39heacb60e_5    conda-forge
cysignals                 1.11.2           py39hadcdca9_0    conda-forge
cython                    0.29.28          py39h5a03fae_2    conda-forge
debugpy                   1.6.0            py39h5a03fae_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
ecl                       21.2.1               h9d73b02_2    conda-forge
eclib                     20210503             h717840f_2    conda-forge
ecm                       7.0.4             he80fd80_1002    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
expat                     2.4.8                h27087fc_0    conda-forge
fflas-ffpack              2.4.3                h912ac81_2    conda-forge
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               h8e229c2_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
future                    0.18.2           py39hf3d152e_5    conda-forge
gap-core                  4.11.1               h1725ef4_3    conda-forge
gf2x                      1.3.0                h5586051_1    conda-forge
giac                      1.6.0.47             haa4998e_5    conda-forge
giflib                    5.2.1                h516909a_2    conda-forge
givaro                    4.1.1                h192cbe9_1    conda-forge
glpk                      4.65              h9202a9a_1004    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmpy2                     2.1.2            py39h78fa15d_0    conda-forge
gsl                       2.7                  he838d99_0    conda-forge
icu                       70.1                 h27087fc_0    conda-forge
igraph                    0.9.8                hf5496dd_0    conda-forge
iml                       1.0.5             hd75c201_1003    conda-forge
importlib-metadata        4.11.3           py39hf3d152e_1    conda-forge
importlib_resources       5.7.1              pyhd8ed1ab_0    conda-forge
ipykernel                 6.13.0           py39hef51801_0    conda-forge
ipython                   7.32.0           py39hf3d152e_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.7.0              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jedi                      0.18.1           py39hf3d152e_1    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   h166bdaf_1    conda-forge
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter_client            7.2.2              pyhd8ed1ab_1    conda-forge
jupyter_core              4.9.2            py39hf3d152e_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.1.0              pyhd8ed1ab_0    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.19.3               h08a2579_0    conda-forge
lcalc                     1.23              h8cd7e2e_1006    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      3.0                  h9c3ff4c_0    conda-forge
libblas                   3.9.0           14_linux64_openblas    conda-forge
libbraiding               1.1                  he1b5a44_0    conda-forge
libbrial                  1.2.10               hb0536f6_0    conda-forge
libcblas                  3.9.0           14_linux64_openblas    conda-forge
libcurl                   7.82.0               h2283fc2_0    conda-forge
libdeflate                1.10                 h7f98852_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflint                  2.7.1           hd3cd37b_ntl_102    conda-forge
libgcc-ng                 11.2.0              h1d223b6_16    conda-forge
libgd                     2.3.3                h18fbbfe_3    conda-forge
libgfortran-ng            11.2.0              h69a702a_16    conda-forge
libgfortran5              11.2.0              h5c6108e_16    conda-forge
libgomp                   11.2.0              h1d223b6_16    conda-forge
libhomfly                 1.02r6               h516909a_0    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           14_linux64_openblas    conda-forge
liblapacke                3.9.0           14_linux64_openblas    conda-forge
libnghttp2                1.47.0               he49606f_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libopenblas               0.3.20          pthreads_h78a6416_0    conda-forge
libpng                    1.6.37               hed695b0_2    conda-forge
libsodium                 1.0.18               h516909a_1    conda-forge
libssh2                   1.10.0               ha35d2d1_2    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_16    conda-forge
libtiff                   4.3.0                h542a066_3    conda-forge
libuuid                   2.32.1            h14c3975_1000    conda-forge
libwebp                   1.2.2                h3452ae3_0    conda-forge
libwebp-base              1.2.2                h7f98852_1    conda-forge
libxml2                   2.9.13               h22db469_0    conda-forge
libzlib                   1.2.11            h166bdaf_1014    conda-forge
linbox                    1.6.3                h120243f_5    conda-forge
lrcalc                    1.2               hf484d3e_1000    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
m4ri                      20140914          he06d7ca_1005    conda-forge
m4rie                     20150908          he06d7ca_1001    conda-forge
markupsafe                2.1.1            py39hb9d737c_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
metis                     5.1.0             he1b5a44_1006    conda-forge
mistune                   0.8.4           py39h3811e60_1005    conda-forge
mpc                       1.2.1                h9f54685_0    conda-forge
mpfi                      1.5.4             hb20f59a_1001    conda-forge
mpfr                      4.1.0                h9202a9a_1    conda-forge
nauty                     2.7.2                h7f98852_0    conda-forge
nbclient                  0.6.0              pyhd8ed1ab_0    conda-forge
nbconvert                 6.5.0              pyhd8ed1ab_0    conda-forge
nbconvert-core            6.5.0              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          6.5.0              pyhd8ed1ab_0    conda-forge
nbformat                  5.3.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
nest-asyncio              1.5.5              pyhd8ed1ab_0    conda-forge
notebook                  6.4.11             pyha770c72_0    conda-forge
ntl                       11.4.3               hef3c4d3_1    conda-forge
numpy                     1.22.3           py39h18676bf_2    conda-forge
openssl                   3.0.2                h166bdaf_1    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandoc                    2.18                 ha770c72_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
pari                      2.13.3          he2feae2_1_pthread    conda-forge
pari-galdata              0.0.20180411                  0    conda-forge
pari-seadata-small        0.0.20090618                  0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
perl                      5.32.1          2_h7f98852_perl5    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5           py39hde42818_1002    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
planarity                 3.0.0.5           h516909a_1002    conda-forge
ppl                       1.2               h8c76519_1005    conda-forge
pplpy                     0.8.6            py39h68068d8_1    conda-forge
prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.29             pyha770c72_0    conda-forge
psutil                    5.9.0            py39hb9d737c_1    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.11.2             pyhd8ed1ab_0    conda-forge
pynac                     0.7.27           py39hdf45853_3    conda-forge
pyparsing                 3.0.8              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py39hb9d737c_1    conda-forge
python                    3.9.12          h2660328_1_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.15.3             pyhd8ed1ab_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pyzmq                     22.3.0           py39headdf64_2    conda-forge
ratpoints                 2.1.3             he80fd80_1002    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
rw                        0.9                  h7f98852_0    conda-forge
sage-docbuild             9.3                      pypi_0    pypi
sagelib                   9.3              py39hc901c0d_6    conda-forge
sagemath-standard         9.3                      pypi_0    pypi
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                62.1.0           py39hf3d152e_0    conda-forge
singular                  4.2.0.p3             h8b94468_1    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
soupsieve                 2.3.1              pyhd8ed1ab_0    conda-forge
sqlite                    3.38.2               h4ff8645_0    conda-forge
suitesparse               5.10.1               h9e50725_1    conda-forge
symmetrica                2.0               he1b5a44_1007    conda-forge
tbb                       2021.5.0             h924138e_1    conda-forge
terminado                 0.13.3           py39hf3d152e_1    conda-forge
tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tornado                   6.1              py39hb9d737c_3    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.6.0            py39hf3d152e_0    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.8.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h166bdaf_1014    conda-forge
zn_poly                   0.9.2                he80fd80_0    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge
videlec commented 2 years ago

After the downgrade

$ mamba install pari=2.11.4

which ended up modifying

  Package      Version  Build               Channel                    Size
─────────────────────────────────────────────────────────────────────────────
  Change:
─────────────────────────────────────────────────────────────────────────────

  cypari2        2.1.2  py39heacb60e_5      installed                      
  cypari2        2.1.2  py39h2f51505_0      conda-forge/linux-64     Cached
  eclib       20210503  h717840f_2          installed                      
  eclib       20210503  h1af40b0_0          conda-forge/linux-64     Cached
  giac        1.6.0.47  haa4998e_5          installed                      
  giac        1.6.0.47  hcddaa8f_0          conda-forge/linux-64     Cached
  krb5          1.19.3  h08a2579_0          installed                      
  krb5          1.19.3  h3790be6_0          conda-forge/linux-64     Cached
  lcalc           1.23  h8cd7e2e_1006       installed                      
  lcalc           1.23  hab5a3d0_1004       conda-forge/linux-64     Cached
  libcurl       7.82.0  h2283fc2_0          installed                      
  libcurl       7.82.0  h7bff187_0          conda-forge/linux-64     Cached
  libnghttp2    1.47.0  he49606f_0          installed                      
  libnghttp2    1.47.0  h727a467_0          conda-forge/linux-64     Cached
  libssh2       1.10.0  ha35d2d1_2          installed                      
  libssh2       1.10.0  ha56f1ee_2          conda-forge/linux-64     Cached
  python        3.9.12  h2660328_1_cpython  installed                      
  python        3.9.12  h9a8a25e_1_cpython  conda-forge/linux-64      27 MB
  sagelib          9.3  py39hc901c0d_6      installed                      
  sagelib          9.3  py39h2934941_4      conda-forge/linux-64     Cached

  Downgrade:
─────────────────────────────────────────────────────────────────────────────

  cysignals     1.11.2  py39hadcdca9_0      installed                      
  cysignals     1.10.3  py39h5c6a8d5_0      conda-forge/linux-64     Cached
  gsl              2.7  he838d99_0          installed                      
  gsl              2.6  he838d99_2          conda-forge/linux-64     Cached
  openssl        3.0.2  h166bdaf_1          installed                      
  openssl       1.1.1n  h166bdaf_0          conda-forge/linux-64     Cached
  pari          2.13.3  he2feae2_1_pthread  installed                      
  pari          2.11.4  hddaffa3_2          conda-forge/linux-64     Cached

The sage.modular.multiple_zeta works again.

isuruf commented 2 years ago

Only sage 9.3 has this issue?

videlec commented 2 years ago
saraedum commented 2 years ago

The builds 5 and 6 of sagelib=9.3 are affected. Since sagelib use pari in host, there is a run requirement with the same version that was used during build which is 2.13 for build 5 and 6.

Fixing this is a bit complicated since just patching pari to 2.11 in the metadata will require cypari2 to downgrade the build number which requires cysignals to downgrade which is not going to work.

@isuruf, I think we should mark build 5 and 6 as broken.

What do you think? Is that something you could do, or should I request that somewhere?

isuruf commented 2 years ago

See https://github.com/conda-forge/admin-requests