[sage-devel] memory management issue: deleted variables not released

2016-05-11 Thread Denis

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: 


[sage-devel] Re: memory management issue: deleted variables not released

2016-05-11 Thread Denis

Sorry, forgot to mention: all this is happening under Sage 7.0. Under 7.1 
it is much worse, I get a silent "Memory exhausted" crash the FIRST time 
round, without a report. So it seems something really broke between 7.0 and 
7.1.

-- 
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.


[sage-devel] Re: memory management issue: deleted variables not released

2016-05-12 Thread Denis

Thanks for the suggestions, I will try to do that. In the meantime, I tried 
7.1 on a machine with 100G of RAM. Now it works, but it costs me 4.3 G of 
RAM the first time round - that is the same calculation which used 1G in 
7.0. Re-running it a few times with or without clobbering BIG - I am not 
being precise here - shows a steady creep upwards of RAM use in huge 
chunks, e.g. it climbed to 7G during the third calculation but dropped to 
5.7 when it ended and stayed there after clobbering.

I would like to use 7.0 on the 100G machine because I am planning some much 
bigger calculations and cannot afford this factor of 4 in memory use, but 
the tarball is not found among the old sources - did someone forget to put 
it there?

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.


[sage-devel] Re: memory management issue: deleted variables not released

2016-05-12 Thread Denis

Sorry for the stupid question - I did not realize that some old sources are 
to be found among the new sources :)

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.


[sage-devel] Re: memory management issue: deleted variables not released

2016-09-09 Thread Denis

As far as I am concerned, development of Sage stopped at 7.0 - I tried 7.3 
yesterday, and could not do a mid-level benchmark calculation, which I have 
been repeating since at least 6.4. The problem is a memory fault. 7.0 is 
the last version with which I can do it. I am prepared to collaborate with 
any developer who is prepared to go after this bug seriously. The 
calculation involves some manipulations over polynomial rings in nine 
variables. The largest object is a 3838x3838 dense matrix. My own coding is 
modest, just a bunch of small functions calling each other and invoking 
user-level Sage routines.

-- 
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.


[sage-devel] Re: memory management issue: deleted variables not released

2016-09-11 Thread Denis
Thanks for the idea to post the example on the cloud. I will try to do 
that, but can't begin before Sept. 20.

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.


[sage-devel] Re: memory management issue: deleted variables not released

2016-09-21 Thread Denis

I tried to reproduce the issue in the cloud, but it cannot do it with the 
default settings. Although I can check that my code works, the benchmark 
calculation cannot complete because of the limitations of the free account. 
To make a realistic comparison I need 4G of RAM and unlimited timeout (on 
my laptop it completes in ~10 min with an Intel i7 but I do not know into 
how many CPU shares that translates). If anyone can arrange this for me 
please inform me.

-- 
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.


Re: [sage-devel] Re: memory management issue: deleted variables not released

2016-09-27 Thread Denis

Tried but it didn't work out. MathCloud admins say they can't help. Tried 
also at SageCell but the calculation wouldn't end either way after several 
hours. Any ideas?

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.


Re: [sage-devel] Re: memory management issue: deleted variables not released

2016-09-28 Thread Denis

Jonathan, thank you for this thoughtful analysis. With a really simple 
function, I get the output

0
1066.03125
0
1066.03125
0
1066.1640625
0
1066.1640625
0
1066.29296875
0
1066.29296875
0
1066.29296875
0
1066.29296875
0
1066.421875
0
1066.421875
0
1066.421875
0
1066.421875
0
1066.421875
0
1066.421875
0
1066.421875
0
1066.5546875
0
1066.5546875
0
1066.5546875

 and constant afterwards.

I do not know whether the initial rise is a problem but I suspect not. I get 
the same
behavior on the small (4G) machine, only with different numbers of course.

The output of overcommit_memory is zero, so that's not it.

I am quite willing to share my code with you and others who think they can help 
at a
similar level of commitment, but would prefer not to publish the code where 
anyone else
could read it. Please suggest a private channel if you are interested - I could 
open
a dedicated gmail address and post it here, unless you have a better idea.


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.


Re: [sage-devel] Re: memory management issue: deleted variables not released

2016-09-28 Thread Denis


Bill: your comment about normal/expected behavior covers my initial post, 
but not the fact that the same code works in 7.0 and crashes in 7.3.

So the question is, might someone with developer's tools catch this problem 
quickly even with my vanilla code - it's just 277 lines total, plus the 
function invocation. I can't whittle it down easily because the 
interdependencies are pretty tight. The main problem is that I do not get a 
stack trace, the sage process simply exits, with the message "Fatal: memory 
exhausted" on one machine, and completely silently on the other. Actually I 
think that is a system message, i.e. Sage always crashes silently.

Of course, if someone can suggest some way at least to figure out which was 
the last function invoked, that would help.

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.


[sage-devel] fast vector partitions algorithm

2020-02-13 Thread Denis
This is a re-post from sage-combinat-devel with the same subject. Please 
post answers there.

I have translated the Haskell code for vector partitions by M. C. Er, The 
Computer Journal, Vol. 31, 1988, 283-284, into Python (2 or 3, stand-alone 
file with 60 lines total).

The code works significantly faster than the Sage implementation:

┌┐
│ SageMath version 9.0, Release Date: 2020-01-01 │
│ Using Python 3.7.3. Type "help()" for help.│
└┘
sage: import vpartitions
sage: %time myvparts=vpartitions.vPartitionso([6,6,6])
CPU times: user 9.13 s, sys: 89.8 ms, total: 9.22 s
Wall time: 9.22 s
sage: %time sagevparts=list(VectorPartitions([6,6,6]))
CPU times: user 2min 10s, sys: 177 ms, total: 2min 10s
Wall time: 2min 10s
sage: myvparts[::-1]==sagevparts
True

If someone would take over the job of contributing this code to Sage, I 
would be glad to help. There are a few caveats:

1) the code is recursive;
2) there is no "min" option like in the Sage implementation.

I do not know how difficult (or necessary) it would be to address these 
points.

Of course, anyone can take it up straight from Er's paper instead, I won't 
be jealous:)

Cheers,

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/5b1ee47a-7575-4ba9-853a-7e96e400e2e5%40googlegroups.com.


[sage-devel] Re: fast vector partitions algorithm

2020-02-15 Thread Denis
I made a mistake in the reference.

EDIT: this reference was wrong the original post
--- by M. C. Er, The Computer Journal, Vol. 31, 1988, 283-284, 
CORRECTION: the reference for the Haskell source should read
+++ by Brent Yorgey and Conrad Parker,The Monad.Reader Issue 8 , September 
10, 2007

Sorry about that - I had read several papers on the subject some time ago 
and forgot which one I implemented.

I will open a trac ticket with this ASAP.

Thanks for the advice,

Denis


On Thursday, February 13, 2020 at 6:08:33 PM UTC+1, Denis wrote:
>
> This is a re-post from sage-combinat-devel with the same subject. Please 
> post answers there.
>
> I have translated the Haskell code for vector partitions by M. C. Er, The 
> Computer Journal, Vol. 31, 1988, 283-284, into Python (2 or 3, stand-alone 
> file with 60 lines total).
>
> The code works significantly faster than the Sage implementation:
>
> ┌┐
> │ SageMath version 9.0, Release Date: 2020-01-01 │
> │ Using Python 3.7.3. Type "help()" for help.│
> └┘
> sage: import vpartitions
> sage: %time myvparts=vpartitions.vPartitionso([6,6,6])
> CPU times: user 9.13 s, sys: 89.8 ms, total: 9.22 s
> Wall time: 9.22 s
> sage: %time sagevparts=list(VectorPartitions([6,6,6]))
> CPU times: user 2min 10s, sys: 177 ms, total: 2min 10s
> Wall time: 2min 10s
> sage: myvparts[::-1]==sagevparts
> True
>
> If someone would take over the job of contributing this code to Sage, I 
> would be glad to help. There are a few caveats:
>
> 1) the code is recursive;
> 2) there is no "min" option like in the Sage implementation.
>
> I do not know how difficult (or necessary) it would be to address these 
> points.
>
> Of course, anyone can take it up straight from Er's paper instead, I won't 
> be jealous:)
>
> Cheers,
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/398b54b4-cd62-40d4-897a-7400d8fd08ad%40googlegroups.com.


[sage-devel] Re: fast vector partitions algorithm

2020-02-15 Thread Denis
 
I have made a mistake in the original post.

EDIT: this reference was wrong the original post
--- by M. C. Er, The Computer Journal, Vol. 31, 1988, 283-284, 
CORRECTION: the reference for the Haskell source should read
+++ by Brent Yorgey,The Monad.Reader Issue 8 , September 10, 2007

Sorry about that - I had read several papers on the subject a while ago and 
simply forgot which one I implemented.

I will open a trac ticket ASAP.

Thanks for the advice,

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/6ed0b6c1-97ae-4ba3-a15f-70090ccb1668%40googlegroups.com.


[sage-devel] Re: fast vector partitions algorithm

2020-02-19 Thread Denis

Thanks for the encouragement.

I have opened a trac ticket <https://trac.sagemath.org/ticket/29221> now. I 
will push the branch as soon as I sort some things out. (I asked for help 
with git under sage-combinat-devel, not necessary to repeat here.)

Denis

On Thursday, February 13, 2020 at 6:08:33 PM UTC+1, Denis wrote:
>
> This is a re-post from sage-combinat-devel with the same subject. Please 
> post answers there.
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/23444661-c53a-4892-b414-7cc89f35823e%40googlegroups.com.


[sage-devel] doc for web server installation

2020-04-01 Thread Denis

I set up the Sage jupyter server at work to run behind an nginx reverse 
proxy, so I can approach it from home. The main reason is that the machine 
at work is 2-3x faster, not an uncommon situation I believe.

I wonder if there would be any interest to write a doc in the installation 
section, something like a case study, for those in a similar position. I 
would emphasize the security issues in particular, on the other hand I am 
not at all sure I have mastered them properly myself, so there would have 
to be some serious review if I open a ticket.

Any thoughts welcome,

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/b7d89f86-a4d0-475e-9dda-073ccaa217cd%40googlegroups.com.


[sage-devel] Re: doc for web server installation

2020-04-07 Thread Denis
Hi Markus,

well, that would be the non-paranoic approach, to put it mildly. Generally 
speaking, it is against best practices to expose the server of a web 
application to the open internet. This is true even for a CMS like Plone, let 
alone Jupyter, which is intended for execution of arbitrary code. So that is in 
effect what my doc would be about, describing how to reach the Sage server 
through a front end specialized for the internet, nginx in particular, because 
that is what I used.

Admittedly the probability of attack against someone doing like you is pretty 
low, especially if you shut down Sage after use. So I have my doubts about how 
interesting the doc would be for the general user, hence this post.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/239cb259-1be0-4b10-8878-888e5f645295%40googlegroups.com.


Re: [sage-devel] Re: doc for web server installation

2020-04-08 Thread Denis


On Wednesday, April 8, 2020 at 4:11:05 AM UTC+2, Dima Pasechnik wrote:
>
>
>
> IMHO this is not exposing the server to "open internet", this is 
> allowing your client machine (at home), and only it (using "bind 
> addess), to access your server --- which, normally speaking, is behind 
> a firewall that does not allow any connections to it, expect perhaps 
> on the ssh port. 
>
> cf. https://www.ssh.com/ssh/tunneling/example 
>
>
I agree, but I said "generally speaking," though I admit the inference was 
there, sorry about that. If Markus' one-liner is not in the installation 
docs, it should be, I think.  In any case, the docs are not for people who 
would get it right on their own, but for the others.

As I see it, the larger issue is that web applications need to have a web 
server embedded simply because they want a browser for a front end, just as 
they used a terminal in the old days. Admittedly the Jupyter developers 
have gone to some length to account for the possibility that their server 
would be used alone over the internet, supporting encryption in particular.

Speaking generally again, at least according to my reading, best practices 
are unequivocal: one should not use the web application's embedded server 
other than locally, i.e. when the browser is just a terminal. The idea is 
for application developers to concentrate on the application, and server 
developers to concentrate on the interaction with the internet. The only 
front ends considered internet-capable in this context are Apache, 2/3 of 
implementations, and nginx, 1/3.

