When I invoke a function like BIG=myfunction(somevars)
where BIG gets to ~50% of RAM in a concrete case, re-running that function again results in a memory error. If I release BIG first, say put BIG=0, then it works. However, looking at top, I can see that only about half of the memory allocated in the first call was actually released when I clobbered BIG. So in the second case the memory usage first dropped to about 25% of RAM and then ended at about 75% (and produced the correct result btw). My RAM is 4G so we are talking about 1G gone missing after BIG=0. I attach the memory failure report but I don't think it is really relevant here. Nothing was done before invoking myfunction(), except to load its definition. Of course it consists of lots of things calling each other, but the point here is that in the actual session, the only variable I hold on to is BIG itself. I think that releasing BIG should then involve a cascade of releasing the hidden variables. I wonder if the developers think this is a bug. From the user's point of view it is certainly strange that one cannot invoke the same function call twice in a row. Denis -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
/opt/Sage/sage-7.0/src/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.right_kernel_matrix (/opt/Sage/sage-7.0/src/build/cythonized/sage/matrix/matrix2.c:26391)() 3628 if M is None: 3629 try: -> 3630 format, M = self._right_kernel_matrix(algorithm=algorithm, proof=proof) 3631 except AttributeError: 3632 pass /opt/Sage/sage-7.0/src/sage/matrix/matrix_rational_dense.pyx in sage.matrix.matrix_rational_dense.Matrix_rational_dense._right_kernel_matrix (/opt/Sage/sage-7.0/src/build/cythonized/sage/matrix/matrix_rational_dense.c:14282)() 1283 else: 1284 A, _ = self._clear_denom() -> 1285 K = A._rational_kernel_iml().transpose().change_ring(QQ) 1286 verbose("done computing right kernel matrix over the rationals for %sx%s matrix" % (self.nrows(), self.ncols()),level=1, t=tm) 1287 return 'computed-iml-rational', K /opt/Sage/sage-7.0/src/sage/matrix/matrix_integer_dense.pyx in sage.matrix.matrix_integer_dense.Matrix_integer_dense._rational_kernel_iml (/opt/Sage/sage-7.0/src/build/cythonized/sage/matrix/matrix_integer_dense.c:31763)() 3647 cdef mpz_t *mp_N 3648 time = verbose('computing null space of %s x %s matrix using IML'%(self._nrows, self._ncols)) -> 3649 self._init_mpz() 3650 sig_on() 3651 dim = nullspaceMP(self._nrows, self._ncols, self._entries, &mp_N) /opt/Sage/sage-7.0/src/sage/matrix/matrix_integer_dense.pyx in sage.matrix.matrix_integer_dense.Matrix_integer_dense._init_mpz (/opt/Sage/sage-7.0/src/build/cythonized/sage/matrix/matrix_integer_dense.c:6207)() 223 return 0 224 else: --> 225 return self._init_mpz_impl() 226 227 cdef inline int _init_linbox(self) except -1: /opt/Sage/sage-7.0/src/sage/matrix/matrix_integer_dense.pyx in sage.matrix.matrix_integer_dense.Matrix_integer_dense._init_mpz_impl (/opt/Sage/sage-7.0/src/build/cythonized/sage/matrix/matrix_integer_dense.c:6421)() 241 if not self._entries: 242 sage_free(self._rows) --> 243 raise MemoryError 244 k = 0 245 for i in range(self._nrows): MemoryError: