#30147 closed defect (fixed)

Fix spkg-configure.m4 for sympow

Reported by: mkoeppe Owned by:
Priority: blocker Milestone: sage-9.2
Component: build: configure Keywords:
Cc: mjo, dimpase Merged in:
Authors: Dima Pasechnik Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 5286d60 (Commits, GitHub, GitLab) Commit: 5286d6046b413dfea0135c02d353f0f8275e00b1
Dependencies: Stopgaps:

Status badges

Description

#29673 (spkg-configure.m4 for sympow) accepts broken sympow versions on various systems, as noted on #29673, #3360

Change History (9)

comment:1 Changed 14 months ago by mkoeppe

Some of the failures look similar to #25856

comment:2 Changed 14 months ago by dimpase

one sees

2020-07-14T05:25:18.6994389Z sage -t src/sage/lfunctions/sympow.py
2020-07-14T05:25:18.6994604Z **********************************************************************
2020-07-14T05:25:18.6994830Z File "src/sage/lfunctions/sympow.py", line 277, in sage.lfunctions.sympow.Sympow.analytic_rank
2020-07-14T05:25:18.6995039Z Failed example:
2020-07-14T05:25:18.6995370Z     sympow.analytic_rank(EllipticCurve('11a'))
2020-07-14T05:25:18.6996565Z Exception raised:
2020-07-14T05:25:18.6996805Z     Traceback (most recent call last):
2020-07-14T05:25:26.5012311Z       File "/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 707, in _run
2020-07-14T05:25:26.5013186Z         self.compile_and_execute(example, compiler, test.globs)
2020-07-14T05:25:26.5013747Z       File "/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1132, in compile_and_execute
2020-07-14T05:25:26.5014157Z         exec(compiled, globs)
2020-07-14T05:25:26.5014450Z       File "<doctest sage.lfunctions.sympow.Sympow.analytic_rank[0]>", line 1, in <module>
2020-07-14T05:25:26.5014877Z         sympow.analytic_rank(EllipticCurve('11a'))
2020-07-14T05:25:26.5015341Z       File "/sage/local/lib/python3.7/site-packages/sage/lfunctions/sympow.py", line 299, in analytic_rank
2020-07-14T05:25:26.5015643Z         raise RuntimeError("failed to compute analytic rank")
2020-07-14T05:25:26.5015887Z     RuntimeError: failed to compute analytic rank
2020-07-14T05:25:26.5016143Z **********************************************************************
2020-07-14T05:25:26.5016410Z File "src/sage/lfunctions/sympow.py", line 281, in sage.lfunctions.sympow.Sympow.analytic_rank
2020-07-14T05:25:26.5016673Z Failed example:
2020-07-14T05:25:26.5017073Z     sympow.analytic_rank(EllipticCurve('389a'))
2020-07-14T05:25:26.5017336Z Exception raised:
2020-07-14T05:25:26.5017696Z     Traceback (most recent call last):
2020-07-14T05:25:26.5018072Z       File "/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 707, in _run
2020-07-14T05:25:26.5018323Z         self.compile_and_execute(example, compiler, test.globs)
2020-07-14T05:25:26.5018717Z       File "/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1132, in compile_and_execute
2020-07-14T05:25:26.5018959Z         exec(compiled, globs)
2020-07-14T05:25:26.5019187Z       File "<doctest sage.lfunctions.sympow.Sympow.analytic_rank[2]>", line 1, in <module>
2020-07-14T05:25:26.5019540Z         sympow.analytic_rank(EllipticCurve('389a'))
2020-07-14T05:25:26.5019937Z       File "/sage/local/lib/python3.7/site-packages/sage/lfunctions/sympow.py", line 299, in analytic_rank
2020-07-14T05:25:26.5020183Z         raise RuntimeError("failed to compute analytic rank")
2020-07-14T05:25:26.5020412Z     RuntimeError: failed to compute analytic rank
2020-07-14T05:25:26.5020633Z **********************************************************************
2020-07-14T05:25:26.5020872Z File "src/sage/lfunctions/sympow.py", line 285, in sage.lfunctions.sympow.Sympow.analytic_rank
2020-07-14T05:25:26.5021096Z Failed example:
2020-07-14T05:25:26.5021442Z     sympow.analytic_rank(EllipticCurve([1, -1, 0, -79, 289]))
2020-07-14T05:25:26.5021672Z Exception raised:
2020-07-14T05:25:26.5021884Z     Traceback (most recent call last):
2020-07-14T05:25:26.5022253Z       File "/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 707, in _run
2020-07-14T05:25:26.5022498Z         self.compile_and_execute(example, compiler, test.globs)
2020-07-14T05:25:26.5022889Z       File "/sage/local/lib/python3.7/site-packages/sage/doctest/forker.py", line 1132, in compile_and_execute
2020-07-14T05:25:26.5023126Z         exec(compiled, globs)
2020-07-14T05:25:26.5023354Z       File "<doctest sage.lfunctions.sympow.Sympow.analytic_rank[4]>", line 1, in <module>
2020-07-14T05:25:26.5023753Z         sympow.analytic_rank(EllipticCurve([Integer(1), -Integer(1), Integer(0), -Integer(79), Integer(289)]))
2020-07-14T05:25:26.5024160Z       File "/sage/local/lib/python3.7/site-packages/sage/lfunctions/sympow.py", line 299, in analytic_rank
2020-07-14T05:25:26.5024406Z         raise RuntimeError("failed to compute analytic rank")
2020-07-14T05:25:26.5024631Z     RuntimeError: failed to compute analytic rank
2020-07-14T05:25:26.5024853Z **********************************************************************

the last test can be done in spkg-configure.m4 by doing

$ sympow -curve [1,-1,0,-79,289] -analrank | grep ^"Analytic Rank is 4"
Analytic Rank is 4 : leading L-term 8.94385e+00
  • this is what I get on Debian 10, while on Fedora 30 I get a segfault.

So this is something easy to add

Last edited 14 months ago by dimpase (previous) (diff)

comment:3 Changed 14 months ago by mjo

We can fake a version check with e.g.

$ sympow -version | cut -c1
2

but your feature test is better if we only have to add one or two of them. The sage library already looks for the string "Analytic Rank is" so grepping for it is reasonable.

comment:4 Changed 14 months ago by dimpase

The segfault on Fedora 30 might be due to a file permission:

$ sympow -curve [1,-1,0,-79,289] -analrank
sympow 2.023.5 RELEASE  (c) Mark Watkins --- see README and COPYING for details
Minimal model of curve  is [1,-1,0,-79,289]
At 2: Inertia Group is  C1 MULTIPLICATIVE REDUCTION
At 117223: Inertia Group is  C1 MULTIPLICATIVE REDUCTION
Conductor is 234446
Creating /var/cache/sympow/datafiles/le64/m01EM.bin from /usr/share/sympow/datafiles/m01EM.txt
Segmentation fault (core dumped)

but on this box /var/cache/sympow/ is writable only for root, and there is no /var/cache/sympow/datafiles/.

comment:5 Changed 14 months ago by dimpase

  • Authors set to Dima Pasechnik
  • Branch set to u/dimpase/packages/sympow_fix
  • Commit set to 5286d6046b413dfea0135c02d353f0f8275e00b1

New commits:

5286d60check for broken sympow

comment:6 Changed 14 months ago by dimpase

  • Status changed from new to needs_review

works on Fedora 30 (recognised broken sympow) and Debian 10 (accepts good sympow).

comment:7 Changed 14 months ago by dimpase

the weird

sympow_rank_test=`echo "@<:@1,-1,0,-79,289@:>@" | sympow -analrank | grep ^"Analytic Rank is 4"`

is due to quoting hell - I couldn't find how to put in exactly the test from comment:2 - but this is minor.

comment:8 Changed 14 months ago by mkoeppe

  • Reviewers set to Matthias Koeppe
  • Status changed from needs_review to positive_review

comment:9 Changed 14 months ago by vbraun

  • Branch changed from u/dimpase/packages/sympow_fix to 5286d6046b413dfea0135c02d353f0f8275e00b1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.