For the case at hand, I am the first to admit that my solution is overkill. 
The reason is that the "attack surface" is very small, especially if (I 
repeat) one shuts down the Sage server after each session. A good idea 
would also be to approach it with a dedicated browser instance, to prevent 
cross-site scripting attacks. Also, with a universal web server comes the 
possibility of seriously misconfiguring it. It is a bit like that old 
question about memory management, is it too important to leave to the 
compiler, or too important to leave to the programmer?

So I rest my case, repeting the question: does it make sense to write such 
a doc, or not?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/579275cf-626d-4c35-8483-a85721a4c92b%40googlegroups.com.


[sage-devel] bug in save_session

2022-06-21 Thread Denis
Hi,

I am checking whether I should open a ticket. Any comment is welcome.

Cheers,

Denis

save_session() in Sage 9.5 has problems with ETuple variables:

sage: from sage.rings.polynomial.polydict import ETuple
sage: key = ETuple((1,2,3,4))
sage: save_session('data/sessions/example')
---
TypeError Traceback (most recent call last)
 in 
> 1 save_session('data/sessions/example')

/opt/Sage/sage-9.5/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/misc/session.pyx
 
in sage.misc.session.save_session 
(build/cythonized/sage/misc/session.c:2629)()
304 # We iterate only over the new variables that were defined in 
this
305 # session, since those are the only ones we will save.
--> 306 for k in show_identifiers(hidden = True):
307 try:
308 x = state[k]

/opt/Sage/sage-9.5/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/misc/session.pyx
 
in sage.misc.session.show_identifiers 
(build/cythonized/sage/misc/session.c:2392)()
221 
222 return sorted([x for x, v in state.items() if _is_new_var(x, v, 
hidden)
--> 223and not _in_extra_globals(x, v)])
224 
225 

/opt/Sage/sage-9.5/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/misc/session.pyx
 
