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

Fix memleaks and brokenness of non-FLINT methods after #16803 #17094

Closed
jdemeyer opened this issue Oct 3, 2014 · 17 comments
Closed

Fix memleaks and brokenness of non-FLINT methods after #16803 #17094

jdemeyer opened this issue Oct 3, 2014 · 17 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Oct 3, 2014

non-FLINT methods are seriously broken after #16803:

sage: a = zero_matrix(QQ,3)
sage: b = identity_matrix(QQ,3)
sage: a.minpoly()
x
sage: b.minpoly()
x - 1
sage: a.minpoly('y')
y - 1

Also, using linbox or iml and modifying a matrix leaks memory:

sage: v = vector([0]*1000)
sage: M = identity_matrix(ZZ,1000)
sage: while True:           
....:    _ = M._solve_right_nonsingular_square(v)
....:    M[0,0] = 1
....:    print get_memory_usage()

Also, use type int for _hnf_mod() (anything larger than 2^31-1 isn't supported anyway).

Depends on #17090

CC: @mmasdeu @williamstein

Component: linear algebra

Author: Jeroen Demeyer

Branch/Commit: a8c707d

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/17094

@jdemeyer jdemeyer added this to the sage-6.4 milestone Oct 3, 2014
@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title Fix memleaks by using linbox after #16803 Fix memleaks by using non-FLINT methods after #16803 Oct 3, 2014
@jdemeyer
Copy link
Author

jdemeyer commented Oct 3, 2014

Author: Jeroen Demeyer

@jdemeyer
Copy link
Author

jdemeyer commented Oct 3, 2014

Dependencies: #17090

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title Fix memleaks by using non-FLINT methods after #16803 Fix memleaks and brokenness of non-FLINT methods after #16803 Oct 3, 2014
@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

jdemeyer commented Oct 3, 2014

Branch: u/jdemeyer/ticket/17094

@jdemeyer
Copy link
Author

jdemeyer commented Oct 3, 2014

Commit: a8c707d

@jdemeyer
Copy link
Author

jdemeyer commented Oct 3, 2014

Last 10 new commits:

9b31003Check 'implementation' argument
a2860d8Undo changes to padics from #16803
342d152Remove unneeded imports
95b431dPut back old multiplication code (as requested by William Stein)
5b77c78Restore doctest
7843e3fFix fmpz_mat_t declaration
192c8e6Missing comma between command-line arguments
9604069Merge commit '192c8e6f5c6e5f0bd0dd02d51b5f103924a408ef' into ticket/17090
c46a4d5Some reformatting
a8c707dFix initialization of matrices and fix _hnf_mod()

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:13

Found an easy example showing that there is really a problem in practice.

@vbraun
Copy link
Member

vbraun commented Oct 13, 2014

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Oct 14, 2014

Changed branch from u/jdemeyer/ticket/17094 to a8c707d

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

No branches or pull requests

2 participants