[sage-devel] Attention wanted: component labels for issues in GitHub

2023-01-10 Thread Kwankyu Lee
Dear Sage developers,

One of the first things we do when we create a new ticket is to choose the 
"Component" for which the ticket is. After we move to GitHub, we instead 
would choose a label of the form "component: ...". Like in Trac, the kind 
of labels will rarely change and you will be forced to choose one of them.  
Hence it is crucial that we have a good set of labels from the start.  More 
so because, unfortunately, we should limit the number of labels as they 
should be listed in a dropdown list along with other labels. 

We are in the process of determining the labels and mapping trac components 
to github labels at

https://github.com/sagemath/trac-to-github/issues/99

Please come and check. Any comments to improve the set of github labels and 
the mapping are welcome.

-- 
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/4ff80c88-a3ad-43ea-aa00-b3ddde8f91ffn%40googlegroups.com.


Re: [sage-devel] fpylll really slow in sage9.x, when compared to sage8.x

2023-01-10 Thread Dima Pasechnik
This does not appear to be Sage-related.
You can run the code above in Python shell.
(e.g. you can start Sage's python as "sage --python")

HTH
Dima

On Tue, Jan 10, 2023 at 3:48 PM 'Julian Nowakowski' via sage-devel
 wrote:
>
> Hi Martin,
>
> the slowdown also appears in other contexts. In particular, it also appears 
> when running LLL.
> Running the following code on our machine takes approximately 1 second with 
> sage 8.1 and 8.9, but approximately 10 seconds with sage 9.3 and 9.7.
>
> import time
> from fpylll import IntegerMatrix, LLL
>
> dim = 250
> bits = 3
>
> A = IntegerMatrix.random( dim, "uniform", bits = bits )
>
> start = time.time()
> LLL.reduction(A)
> stop = time.time()
>
> print("LLL took %f seconds." % (stop-start))
>
> Best,
> Julian
> martinr...@googlemail.com schrieb am Dienstag, 10. Januar 2023 um 11:57:29 
> UTC+1:
>>
>> Hi there,
>>
>> I don’t think A*B is a good benchmark for FPyLLL does the same slowdown also 
>> appear for, say, LLL?
>>
>> Cheers,
>> Martin
>>
>> On Tue, Jan 10 2023, 'Julian Nowakowski' via sage-devel wrote:
>> > Hi all,
>> >
>> > we recently noticed that the IntegerMatrix class from fpylll is (on our
>> > hardware) much slower in sage9.x, than it is in sage8.x.
>> >
>> > Please consider the following code snippet:
>> >
>> > import time
>> > from fpylll import IntegerMatrix
>> >
>> > dim = 30
>> > bits = 10
>> >
>> > A = IntegerMatrix.random( dim, "uniform", bits = bits )
>> > B = IntegerMatrix.random( dim, "uniform", bits = bits )
>> >
>> > start = time.time()
>> > C = A*B
>> > stop = time.time()
>> >
>> > print( "Multiplication took %f seconds." % (stop-start) )
>> >
>> >
>> > We tried running this code in Sage 8.1, 8.9, 9.3 and 9.7. In the 8.x
>> > versions, the multiplications takes less than 0.2 seconds. In the 9.x
>> > versions, it takes more than 6 seconds.
>> >
>> > Any ideas?
>> >
>> > Best,
>> > Julian
>> >
>> > --
>> >
>> > https://juliannowakow.ski/
>>
>>
>> --
>>
>> _pgp: https://keybase.io/martinralbrecht
>> _www: https://malb.io
>> _prn: he/him or they/them
>>
> --
> 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/73f9e6ea-cdc4-4d43-a2fc-abbfa144d71cn%40googlegroups.com.

-- 
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/CAAWYfq2ViaCUONrMM_-vvjWz4LK9MnjDKxMmwePm1isFGzKcaQ%40mail.gmail.com.


Re: [sage-devel] fpylll really slow in sage9.x, when compared to sage8.x

2023-01-10 Thread 'Julian Nowakowski' via sage-devel
Hi Martin,

the slowdown also appears in other contexts. In particular, it also appears 
when running LLL.
Running the following code on our machine takes approximately 1 second with 
sage 8.1 and 8.9, but approximately 10 seconds with sage 9.3 and 9.7.

import time
from fpylll import IntegerMatrix, LLL

dim = 250
bits = 3

A = IntegerMatrix.random( dim, "uniform", bits = bits )

start = time.time()
LLL.reduction(A)
stop = time.time()

print("LLL took %f seconds." % (stop-start))

Best,
Julian
martinr...@googlemail.com schrieb am Dienstag, 10. Januar 2023 um 11:57:29 
UTC+1:

> Hi there,
>
> I don’t think A*B is a good benchmark for FPyLLL does the same slowdown 
> also appear for, say, LLL?
>
> Cheers,
> Martin
>
> On Tue, Jan 10 2023, 'Julian Nowakowski' via sage-devel wrote:
> > Hi all,
> >
> > we recently noticed that the IntegerMatrix class from fpylll is (on our 
> > hardware) much slower in sage9.x, than it is in sage8.x.
> >
> > Please consider the following code snippet:
> >
> > import time
> > from fpylll import IntegerMatrix
> >
> > dim = 30
> > bits = 10
> >
> > A = IntegerMatrix.random( dim, "uniform", bits = bits )
> > B = IntegerMatrix.random( dim, "uniform", bits = bits )
> >
> > start = time.time()
> > C = A*B
> > stop = time.time()
> >
> > print( "Multiplication took %f seconds." % (stop-start) )
> >
> >
> > We tried running this code in Sage 8.1, 8.9, 9.3 and 9.7. In the 8.x 
> > versions, the multiplications takes less than 0.2 seconds. In the 9.x 
> > versions, it takes more than 6 seconds.
> >
> > Any ideas?
> >
> > Best,
> > Julian
> >
> > --
> >
> > https://juliannowakow.ski/
>
>
> -- 
>
> _pgp: https://keybase.io/martinralbrecht
> _www: https://malb.io
> _prn: he/him or they/them
>
>

-- 
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/73f9e6ea-cdc4-4d43-a2fc-abbfa144d71cn%40googlegroups.com.


Re: [sage-devel] fpylll really slow in sage9.x, when compared to sage8.x

2023-01-10 Thread 'Martin R. Albrecht' via sage-devel
Hi there,

I don’t think A*B is a good benchmark for FPyLLL does the same slowdown also 
appear for, say, LLL?

Cheers,
Martin

On Tue, Jan 10 2023, 'Julian Nowakowski' via sage-devel wrote:
> Hi all,
>
> we recently noticed that the IntegerMatrix class from fpylll is (on our 
> hardware) much slower in sage9.x, than it is in sage8.x.
>
> Please consider the following code snippet:
>
> import time
> from fpylll import IntegerMatrix
>
> dim = 30
> bits = 10
>
> A = IntegerMatrix.random( dim, "uniform", bits = bits )
> B = IntegerMatrix.random( dim, "uniform", bits = bits )
>
> start = time.time()
> C = A*B
> stop = time.time()
>
> print( "Multiplication took %f seconds." % (stop-start) )
>
>
> We tried running this code in Sage 8.1, 8.9, 9.3 and 9.7. In the 8.x 
> versions, the multiplications takes less than 0.2 seconds. In the 9.x 
> versions, it takes more than 6 seconds.
>
> Any ideas?
>
> Best,
> Julian
>
> --
>
> https://juliannowakow.ski/


-- 

_pgp: https://keybase.io/martinralbrecht
_www: https://malb.io
_prn: he/him or they/them

-- 
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/87cz7m1wto.fsf%40googlemail.com.


[sage-devel] fpylll really slow in sage9.x, when compared to sage8.x

2023-01-10 Thread 'Julian Nowakowski' via sage-devel
Hi all,

we recently noticed that the IntegerMatrix class from fpylll is (on our 
hardware) much slower in sage9.x, than it is in sage8.x.

Please consider the following code snippet:

import time
from fpylll import IntegerMatrix

dim = 30
bits = 10

A = IntegerMatrix.random( dim, "uniform", bits = bits )
B = IntegerMatrix.random( dim, "uniform", bits = bits )

start = time.time()
C = A*B
stop = time.time()

print( "Multiplication took %f seconds." % (stop-start) )


We tried running this code in Sage 8.1, 8.9, 9.3 and 9.7. In the 8.x 
versions, the multiplications takes less than 0.2 seconds. In the 9.x 
versions, it takes more than 6 seconds.

Any ideas?

Best,
Julian

--

https://juliannowakow.ski/

-- 
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/2b836bea-a10a-47ba-b401-97b91c1a6b4bn%40googlegroups.com.


[sage-devel] Bugged interaction with signal handler

2023-01-10 Thread royS
Same as 
https://ask.sagemath.org/question/65840/bugged-interaction-with-signal-handler-sagemath-95-linux/

This is a minimal reproducible example of a bug using a typical interrupt 
handler so that files being written to are not corrupted. Running the 
script as `python filename.py` works as intended, but the issue occurs on 
running this script as `sage filename.sage` or as `python filename.py` with 
any Sage import statement similar to `from sage.all import matrix`.

As commented, the first `time.sleep(3)` can be interrupted correctly, the 
second `time.sleep(4)` correctly raises the `KeyboardInterrupt()` on 
exiting the scope of `with DelayedKeyboardInterrupt()`, but the final `
time.sleep(5)` call cannot be interrupted, but the hardcoded `
KeyboardInterrupt()` at the end still works. Printing `
signal.getsignal(signal.SIGINT)` shows that `DelayedKeyboardInterrupt()` 
correctly restores the handler.

I realise that `cysignals` is preferred with Sage, but am unable to figure 
out how to use it for the project without major changes.

import signal
import time

class DelayedKeyboardInterrupt:
def __enter__(self):
self.sigint_handler = signal.signal(signal.SIGINT, self.handler)
self.signal_received = False

def handler(self, sig, frame):
self.signal_received = True
print("Delaying exit for file I/O.")

def __exit__(self, type, value, traceback):
signal.signal(signal.SIGINT, self.sigint_handler)
if self.signal_received:
raise KeyboardInterrupt("delayed")

print("sleeping unprotected for 3 sec")
time.sleep(3)  # Ctrl+C here raises KeyboardInterrupt instantly

with DelayedKeyboardInterrupt():
print("sleeping protected for 4 sec")
time.sleep(4)  # Ctrl+C here raises KeyboardInterrupt("delayed") 
after end of 4 sec

print("sleeping 'unprotected' for 5 sec")
time.sleep(5)  # Ctrl+C here does not raise any KeyboardInterrupt

raise KeyboardInterrupt("hardcoded")  # this raises correctly

Ubuntu 22.04.1 LTS 64-bit, with Sage 9.5 installed as a apt package

-- 
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/339a146f-62ed-427f-99c7-2e5a691d32e2n%40googlegroups.com.