in sage.misc.session.show_identifiers._in_extra_globals 
(build/cythonized/sage/misc/session.c:2134)()
218 _none = object()
219 def _in_extra_globals(name, val):
--> 220 return val == DocTestTask.extra_globals.get(name, _none)
221 
222 return sorted([x for x, v in state.items() if _is_new_var(x, v, 
hidden)

TypeError: Argument 'other' has incorrect type (expected 
sage.rings.polynomial.polydict.ETuple, got object)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/25d3befd-e08f-4ac7-a75b-f274ced26e9an%40googlegroups.com.


[sage-devel] No module named '_argon2_cffi_bindings'

2023-03-31 Thread Denis

I always install Sage from source on four up-to-date Debian systems, two 
PCs and two laptops. Passing from 9.7 to 9.8, something went wrong with one 
of the laptop installations. It compiles normally, and I get the login page 
with sage --notebook=jupyter, but when I type in my password, I get 500 
Internal Server Error in the browser, and  the terminal in which I started 
the notebook gives the error messages:

[I 08:21:01.644 NotebookApp] 302 GET /tree (127.0.0.1) 0.51ms
[E 08:21:12.719 NotebookApp] Uncaught exception POST /login?next=%2Ftree 
(127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:', 
method='POST', uri='/login?next=%2Ftree', version='HTTP/1.1', 
remote_ip='127.0.0.1')
Traceback (most recent call last):
  File 
"/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/tornado/web.py",
 
line 1711, in _execute
result = method(*self.path_args, **self.path_kwargs)
 ^^^
  File 
"/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py",
 
line 84, in post
if self.passwd_check(self.hashed_password, typed_password) and not 
new_password:
   ^^^
  File 
"/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py",
 
line 75, in passwd_check
return passwd_check(a, b)
   ^^
  File 
"/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/security.py",
 
line 108, in passwd_check
import argon2
  File 
"/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/__init__.py",
 
line 7, in 
from . import exceptions, low_level, profiles
  File 
"/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/low_level.py",
 
line 15, in 
from _argon2_cffi_bindings import ffi, lib
ModuleNotFoundError: No module named '_argon2_cffi_bindings'
[E 08:21:12.724 NotebookApp] {
  "Host": "localhost:",
  "Accept": 
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
  "Referer": "http://localhost:/login?next=%2Ftree";,
  "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) 
Gecko/20100101 Firefox/102.0"
}
[E 08:21:12.724 NotebookApp] 500 POST /login?next=%2Ftree (127.0.0.1) 
5.91ms referer=http://localhost:/login?next=%2Ftree

I have tried to configure --without-system-python3 but no luck. Version 9.7 
on the same laptop compiled with the system python and works normally. The 
only thing I did differently with the laptop is that I always installed all 
the packages recommended by configure, but that was also the case for 9.7, 
so possibly some specific package got updated between the two versions 
which broke the installation. I depend on Sage in my daily work so I am 
reluctant to try to break the three working systems.

Any ideas?

Cheers,

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/ff6fe816-bf45-4f8d-a865-7b43650e8b57n%40googlegroups.com.


[sage-devel] Re: No module named '_argon2_cffi_bindings'

2023-04-01 Thread Denis
It worked, thank you very much! I am mystified, though.

Denis

On Saturday, April 1, 2023 at 8:55:08 AM UTC+2 Matthias Koeppe wrote:

> Try if "./sage -pip install argon2-cffi-bindings" fixes this problem for 
> you.
>
> On Friday, March 31, 2023 at 11:46:19 PM UTC-7 Denis wrote:
>
>>
>> I always install Sage from source on four up-to-date Debian systems, two 
>> PCs and two laptops. Passing from 9.7 to 9.8, something went wrong with one 
>> of the laptop installations. It compiles normally, and I get the login page 
>> with sage --notebook=jupyter, but when I type in my password, I get 500 
>> Internal Server Error in the browser, and  the terminal in which I started 
>> the notebook gives the error messages:
>>
>> [I 08:21:01.644 NotebookApp] 302 GET /tree (127.0.0.1) 0.51ms
>> [E 08:21:12.719 NotebookApp] Uncaught exception POST /login?next=%2Ftree 
>> (127.0.0.1)
>> HTTPServerRequest(protocol='http', host='localhost:', 
>> method='POST', uri='/login?next=%2Ftree', version='HTTP/1.1', 
>> remote_ip='127.0.0.1')
>> Traceback (most recent call last):
>>   File 
>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/tornado/web.py",
>>  
>> line 1711, in _execute
>> result = method(*self.path_args, **self.path_kwargs)
>>  ^^^
>>   File 
>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py",
>>  
>> line 84, in post
>> if self.passwd_check(self.hashed_password, typed_password) and 
>> not new_password:
>>^^^
>>   File 
>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py",
>>  
>> line 75, in passwd_check
>> return passwd_check(a, b)
>>^^
>>   File 
>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/security.py",
>>  
>> line 108, in passwd_check
>> import argon2
>>   File 
>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/__init__.py",
>>  
>> line 7, in 
>> from . import exceptions, low_level, profiles
>>   File 
>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/low_level.py",
>>  
>> line 15, in 
>> from _argon2_cffi_bindings import ffi, lib
>> ModuleNotFoundError: No module named '_argon2_cffi_bindings'
>> [E 08:21:12.724 NotebookApp] {
>>   "Host": "localhost:",
>>   "Accept": 
>> "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
>>   "Referer": "http://localhost:/login?next=%2Ftree";,
>>   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) 
>> Gecko/20100101 Firefox/102.0"
>> }
>> [E 08:21:12.724 NotebookApp] 500 POST /login?next=%2Ftree (127.0.0.1) 
>> 5.91ms referer=http://localhost:/login?next=%2Ftree
>>
>> I have tried to configure --without-system-python3 but no luck. Version 
>> 9.7 on the same laptop compiled with the system python and works normally. 
>> The only thing I did differently with the laptop is that I always installed 
>> all the packages recommended by configure, but that was also the case for 
>> 9.7, so possibly some specific package got updated between the two versions 
>> which broke the installation. I depend on Sage in my daily work so I am 
>> reluctant to try to break the three working systems.
>>
>> Any ideas?
>>
>> Cheers,
>>
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/c65b28ea-d41a-4c18-ac9b-f026a2c5ea09n%40googlegroups.com.


[sage-devel] Re: No module named '_argon2_cffi_bindings'

2023-04-01 Thread Denis
So it may be that in the three upgrades that worked the dependency was 
satisfied by accident. I can check if it is of any interest now. Thanks for 
the help again.

Denis

On Saturday, April 1, 2023 at 6:17:06 PM UTC+2 Matthias Koeppe wrote:

> I made a mistake when upgrading a package - a dependency is missing.
> That's now https://github.com/sagemath/sage/issues/35411
>
> The error only appears when a jupyter configuration with passwords is 
> used, which appears to be rare.
>
>
> On Saturday, April 1, 2023 at 9:06:47 AM UTC-7 Denis wrote:
>
>> It worked, thank you very much! I am mystified, though.
>>
>> Denis
>>
>> On Saturday, April 1, 2023 at 8:55:08 AM UTC+2 Matthias Koeppe wrote:
>>
>>> Try if "./sage -pip install argon2-cffi-bindings" fixes this problem for 
>>> you.
>>>
>>> On Friday, March 31, 2023 at 11:46:19 PM UTC-7 Denis wrote:
>>>
>>>>
>>>> I always install Sage from source on four up-to-date Debian systems, 
>>>> two PCs and two laptops. Passing from 9.7 to 9.8, something went wrong 
>>>> with 
>>>> one of the laptop installations. It compiles normally, and I get the login 
>>>> page with sage --notebook=jupyter, but when I type in my password, I get 
>>>> 500 Internal Server Error in the browser, and  the terminal in which I 
>>>> started the notebook gives the error messages:
>>>>
>>>> [I 08:21:01.644 NotebookApp] 302 GET /tree (127.0.0.1) 0.51ms
>>>> [E 08:21:12.719 NotebookApp] Uncaught exception POST 
>>>> /login?next=%2Ftree (127.0.0.1)
>>>> HTTPServerRequest(protocol='http', host='localhost:', 
>>>> method='POST', uri='/login?next=%2Ftree', version='HTTP/1.1', 
>>>> remote_ip='127.0.0.1')
>>>> Traceback (most recent call last):
>>>>   File 
>>>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/tornado/web.py",
>>>>  
>>>> line 1711, in _execute
>>>> result = method(*self.path_args, **self.path_kwargs)
>>>>  ^^^
>>>>   File 
>>>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py",
>>>>  
>>>> line 84, in post
>>>> if self.passwd_check(self.hashed_password, typed_password) and 
>>>> not new_password:
>>>>^^^
>>>>   File 
>>>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/login.py",
>>>>  
>>>> line 75, in passwd_check
>>>> return passwd_check(a, b)
>>>>^^
>>>>   File 
>>>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/notebook/auth/security.py",
>>>>  
>>>> line 108, in passwd_check
>>>> import argon2
>>>>   File 
>>>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/__init__.py",
>>>>  
>>>> line 7, in 
>>>> from . import exceptions, low_level, profiles
>>>>   File 
>>>> "/opt/Sage/sage-9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/argon2/low_level.py",
>>>>  
>>>> line 15, in 
>>>> from _argon2_cffi_bindings import ffi, lib
>>>> ModuleNotFoundError: No module named '_argon2_cffi_bindings'
>>>> [E 08:21:12.724 NotebookApp] {
>>>>   "Host": "localhost:",
>>>>   "Accept": 
>>>> "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
>>>>   "Referer": "http://localhost:/login?next=%2Ftree";,
>>>>   "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) 
>>>> Gecko/20100101 Firefox/102.0"
>>>> }
>>>> [E 08:21:12.724 NotebookApp] 500 POST /login?next=%2Ftree (127.0.0.1) 
>>>> 5.91ms referer=http://localhost:/login?next=%2Ftree
>>>>
>>>> I have tried to configure --without-system-python3 but no luck. Version 
>>>> 9.7 on the same laptop compiled with the system python and works normally. 
>>>> The only thing I did differently with the laptop is that I always 
>>>> installed 
>>>> all the packages recommended by configure, but that was also the case for 
>>>> 9.7, so possibly some specific package got updated between the two 
>>>> versions 
>>>> which broke the installation. I depend on Sage in my daily work so I am 
>>>> reluctant to try to break the three working systems.
>>>>
>>>> Any ideas?
>>>>
>>>> Cheers,
>>>>
>>>> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/eb039123-db78-459f-88ab-47e5987e0073n%40googlegroups.com.


[sage-devel] help menu in jupyter notebook

2024-04-09 Thread Denis
At some point the help menu in jupyter notebooks started pointing to 
doc.sagemath.org instead of the locally built documentation. I wouldn't 
mind having a configuration option not to build the documentation, in which 
case, of course, this would be expected. However, because the documentation 
is still built by default, it looks more like a bug than a feature. Any 
thoughts?

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/34d436c6-b74d-4726-b9e4-47c8e3f840ben%40googlegroups.com.


[sage-devel] Re: help menu in jupyter notebook

2024-04-26 Thread Denis
Only to put a note in the installation instructions somewhere, along the 
lines:

If the URL in your browser reads /foo/bar/notebooks/whatever.ipynb, then 
/foo/bar/kernelspecs/sagemath/doc/html/en/index.html will take you to the 
local documentation.

I have bookmarked a few such links, which is good enough for me, the only 
problem was figuring out the url.

Also maybe one could point out how to skip building the documentation.

Denis

On Tuesday, April 9, 2024 at 11:52:23 PM UTC+2 Kwankyu Lee wrote:

> On Wednesday, April 10, 2024 at 1:30:21 AM UTC+9 Denis wrote:
>
> At some point the help menu in jupyter notebooks started pointing to 
> doc.sagemath.org instead of the locally built documentation. I wouldn't 
> mind having a configuration option not to build the documentation, in which 
> case, of course, this would be expected. However, because the documentation 
> is still built by default, it looks more like a bug than a feature. Any 
> thoughts?
>
>
> That was done because jupyterlab help menu does not support loading local 
> documentation. 
>
> See https://github.com/sagemath/sage/pull/36246
>
> Any idea to improve the situation? 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/3f6f305f-74e8-430b-a1e2-83614b2833ben%40googlegroups.com.


[sage-devel] Sage 6.7 access to packages on MacOSX

2015-07-15 Thread Denis Berthier


The usual command "./sage --optional" does not work on MacOSX (I'm using 
the pre-compiled version of Sage 6.7)


Using Sage Server http://www.sagemath.org/spkg

HTTP Error 404: Not Found



Error contacting http://www.sagemath.org/spkg/optional/list. Try using an 
alternative server.

For example, from the bash prompt try typing


   export SAGE_SERVER=http://sage.scipy.org/sage/


then try again.


-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] "cd man" crashes building ncurses

