Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging PariError: not enough memory on freebsd #66

Open
dimpase opened this issue Apr 14, 2018 · 1 comment
Open

debugging PariError: not enough memory on freebsd #66

dimpase opened this issue Apr 14, 2018 · 1 comment

Comments

@dimpase
Copy link
Member

dimpase commented Apr 14, 2018

On freebsd 11.1 and sage 8.2.rc2, (built with the default compiler (clang 4), I see many errors like

File "src/sage/rings/number_field/number_field.py", line 1520, in sage.rings.number_field.number_field.NumberField_generic.construction
Failed example:
    K.<a,b,c>=NumberField([x^3+x^2+1,x^2+1,x^7+x+1])
Exception raised:
    Traceback (most recent call last):
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 551, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 961, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.rings.number_field.number_field.NumberField_generic.construction[10]>", line 1, in <module>
        K = NumberField([x**Integer(3)+x**Integer(2)+Integer(1),x**Integer(2)+Integer(1),x**Integer(7)+x+Integer(1)], names=('a', 'b', 'c',)); (a, b, c,) = K._first_ngens(3)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/rings/number_field/number_field_rel.py", line 505, in _first_ngens
        v += tuple(map(self, self.base_field()._first_ngens(n - 1)))
      File "sage/structure/parent.pyx", line 920, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9734)
        return mor._call_(x)
      File "sage/structure/coerce_maps.pyx", line 145, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4555)
        raise
      File "sage/structure/coerce_maps.pyx", line 140, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4423)
        return C._element_constructor(x)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/rings/number_field/number_field_rel.py", line 1061, in _element_constructor_
        return NumberField_generic._element_constructor_(self, x, check=check)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/rings/number_field/number_field.py", line 1658, in _element_constructor_
        return self._coerce_from_other_number_field(x)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/rings/number_field/number_field_rel.py", line 816, in _coerce_from_other_number_field
        return self.__base_inclusion(x)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/rings/number_field/number_field_rel.py", line 1106, in __base_inclusion
        zk, czk = self._pari_nfzk()
      File "sage/misc/cachefunc.pyx", line 2377, in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:13430)
        self.cache = f(self._instance)
      File "/usr/home/dima/Sage/sage/local/lib/python2.7/site-packages/sage/rings/number_field/number_field_rel.py", line 1521, in _pari_nfzk
        return self._pari_base_nf()._nf_nfzk(self._pari_rnfeq())
      File "cypari2/gen.pyx", line 4025, in cypari2.gen.Gen._nf_nfzk
      File "cypari2/handle_error.pyx", line 196, in cypari2.handle_error._pari_err_handle
    PariError: not enough memory

However, building cypari with SAGE_CHECK=yes succeeds. Have I run into an untested part of cypari2, or it's actually not a problem with it?

@jdemeyer
Copy link
Collaborator

jdemeyer commented Jul 9, 2018

I don't think this is related to cypari2. Can you run the code under strace (does that exist for FreeBSD?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants