Ask Your Question

agrospel's profile - activity

2022-01-26 10:34:08 +0200 received badge  Notable Question (source)
2018-09-27 08:00:53 +0200 received badge  Nice Question (source)
2018-09-26 14:09:31 +0200 received badge  Popular Question (source)
2018-09-26 11:18:13 +0200 asked a question Memory leaks with matrix multiplication over GF(2)

Hello everyone,

I have memory leaks when I run this program:

#### Memory leaks with sage 8.3 and sage 8.1 !!!
n = 8
X = zero_vector(GF(2), n)
M = zero_matrix(GF(2), n, n)

for _ in range(10000000):
    Y = M * X

I use debian buster and sage-8.3-Debian_GNU_Linux_9-x86_64.

Is there something I'm doing wrong?

Thanks !

2016-04-18 16:39:17 +0200 received badge  Nice Question (source)
2016-04-15 23:57:18 +0200 asked a question Error with semi-definite program solver

Hello,

I use sage 7.1 on a debian computer. I am trying to use the sdp solver, but:

p = SemidefiniteProgram()
omega = p.new_variable()
p.set_objective(omega[0])
p.add_constraint(matrix(1,[1]) * omega[0] <= matrix(1,[1]))
p.add_constraint(matrix(1,[1]) * omega[1] <= matrix(1,[1]))
p.show()

returns an error:

ValueError: need more than 1 value to unpack

What does it mean?

Antoine

After some tests...

I don't understand what happens but here are some tests I have done:

The sdp solver works when I put all the variables in the objective. So it works with:

p = SemidefiniteProgram()
omega = p.new_variable()
p.set_objective(omega[0] + 0*omega[1])
p.add_constraint(matrix(1,[1]) * omega[0] <= matrix(1,[1]))
p.add_constraint(matrix(1,[1]) * omega[1] <= matrix(1,[1]))
p.show()

If I put the objective after the constraints I get the error again. For example with

p = SemidefiniteProgram()
omega = p.new_variable()
p.add_constraint(matrix(1,[1]) * omega[0] <= matrix(1,[1]))
p.add_constraint(matrix(1,[1]) * omega[1] <= matrix(1,[1]))
p.set_objective(omega[0] + 0*omega[1])
p.show()

I get the error

ValueError: need more than 1 value to unpack

To conclude it means that I need to know all the variables x I will use in my sdp and add 0*x to the objective. It works like that but if someone can explain me the error I would be happy !

Antoine

2016-04-01 10:39:13 +0200 answered a question Memory saturation when I test equalities in symbolic ring.

Thank you vdelecroix,

So this is a bug on sage-7.1 which has been fix on sage-7.2.beta1

2016-03-31 10:05:15 +0200 received badge  Editor (source)
2016-03-31 10:04:17 +0200 received badge  Student (source)
2016-03-31 10:04:01 +0200 asked a question Memory saturation when I test equalities in symbolic ring.

Hello,

I use sage 7.1 on a debian computer. I have a problem of memory when I test an equality in SR. It seems that sage does not free the memory used at the end of the test. For example with the programm:

a = sqrt(2)
while(true):
    if (a == 0):
        break

The memory used by sage grows and my computer crashes if I wait too long. There is no problem if I replace sqrt(2) by 1...

Is there something I am doing wrong? Antoine