2015-02-04 Thread Denis Sunko

I have recently built 6.4.1 from sources on three different computers. One 
of the compilations crashed while building the ncurses package. I was able 
to trace this to a "cd man" command issued during the build process. What 
happened was that my cdpath on that machine pointed to a directory which 
had a subdirectory named "man". Setting CDPATH='' cured the issue, proving 
that the "cd man" was being trumped by my cdpath. Evidently one would have 
to replace it with something fixed relative to the build tree, at least "cd 
./man" I think. I hope somebody more adept with Sage development than me 
can take it from here. Note that it is not clear whether any package 
compiled after ncurses has a similar problem.

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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: memory management issue: deleted variables not released

2017-08-09 Thread Denis Sunko
Hi all,

the problem went away when I switched from 32-bit debian jessie to 64-bit
stretch. One would suspect a bug in some of the system libraries, because
the version of Sage is the same (and compiled locally from source).
Obviously the motivation to find it went down somewhat.

I thank everyone for their friendly input,

Denis


On Wed, Sep 28, 2016 at 3:34 PM, Denis  wrote:

>
>
> Bill: your comment about normal/expected behavior covers my initial post,
> but not the fact that the same code works in 7.0 and crashes in 7.3.
>
> So the question is, might someone with developer's tools catch this
> problem quickly even with my vanilla code - it's just 277 lines total, plus
> the function invocation. I can't whittle it down easily because the
> interdependencies are pretty tight. The main problem is that I do not get a
> stack trace, the sage process simply exits, with the message "Fatal: memory
> exhausted" on one machine, and completely silently on the other. Actually I
> think that is a system message, i.e. Sage always crashes silently.
>
> Of course, if someone can suggest some way at least to figure out which
> was the last function invoked, that would help.
>
> Denis
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/sage-devel/jCjc_Spo20o/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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.